Skip to main content

shopify_client/common/
mod.rs

1pub mod http;
2pub mod query_filter;
3pub mod types;
4pub mod utils;
5
6use std::sync::Arc;
7
8use crate::common::types::RequestCallbacks;
9
10#[derive(Clone)]
11pub struct ServiceContext {
12    pub shop_url: Arc<String>,
13    pub version: Arc<String>,
14    pub access_token: Arc<String>,
15    pub callbacks: Arc<RequestCallbacks>,
16}
17
18impl ServiceContext {
19    pub fn new(
20        shop_url: Arc<String>,
21        version: Arc<String>,
22        access_token: Arc<String>,
23        callbacks: Arc<RequestCallbacks>,
24    ) -> Self {
25        Self {
26            shop_url,
27            version,
28            access_token,
29            callbacks,
30        }
31    }
32}