Skip to main content

ghl_sdk/services/
store.rs

1// @generated by xtask/generate_services.py — do not edit by hand.
2//! `store` — typed methods for all 18 API v2 operations
3//! in this module.
4//!
5//! Access via [`Ghl::store`](crate::Ghl::store).
6//!
7//! Request and response types come from [`ghl_models::v2::store`](https://docs.rs/ghl-models/latest/ghl_models/v2/store/); every endpoint is also documented in the
8//! [`store` API reference](https://github.com/Shahroz/ghl-rs/blob/main/docs/api/store.md).
9//!
10//! Enable with `features = ["store"]`.
11
12#![allow(clippy::too_many_arguments)]
13
14use crate::client::Ghl;
15use crate::error::Result;
16use ghl_models::v2::store as models;
17
18/// Typed access to the `store` API v2 surface (18 operations). Obtained via
19/// [`Ghl::store`](crate::Ghl::store).
20#[derive(Debug, Clone)]
21pub struct StoreService {
22    pub(crate) client: Ghl,
23}
24
25impl StoreService {
26    pub(crate) fn new(client: Ghl) -> Self {
27        Self { client }
28    }
29}
30
31/// Query parameters for [`StoreService::list_shipping_carriers`].
32#[derive(Debug, Clone, Default)]
33pub struct ListShippingCarriersParams {
34    /// Location Id or Agency Id
35    /// Required by the API.
36    pub alt_id: String,
37    /// `altType` query parameter.
38    /// Allowed values: `location`.
39    /// Required by the API.
40    pub alt_type: String,
41}
42
43impl ListShippingCarriersParams {
44    /// Start from the parameters the API requires.
45    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
46        Self {
47            alt_id: alt_id.into(),
48            alt_type: alt_type.into(),
49        }
50    }
51
52    fn to_query(&self) -> Vec<(String, String)> {
53        let q: Vec<(String, String)> = vec![
54            ("altId".into(), self.alt_id.clone()),
55            ("altType".into(), self.alt_type.clone()),
56        ];
57        q
58    }
59}
60
61/// Query parameters for [`StoreService::delete_shipping_carrier`].
62#[derive(Debug, Clone, Default)]
63pub struct DeleteShippingCarrierParams {
64    /// Location Id or Agency Id
65    /// Required by the API.
66    pub alt_id: String,
67    /// `altType` query parameter.
68    /// Allowed values: `location`.
69    /// Required by the API.
70    pub alt_type: String,
71}
72
73impl DeleteShippingCarrierParams {
74    /// Start from the parameters the API requires.
75    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
76        Self {
77            alt_id: alt_id.into(),
78            alt_type: alt_type.into(),
79        }
80    }
81
82    fn to_query(&self) -> Vec<(String, String)> {
83        let q: Vec<(String, String)> = vec![
84            ("altId".into(), self.alt_id.clone()),
85            ("altType".into(), self.alt_type.clone()),
86        ];
87        q
88    }
89}
90
91/// Query parameters for [`StoreService::get_shipping_carrier`].
92#[derive(Debug, Clone, Default)]
93pub struct GetShippingCarrierParams {
94    /// Location Id or Agency Id
95    /// Required by the API.
96    pub alt_id: String,
97    /// `altType` query parameter.
98    /// Allowed values: `location`.
99    /// Required by the API.
100    pub alt_type: String,
101}
102
103impl GetShippingCarrierParams {
104    /// Start from the parameters the API requires.
105    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
106        Self {
107            alt_id: alt_id.into(),
108            alt_type: alt_type.into(),
109        }
110    }
111
112    fn to_query(&self) -> Vec<(String, String)> {
113        let q: Vec<(String, String)> = vec![
114            ("altId".into(), self.alt_id.clone()),
115            ("altType".into(), self.alt_type.clone()),
116        ];
117        q
118    }
119}
120
121/// Query parameters for [`StoreService::list_shipping_zones`].
122#[derive(Debug, Clone, Default)]
123pub struct ListShippingZonesParams {
124    /// Location Id or Agency Id
125    /// Required by the API.
126    pub alt_id: String,
127    /// `altType` query parameter.
128    /// Allowed values: `location`.
129    /// Required by the API.
130    pub alt_type: String,
131    /// The maximum number of items to be included in a single page of results
132    pub limit: Option<f64>,
133    /// The starting index of the page, indicating the position from which the results
134    /// should be retrieved.
135    pub offset: Option<f64>,
136    /// Include shipping rates array
137    pub with_shipping_rate: Option<bool>,
138}
139
140impl ListShippingZonesParams {
141    /// Start from the parameters the API requires.
142    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
143        Self {
144            alt_id: alt_id.into(),
145            alt_type: alt_type.into(),
146            ..Default::default()
147        }
148    }
149
150    /// The maximum number of items to be included in a single page of results
151    pub fn limit(mut self, v: f64) -> Self {
152        self.limit = Some(v);
153        self
154    }
155
156    /// The starting index of the page, indicating the position from which the results
157    /// should be retrieved.
158    pub fn offset(mut self, v: f64) -> Self {
159        self.offset = Some(v);
160        self
161    }
162
163    /// Include shipping rates array
164    pub fn with_shipping_rate(mut self, v: bool) -> Self {
165        self.with_shipping_rate = Some(v);
166        self
167    }
168
169    fn to_query(&self) -> Vec<(String, String)> {
170        let mut q: Vec<(String, String)> = vec![
171            ("altId".into(), self.alt_id.clone()),
172            ("altType".into(), self.alt_type.clone()),
173        ];
174        if let Some(v) = &self.limit {
175            q.push(("limit".into(), v.to_string()));
176        }
177        if let Some(v) = &self.offset {
178            q.push(("offset".into(), v.to_string()));
179        }
180        if let Some(v) = &self.with_shipping_rate {
181            q.push(("withShippingRate".into(), v.to_string()));
182        }
183        q
184    }
185}
186
187/// Query parameters for [`StoreService::delete_shipping_zone`].
188#[derive(Debug, Clone, Default)]
189pub struct DeleteShippingZoneParams {
190    /// Location Id or Agency Id
191    /// Required by the API.
192    pub alt_id: String,
193    /// `altType` query parameter.
194    /// Allowed values: `location`.
195    /// Required by the API.
196    pub alt_type: String,
197}
198
199impl DeleteShippingZoneParams {
200    /// Start from the parameters the API requires.
201    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
202        Self {
203            alt_id: alt_id.into(),
204            alt_type: alt_type.into(),
205        }
206    }
207
208    fn to_query(&self) -> Vec<(String, String)> {
209        let q: Vec<(String, String)> = vec![
210            ("altId".into(), self.alt_id.clone()),
211            ("altType".into(), self.alt_type.clone()),
212        ];
213        q
214    }
215}
216
217/// Query parameters for [`StoreService::get_shipping_zone`].
218#[derive(Debug, Clone, Default)]
219pub struct GetShippingZoneParams {
220    /// Location Id or Agency Id
221    /// Required by the API.
222    pub alt_id: String,
223    /// `altType` query parameter.
224    /// Allowed values: `location`.
225    /// Required by the API.
226    pub alt_type: String,
227    /// Include shipping rates array
228    pub with_shipping_rate: Option<bool>,
229}
230
231impl GetShippingZoneParams {
232    /// Start from the parameters the API requires.
233    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
234        Self {
235            alt_id: alt_id.into(),
236            alt_type: alt_type.into(),
237            ..Default::default()
238        }
239    }
240
241    /// Include shipping rates array
242    pub fn with_shipping_rate(mut self, v: bool) -> Self {
243        self.with_shipping_rate = Some(v);
244        self
245    }
246
247    fn to_query(&self) -> Vec<(String, String)> {
248        let mut q: Vec<(String, String)> = vec![
249            ("altId".into(), self.alt_id.clone()),
250            ("altType".into(), self.alt_type.clone()),
251        ];
252        if let Some(v) = &self.with_shipping_rate {
253            q.push(("withShippingRate".into(), v.to_string()));
254        }
255        q
256    }
257}
258
259/// Query parameters for [`StoreService::list_shipping_rates`].
260#[derive(Debug, Clone, Default)]
261pub struct ListShippingRatesParams {
262    /// Location Id or Agency Id
263    /// Required by the API.
264    pub alt_id: String,
265    /// `altType` query parameter.
266    /// Allowed values: `location`.
267    /// Required by the API.
268    pub alt_type: String,
269    /// The maximum number of items to be included in a single page of results
270    pub limit: Option<f64>,
271    /// The starting index of the page, indicating the position from which the results
272    /// should be retrieved.
273    pub offset: Option<f64>,
274}
275
276impl ListShippingRatesParams {
277    /// Start from the parameters the API requires.
278    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
279        Self {
280            alt_id: alt_id.into(),
281            alt_type: alt_type.into(),
282            ..Default::default()
283        }
284    }
285
286    /// The maximum number of items to be included in a single page of results
287    pub fn limit(mut self, v: f64) -> Self {
288        self.limit = Some(v);
289        self
290    }
291
292    /// The starting index of the page, indicating the position from which the results
293    /// should be retrieved.
294    pub fn offset(mut self, v: f64) -> Self {
295        self.offset = Some(v);
296        self
297    }
298
299    fn to_query(&self) -> Vec<(String, String)> {
300        let mut q: Vec<(String, String)> = vec![
301            ("altId".into(), self.alt_id.clone()),
302            ("altType".into(), self.alt_type.clone()),
303        ];
304        if let Some(v) = &self.limit {
305            q.push(("limit".into(), v.to_string()));
306        }
307        if let Some(v) = &self.offset {
308            q.push(("offset".into(), v.to_string()));
309        }
310        q
311    }
312}
313
314/// Query parameters for [`StoreService::delete_shipping_rate`].
315#[derive(Debug, Clone, Default)]
316pub struct DeleteShippingRateParams {
317    /// Location Id or Agency Id
318    /// Required by the API.
319    pub alt_id: String,
320    /// `altType` query parameter.
321    /// Allowed values: `location`.
322    /// Required by the API.
323    pub alt_type: String,
324}
325
326impl DeleteShippingRateParams {
327    /// Start from the parameters the API requires.
328    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
329        Self {
330            alt_id: alt_id.into(),
331            alt_type: alt_type.into(),
332        }
333    }
334
335    fn to_query(&self) -> Vec<(String, String)> {
336        let q: Vec<(String, String)> = vec![
337            ("altId".into(), self.alt_id.clone()),
338            ("altType".into(), self.alt_type.clone()),
339        ];
340        q
341    }
342}
343
344/// Query parameters for [`StoreService::get_shipping_rate`].
345#[derive(Debug, Clone, Default)]
346pub struct GetShippingRateParams {
347    /// Location Id or Agency Id
348    /// Required by the API.
349    pub alt_id: String,
350    /// `altType` query parameter.
351    /// Allowed values: `location`.
352    /// Required by the API.
353    pub alt_type: String,
354}
355
356impl GetShippingRateParams {
357    /// Start from the parameters the API requires.
358    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
359        Self {
360            alt_id: alt_id.into(),
361            alt_type: alt_type.into(),
362        }
363    }
364
365    fn to_query(&self) -> Vec<(String, String)> {
366        let q: Vec<(String, String)> = vec![
367            ("altId".into(), self.alt_id.clone()),
368            ("altType".into(), self.alt_type.clone()),
369        ];
370        q
371    }
372}
373
374/// Query parameters for [`StoreService::get_store_settings`].
375#[derive(Debug, Clone, Default)]
376pub struct GetStoreSettingsParams {
377    /// Location Id or Agency Id
378    /// Required by the API.
379    pub alt_id: String,
380    /// `altType` query parameter.
381    /// Allowed values: `location`.
382    /// Required by the API.
383    pub alt_type: String,
384}
385
386impl GetStoreSettingsParams {
387    /// Start from the parameters the API requires.
388    pub fn new(alt_id: impl Into<String>, alt_type: impl Into<String>) -> Self {
389        Self {
390            alt_id: alt_id.into(),
391            alt_type: alt_type.into(),
392        }
393    }
394
395    fn to_query(&self) -> Vec<(String, String)> {
396        let q: Vec<(String, String)> = vec![
397            ("altId".into(), self.alt_id.clone()),
398            ("altType".into(), self.alt_type.clone()),
399        ];
400        q
401    }
402}
403
404impl StoreService {
405    /// List Shipping Carriers
406    ///
407    /// The "List Shipping Carrier" API allows to retrieve a list of shipping carrier.
408    ///
409    /// `GET /store/shipping-carrier`
410    pub async fn list_shipping_carriers(
411        &self,
412        params: &ListShippingCarriersParams,
413    ) -> Result<models::ListShippingCarrierResponseDto> {
414        let query = params.to_query();
415        self.client
416            .send_versioned(
417                reqwest::Method::GET,
418                "/store/shipping-carrier",
419                &query,
420                None::<&()>,
421                None,
422            )
423            .await
424    }
425
426    /// Create Shipping Carrier
427    ///
428    /// The "Create Shipping Carrier" API allows adding a new shipping carrier.
429    ///
430    /// `POST /store/shipping-carrier`
431    pub async fn create_shipping_carrier(
432        &self,
433        body: &models::CreateShippingCarrierDto,
434    ) -> Result<models::CreateShippingCarrierResponseDto> {
435        let query = Vec::new();
436        self.client
437            .send_versioned(
438                reqwest::Method::POST,
439                "/store/shipping-carrier",
440                &query,
441                Some(body),
442                None,
443            )
444            .await
445    }
446
447    /// Delete shipping carrier
448    ///
449    /// Delete specific shipping carrier with Id :shippingCarrierId
450    ///
451    /// `DELETE /store/shipping-carrier/{shippingCarrierId}`
452    pub async fn delete_shipping_carrier(
453        &self,
454        shipping_carrier_id: &str,
455        params: &DeleteShippingCarrierParams,
456    ) -> Result<models::DeleteShippingCarrierResponseDto> {
457        let path = format!(
458            "/store/shipping-carrier/{}",
459            crate::services::encode(shipping_carrier_id)
460        );
461        let query = params.to_query();
462        self.client
463            .send_versioned(reqwest::Method::DELETE, &path, &query, None::<&()>, None)
464            .await
465    }
466
467    /// Get Shipping Carrier
468    ///
469    /// The "List Shipping Carrier" API allows to retrieve a paginated list of shipping
470    /// carrier.
471    ///
472    /// `GET /store/shipping-carrier/{shippingCarrierId}`
473    pub async fn get_shipping_carrier(
474        &self,
475        shipping_carrier_id: &str,
476        params: &GetShippingCarrierParams,
477    ) -> Result<models::GetShippingCarrierResponseDto> {
478        let path = format!(
479            "/store/shipping-carrier/{}",
480            crate::services::encode(shipping_carrier_id)
481        );
482        let query = params.to_query();
483        self.client
484            .send_versioned(reqwest::Method::GET, &path, &query, None::<&()>, None)
485            .await
486    }
487
488    /// Update Shipping Carrier
489    ///
490    /// The "update Shipping Carrier" API allows update a shipping carrier to the system.
491    ///
492    /// `PUT /store/shipping-carrier/{shippingCarrierId}`
493    pub async fn update_shipping_carrier(
494        &self,
495        shipping_carrier_id: &str,
496        body: &models::UpdateShippingCarrierDto,
497    ) -> Result<models::UpdateShippingCarrierResponseDto> {
498        let path = format!(
499            "/store/shipping-carrier/{}",
500            crate::services::encode(shipping_carrier_id)
501        );
502        let query = Vec::new();
503        self.client
504            .send_versioned(reqwest::Method::PUT, &path, &query, Some(body), None)
505            .await
506    }
507
508    /// List Shipping Zones
509    ///
510    /// The "List Shipping Zone" API allows to retrieve a list of shipping zone.
511    ///
512    /// `GET /store/shipping-zone`
513    pub async fn list_shipping_zones(
514        &self,
515        params: &ListShippingZonesParams,
516    ) -> Result<models::ListShippingZoneResponseDto> {
517        let query = params.to_query();
518        self.client
519            .send_versioned(
520                reqwest::Method::GET,
521                "/store/shipping-zone",
522                &query,
523                None::<&()>,
524                None,
525            )
526            .await
527    }
528
529    /// Create Shipping Zone
530    ///
531    /// The "Create Shipping Zone" API allows adding a new shipping zone.
532    ///
533    /// `POST /store/shipping-zone`
534    pub async fn create_shipping_zone(
535        &self,
536        body: &models::CreateShippingZoneDto,
537    ) -> Result<models::CreateShippingZoneResponseDto> {
538        let query = Vec::new();
539        self.client
540            .send_versioned(
541                reqwest::Method::POST,
542                "/store/shipping-zone",
543                &query,
544                Some(body),
545                None,
546            )
547            .await
548    }
549
550    /// Get available shipping rates
551    ///
552    /// This return available shipping rates for country based on order amount
553    ///
554    /// `POST /store/shipping-zone/shipping-rates`
555    pub async fn get_available_shipping_rates(
556        &self,
557        body: &models::GetAvailableShippingRates,
558    ) -> Result<models::GetAvailableShippingRatesResponseDto> {
559        let query = Vec::new();
560        self.client
561            .send_versioned(
562                reqwest::Method::POST,
563                "/store/shipping-zone/shipping-rates",
564                &query,
565                Some(body),
566                None,
567            )
568            .await
569    }
570
571    /// Delete shipping zone
572    ///
573    /// Delete specific shipping zone with Id :shippingZoneId
574    ///
575    /// `DELETE /store/shipping-zone/{shippingZoneId}`
576    pub async fn delete_shipping_zone(
577        &self,
578        shipping_zone_id: &str,
579        params: &DeleteShippingZoneParams,
580    ) -> Result<models::DeleteShippingZoneResponseDto> {
581        let path = format!(
582            "/store/shipping-zone/{}",
583            crate::services::encode(shipping_zone_id)
584        );
585        let query = params.to_query();
586        self.client
587            .send_versioned(reqwest::Method::DELETE, &path, &query, None::<&()>, None)
588            .await
589    }
590
591    /// Get Shipping Zone
592    ///
593    /// The "List Shipping Zone" API allows to retrieve a paginated list of shipping zone.
594    ///
595    /// `GET /store/shipping-zone/{shippingZoneId}`
596    pub async fn get_shipping_zone(
597        &self,
598        shipping_zone_id: &str,
599        params: &GetShippingZoneParams,
600    ) -> Result<models::GetShippingZoneResponseDto> {
601        let path = format!(
602            "/store/shipping-zone/{}",
603            crate::services::encode(shipping_zone_id)
604        );
605        let query = params.to_query();
606        self.client
607            .send_versioned(reqwest::Method::GET, &path, &query, None::<&()>, None)
608            .await
609    }
610
611    /// Update Shipping Zone
612    ///
613    /// The "update Shipping Zone" API allows update a shipping zone to the system.
614    ///
615    /// `PUT /store/shipping-zone/{shippingZoneId}`
616    pub async fn update_shipping_zone(
617        &self,
618        shipping_zone_id: &str,
619        body: &models::UpdateShippingZoneDto,
620    ) -> Result<models::UpdateShippingZoneResponseDto> {
621        let path = format!(
622            "/store/shipping-zone/{}",
623            crate::services::encode(shipping_zone_id)
624        );
625        let query = Vec::new();
626        self.client
627            .send_versioned(reqwest::Method::PUT, &path, &query, Some(body), None)
628            .await
629    }
630
631    /// List Shipping Rates
632    ///
633    /// The "List Shipping Rate" API allows to retrieve a list of shipping rate.
634    ///
635    /// `GET /store/shipping-zone/{shippingZoneId}/shipping-rate`
636    pub async fn list_shipping_rates(
637        &self,
638        shipping_zone_id: &str,
639        params: &ListShippingRatesParams,
640    ) -> Result<models::ListShippingRateResponseDto> {
641        let path = format!(
642            "/store/shipping-zone/{}/shipping-rate",
643            crate::services::encode(shipping_zone_id)
644        );
645        let query = params.to_query();
646        self.client
647            .send_versioned(reqwest::Method::GET, &path, &query, None::<&()>, None)
648            .await
649    }
650
651    /// Create Shipping Rate
652    ///
653    /// The "Create Shipping Rate" API allows adding a new shipping rate.
654    ///
655    /// `POST /store/shipping-zone/{shippingZoneId}/shipping-rate`
656    pub async fn create_shipping_rate(
657        &self,
658        shipping_zone_id: &str,
659        body: &models::CreateShippingRateDto,
660    ) -> Result<models::CreateShippingRateResponseDto> {
661        let path = format!(
662            "/store/shipping-zone/{}/shipping-rate",
663            crate::services::encode(shipping_zone_id)
664        );
665        let query = Vec::new();
666        self.client
667            .send_versioned(reqwest::Method::POST, &path, &query, Some(body), None)
668            .await
669    }
670
671    /// Delete shipping rate
672    ///
673    /// Delete specific shipping rate with Id :shippingRateId
674    ///
675    /// `DELETE /store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}`
676    pub async fn delete_shipping_rate(
677        &self,
678        shipping_zone_id: &str,
679        shipping_rate_id: &str,
680        params: &DeleteShippingRateParams,
681    ) -> Result<models::DeleteShippingRateResponseDto> {
682        let path = format!(
683            "/store/shipping-zone/{}/shipping-rate/{}",
684            crate::services::encode(shipping_zone_id),
685            crate::services::encode(shipping_rate_id)
686        );
687        let query = params.to_query();
688        self.client
689            .send_versioned(reqwest::Method::DELETE, &path, &query, None::<&()>, None)
690            .await
691    }
692
693    /// Get Shipping Rate
694    ///
695    /// The "List Shipping Rate" API allows to retrieve a paginated list of shipping rate.
696    ///
697    /// `GET /store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}`
698    pub async fn get_shipping_rate(
699        &self,
700        shipping_zone_id: &str,
701        shipping_rate_id: &str,
702        params: &GetShippingRateParams,
703    ) -> Result<models::GetShippingRateResponseDto> {
704        let path = format!(
705            "/store/shipping-zone/{}/shipping-rate/{}",
706            crate::services::encode(shipping_zone_id),
707            crate::services::encode(shipping_rate_id)
708        );
709        let query = params.to_query();
710        self.client
711            .send_versioned(reqwest::Method::GET, &path, &query, None::<&()>, None)
712            .await
713    }
714
715    /// Update Shipping Rate
716    ///
717    /// The "update Shipping Rate" API allows update a shipping rate to the system.
718    ///
719    /// `PUT /store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}`
720    pub async fn update_shipping_rate(
721        &self,
722        shipping_zone_id: &str,
723        shipping_rate_id: &str,
724        body: &models::UpdateShippingRateDto,
725    ) -> Result<models::UpdateShippingRateResponseDto> {
726        let path = format!(
727            "/store/shipping-zone/{}/shipping-rate/{}",
728            crate::services::encode(shipping_zone_id),
729            crate::services::encode(shipping_rate_id)
730        );
731        let query = Vec::new();
732        self.client
733            .send_versioned(reqwest::Method::PUT, &path, &query, Some(body), None)
734            .await
735    }
736
737    /// Get Store Settings
738    ///
739    /// Get store settings by altId and altType.
740    ///
741    /// `GET /store/store-setting`
742    pub async fn get_store_settings(
743        &self,
744        params: &GetStoreSettingsParams,
745    ) -> Result<models::GetStoreSettingResponseDto> {
746        let query = params.to_query();
747        self.client
748            .send_versioned(
749                reqwest::Method::GET,
750                "/store/store-setting",
751                &query,
752                None::<&()>,
753                None,
754            )
755            .await
756    }
757
758    /// Create/Update Store Settings
759    ///
760    /// Create or update store settings by altId and altType.
761    ///
762    /// `POST /store/store-setting`
763    pub async fn create_update_store_settings(
764        &self,
765        body: &models::CreateStoreSettingDto,
766    ) -> Result<models::CreateStoreSettingResponseDto> {
767        let query = Vec::new();
768        self.client
769            .send_versioned(
770                reqwest::Method::POST,
771                "/store/store-setting",
772                &query,
773                Some(body),
774                None,
775            )
776            .await
777    }
778}