1use std::sync::Arc;
2
3pub mod common;
4pub mod services;
5
6pub struct ShopifyClient {
7 pub order: services::order::Order,
8}
9
10impl ShopifyClient {
11 pub fn new(shop_url: String, access_token: String, api_version: Option<String>) -> Self {
12 let api_version = api_version.unwrap_or("2024-07".to_string());
13 let shop_url_arc = Arc::new(shop_url);
14 let api_version_arc = Arc::new(api_version);
15 let access_token_arc = Arc::new(access_token);
16
17 ShopifyClient {
18 order: services::order::Order::new(
19 Arc::clone(&shop_url_arc),
20 Arc::clone(&api_version_arc),
21 Arc::clone(&access_token_arc),
22 ),
23 }
24 }
25}