1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum DeleteCommerceCollectionByCollectionidError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum DeleteCommerceDisclosureByDisclosureidError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum DeleteCommerceDiscountByDiscountidError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum DeleteCommerceMovieByMovieidError {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum DeleteCommerceNoteByNoteidError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum DeleteCommercePlansEntriesBySlugError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum DeleteCommerceProductByProductidError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum DeleteCommerceRatesEntriesByProductByMeterError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum DeleteCommerceReturnByReturnidError {
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteCommerceSaleschannelBySaleschannelidError {
85 UnknownValue(serde_json::Value),
86}
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum DeleteCommerceStocklocationByStocklocationidError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum DeleteCommerceStoreByStoreidError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum DeleteCommerceStoreByStoreidListingByKeyError {
106 UnknownValue(serde_json::Value),
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum DeleteCommerceSubmissionBySubmissionidError {
113 UnknownValue(serde_json::Value),
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum DeleteCommerceSubscriberBySubscriberidError {
120 UnknownValue(serde_json::Value),
121}
122
123#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum DeleteCommerceTokentransactionByTokentransactionidError {
127 UnknownValue(serde_json::Value),
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum DeleteCommerceTransferByTransferidError {
134 UnknownValue(serde_json::Value),
135}
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum DeleteCommerceVariantByVariantidError {
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum DeleteCommerceWalletByWalletidError {
148 UnknownValue(serde_json::Value),
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum DeleteCommerceWatchlistByWatchlistidError {
155 UnknownValue(serde_json::Value),
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum DeleteCommerceWebhookByWebhookidError {
162 UnknownValue(serde_json::Value),
163}
164
165#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum DiscardCartError {
169 UnknownValue(serde_json::Value),
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum GetCartError {
176 UnknownValue(serde_json::Value),
177}
178
179#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum GetCommerceAdminCatalogError {
183 UnknownValue(serde_json::Value),
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum GetCommerceCatalogError {
190 UnknownValue(serde_json::Value),
191}
192
193#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum GetCommerceCatalogEntriesError {
197 UnknownValue(serde_json::Value),
198}
199
200#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum GetCommerceCollectionError {
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetCommerceCollectionByCollectionidError {
211 UnknownValue(serde_json::Value),
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetCommerceCurrenciesError {
218 UnknownValue(serde_json::Value),
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetCommerceDepositsError {
225 UnknownValue(serde_json::Value),
226}
227
228#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GetCommerceDisclosureError {
232 UnknownValue(serde_json::Value),
233}
234
235#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum GetCommerceDisclosureByDisclosureidError {
239 UnknownValue(serde_json::Value),
240}
241
242#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum GetCommerceDiscountError {
246 UnknownValue(serde_json::Value),
247}
248
249#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum GetCommerceDiscountByDiscountidError {
253 UnknownValue(serde_json::Value),
254}
255
256#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum GetCommerceHealthError {
260 UnknownValue(serde_json::Value),
261}
262
263#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum GetCommerceMovieError {
267 UnknownValue(serde_json::Value),
268}
269
270#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetCommerceMovieByMovieidError {
274 UnknownValue(serde_json::Value),
275}
276
277#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum GetCommerceNoteError {
281 UnknownValue(serde_json::Value),
282}
283
284#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum GetCommerceNoteByNoteidError {
288 UnknownValue(serde_json::Value),
289}
290
291#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum GetCommerceOrgError {
295 UnknownValue(serde_json::Value),
296}
297
298#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum GetCommercePlansEntriesError {
302 UnknownValue(serde_json::Value),
303}
304
305#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum GetCommerceProductError {
309 UnknownValue(serde_json::Value),
310}
311
312#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum GetCommerceProductByProductidError {
316 UnknownValue(serde_json::Value),
317}
318
319#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum GetCommerceRatesEntriesError {
323 UnknownValue(serde_json::Value),
324}
325
326#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum GetCommerceReturnError {
330 UnknownValue(serde_json::Value),
331}
332
333#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum GetCommerceReturnByReturnidError {
337 UnknownValue(serde_json::Value),
338}
339
340#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum GetCommerceSaleschannelError {
344 UnknownValue(serde_json::Value),
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum GetCommerceSaleschannelBySaleschannelidError {
351 UnknownValue(serde_json::Value),
352}
353
354#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum GetCommerceStocklocationError {
358 UnknownValue(serde_json::Value),
359}
360
361#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum GetCommerceStocklocationByStocklocationidError {
365 UnknownValue(serde_json::Value),
366}
367
368#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum GetCommerceStoreError {
372 UnknownValue(serde_json::Value),
373}
374
375#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum GetCommerceStoreAccessError {
379 UnknownValue(serde_json::Value),
380}
381
382#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum GetCommerceStoreByStoreidError {
386 UnknownValue(serde_json::Value),
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum GetCommerceStoreByStoreidBundleByKeyError {
393 UnknownValue(serde_json::Value),
394}
395
396#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum GetCommerceStoreByStoreidListingError {
400 UnknownValue(serde_json::Value),
401}
402
403#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum GetCommerceStoreByStoreidListingByKeyError {
407 UnknownValue(serde_json::Value),
408}
409
410#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum GetCommerceStoreByStoreidProductByKeyError {
414 UnknownValue(serde_json::Value),
415}
416
417#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum GetCommerceStoreByStoreidVariantByKeyError {
421 UnknownValue(serde_json::Value),
422}
423
424#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum GetCommerceStoreCurrentError {
428 UnknownValue(serde_json::Value),
429}
430
431#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum GetCommerceSubmissionError {
435 UnknownValue(serde_json::Value),
436}
437
438#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum GetCommerceSubmissionBySubmissionidError {
442 UnknownValue(serde_json::Value),
443}
444
445#[derive(Debug, Clone, Serialize, Deserialize)]
447#[serde(untagged)]
448pub enum GetCommerceSubscriberError {
449 UnknownValue(serde_json::Value),
450}
451
452#[derive(Debug, Clone, Serialize, Deserialize)]
454#[serde(untagged)]
455pub enum GetCommerceSubscriberBySubscriberidError {
456 UnknownValue(serde_json::Value),
457}
458
459#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum GetCommerceTokentransactionError {
463 UnknownValue(serde_json::Value),
464}
465
466#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum GetCommerceTokentransactionByTokentransactionidError {
470 UnknownValue(serde_json::Value),
471}
472
473#[derive(Debug, Clone, Serialize, Deserialize)]
475#[serde(untagged)]
476pub enum GetCommerceTransferError {
477 UnknownValue(serde_json::Value),
478}
479
480#[derive(Debug, Clone, Serialize, Deserialize)]
482#[serde(untagged)]
483pub enum GetCommerceTransferByTransferidError {
484 UnknownValue(serde_json::Value),
485}
486
487#[derive(Debug, Clone, Serialize, Deserialize)]
489#[serde(untagged)]
490pub enum GetCommerceVariantError {
491 UnknownValue(serde_json::Value),
492}
493
494#[derive(Debug, Clone, Serialize, Deserialize)]
496#[serde(untagged)]
497pub enum GetCommerceVariantByVariantidError {
498 UnknownValue(serde_json::Value),
499}
500
501#[derive(Debug, Clone, Serialize, Deserialize)]
503#[serde(untagged)]
504pub enum GetCommerceWalletError {
505 UnknownValue(serde_json::Value),
506}
507
508#[derive(Debug, Clone, Serialize, Deserialize)]
510#[serde(untagged)]
511pub enum GetCommerceWalletByWalletidError {
512 UnknownValue(serde_json::Value),
513}
514
515#[derive(Debug, Clone, Serialize, Deserialize)]
517#[serde(untagged)]
518pub enum GetCommerceWatchlistError {
519 UnknownValue(serde_json::Value),
520}
521
522#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum GetCommerceWatchlistByWatchlistidError {
526 UnknownValue(serde_json::Value),
527}
528
529#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum GetCommerceWebhookError {
533 UnknownValue(serde_json::Value),
534}
535
536#[derive(Debug, Clone, Serialize, Deserialize)]
538#[serde(untagged)]
539pub enum GetCommerceWebhookByWebhookidError {
540 UnknownValue(serde_json::Value),
541}
542
543#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum GetPaymentError {
547 UnknownValue(serde_json::Value),
548}
549
550#[derive(Debug, Clone, Serialize, Deserialize)]
552#[serde(untagged)]
553pub enum OpenCartError {
554 UnknownValue(serde_json::Value),
555}
556
557#[derive(Debug, Clone, Serialize, Deserialize)]
559#[serde(untagged)]
560pub enum PatchCommerceCollectionByCollectionidError {
561 UnknownValue(serde_json::Value),
562}
563
564#[derive(Debug, Clone, Serialize, Deserialize)]
566#[serde(untagged)]
567pub enum PatchCommerceDisclosureByDisclosureidError {
568 UnknownValue(serde_json::Value),
569}
570
571#[derive(Debug, Clone, Serialize, Deserialize)]
573#[serde(untagged)]
574pub enum PatchCommerceDiscountByDiscountidError {
575 UnknownValue(serde_json::Value),
576}
577
578#[derive(Debug, Clone, Serialize, Deserialize)]
580#[serde(untagged)]
581pub enum PatchCommerceMovieByMovieidError {
582 UnknownValue(serde_json::Value),
583}
584
585#[derive(Debug, Clone, Serialize, Deserialize)]
587#[serde(untagged)]
588pub enum PatchCommerceNoteByNoteidError {
589 UnknownValue(serde_json::Value),
590}
591
592#[derive(Debug, Clone, Serialize, Deserialize)]
594#[serde(untagged)]
595pub enum PatchCommerceProductByProductidError {
596 UnknownValue(serde_json::Value),
597}
598
599#[derive(Debug, Clone, Serialize, Deserialize)]
601#[serde(untagged)]
602pub enum PatchCommerceReturnByReturnidError {
603 UnknownValue(serde_json::Value),
604}
605
606#[derive(Debug, Clone, Serialize, Deserialize)]
608#[serde(untagged)]
609pub enum PatchCommerceSaleschannelBySaleschannelidError {
610 UnknownValue(serde_json::Value),
611}
612
613#[derive(Debug, Clone, Serialize, Deserialize)]
615#[serde(untagged)]
616pub enum PatchCommerceStocklocationByStocklocationidError {
617 UnknownValue(serde_json::Value),
618}
619
620#[derive(Debug, Clone, Serialize, Deserialize)]
622#[serde(untagged)]
623pub enum PatchCommerceStoreByStoreidError {
624 UnknownValue(serde_json::Value),
625}
626
627#[derive(Debug, Clone, Serialize, Deserialize)]
629#[serde(untagged)]
630pub enum PatchCommerceStoreByStoreidListingByKeyError {
631 UnknownValue(serde_json::Value),
632}
633
634#[derive(Debug, Clone, Serialize, Deserialize)]
636#[serde(untagged)]
637pub enum PatchCommerceSubmissionBySubmissionidError {
638 UnknownValue(serde_json::Value),
639}
640
641#[derive(Debug, Clone, Serialize, Deserialize)]
643#[serde(untagged)]
644pub enum PatchCommerceSubscriberBySubscriberidError {
645 UnknownValue(serde_json::Value),
646}
647
648#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum PatchCommerceTokentransactionByTokentransactionidError {
652 UnknownValue(serde_json::Value),
653}
654
655#[derive(Debug, Clone, Serialize, Deserialize)]
657#[serde(untagged)]
658pub enum PatchCommerceTransferByTransferidError {
659 UnknownValue(serde_json::Value),
660}
661
662#[derive(Debug, Clone, Serialize, Deserialize)]
664#[serde(untagged)]
665pub enum PatchCommerceVariantByVariantidError {
666 UnknownValue(serde_json::Value),
667}
668
669#[derive(Debug, Clone, Serialize, Deserialize)]
671#[serde(untagged)]
672pub enum PatchCommerceWalletByWalletidError {
673 UnknownValue(serde_json::Value),
674}
675
676#[derive(Debug, Clone, Serialize, Deserialize)]
678#[serde(untagged)]
679pub enum PatchCommerceWatchlistByWatchlistidError {
680 UnknownValue(serde_json::Value),
681}
682
683#[derive(Debug, Clone, Serialize, Deserialize)]
685#[serde(untagged)]
686pub enum PatchCommerceWebhookByWebhookidError {
687 UnknownValue(serde_json::Value),
688}
689
690#[derive(Debug, Clone, Serialize, Deserialize)]
692#[serde(untagged)]
693pub enum PostCommerceCatalogEntriesError {
694 UnknownValue(serde_json::Value),
695}
696
697#[derive(Debug, Clone, Serialize, Deserialize)]
699#[serde(untagged)]
700pub enum PostCommerceCatalogModelsError {
701 UnknownValue(serde_json::Value),
702}
703
704#[derive(Debug, Clone, Serialize, Deserialize)]
706#[serde(untagged)]
707pub enum PostCommerceCatalogModelsRefreshError {
708 UnknownValue(serde_json::Value),
709}
710
711#[derive(Debug, Clone, Serialize, Deserialize)]
713#[serde(untagged)]
714pub enum PostCommerceCatalogSeedError {
715 UnknownValue(serde_json::Value),
716}
717
718#[derive(Debug, Clone, Serialize, Deserialize)]
720#[serde(untagged)]
721pub enum PostCommerceCollectionError {
722 UnknownValue(serde_json::Value),
723}
724
725#[derive(Debug, Clone, Serialize, Deserialize)]
727#[serde(untagged)]
728pub enum PostCommerceCollectionByCollectionidError {
729 UnknownValue(serde_json::Value),
730}
731
732#[derive(Debug, Clone, Serialize, Deserialize)]
734#[serde(untagged)]
735pub enum PostCommerceDisclosureError {
736 UnknownValue(serde_json::Value),
737}
738
739#[derive(Debug, Clone, Serialize, Deserialize)]
741#[serde(untagged)]
742pub enum PostCommerceDisclosureByDisclosureidError {
743 UnknownValue(serde_json::Value),
744}
745
746#[derive(Debug, Clone, Serialize, Deserialize)]
748#[serde(untagged)]
749pub enum PostCommerceDiscountError {
750 UnknownValue(serde_json::Value),
751}
752
753#[derive(Debug, Clone, Serialize, Deserialize)]
755#[serde(untagged)]
756pub enum PostCommerceDiscountByDiscountidError {
757 UnknownValue(serde_json::Value),
758}
759
760#[derive(Debug, Clone, Serialize, Deserialize)]
762#[serde(untagged)]
763pub enum PostCommerceMovieError {
764 UnknownValue(serde_json::Value),
765}
766
767#[derive(Debug, Clone, Serialize, Deserialize)]
769#[serde(untagged)]
770pub enum PostCommerceMovieByMovieidError {
771 UnknownValue(serde_json::Value),
772}
773
774#[derive(Debug, Clone, Serialize, Deserialize)]
776#[serde(untagged)]
777pub enum PostCommerceNoteError {
778 UnknownValue(serde_json::Value),
779}
780
781#[derive(Debug, Clone, Serialize, Deserialize)]
783#[serde(untagged)]
784pub enum PostCommerceNoteByNoteidError {
785 UnknownValue(serde_json::Value),
786}
787
788#[derive(Debug, Clone, Serialize, Deserialize)]
790#[serde(untagged)]
791pub enum PostCommercePlansEntriesError {
792 UnknownValue(serde_json::Value),
793}
794
795#[derive(Debug, Clone, Serialize, Deserialize)]
797#[serde(untagged)]
798pub enum PostCommercePlansSeedError {
799 UnknownValue(serde_json::Value),
800}
801
802#[derive(Debug, Clone, Serialize, Deserialize)]
804#[serde(untagged)]
805pub enum PostCommerceProductError {
806 UnknownValue(serde_json::Value),
807}
808
809#[derive(Debug, Clone, Serialize, Deserialize)]
811#[serde(untagged)]
812pub enum PostCommerceProductByProductidError {
813 UnknownValue(serde_json::Value),
814}
815
816#[derive(Debug, Clone, Serialize, Deserialize)]
818#[serde(untagged)]
819pub enum PostCommerceRatesEntriesError {
820 UnknownValue(serde_json::Value),
821}
822
823#[derive(Debug, Clone, Serialize, Deserialize)]
825#[serde(untagged)]
826pub enum PostCommerceRatesImportError {
827 UnknownValue(serde_json::Value),
828}
829
830#[derive(Debug, Clone, Serialize, Deserialize)]
832#[serde(untagged)]
833pub enum PostCommerceReturnError {
834 UnknownValue(serde_json::Value),
835}
836
837#[derive(Debug, Clone, Serialize, Deserialize)]
839#[serde(untagged)]
840pub enum PostCommerceReturnByReturnidError {
841 UnknownValue(serde_json::Value),
842}
843
844#[derive(Debug, Clone, Serialize, Deserialize)]
846#[serde(untagged)]
847pub enum PostCommerceSaleschannelError {
848 UnknownValue(serde_json::Value),
849}
850
851#[derive(Debug, Clone, Serialize, Deserialize)]
853#[serde(untagged)]
854pub enum PostCommerceSaleschannelBySaleschannelidError {
855 UnknownValue(serde_json::Value),
856}
857
858#[derive(Debug, Clone, Serialize, Deserialize)]
860#[serde(untagged)]
861pub enum PostCommerceStocklocationError {
862 UnknownValue(serde_json::Value),
863}
864
865#[derive(Debug, Clone, Serialize, Deserialize)]
867#[serde(untagged)]
868pub enum PostCommerceStocklocationByStocklocationidError {
869 UnknownValue(serde_json::Value),
870}
871
872#[derive(Debug, Clone, Serialize, Deserialize)]
874#[serde(untagged)]
875pub enum PostCommerceStoreError {
876 UnknownValue(serde_json::Value),
877}
878
879#[derive(Debug, Clone, Serialize, Deserialize)]
881#[serde(untagged)]
882pub enum PostCommerceStoreByStoreidError {
883 UnknownValue(serde_json::Value),
884}
885
886#[derive(Debug, Clone, Serialize, Deserialize)]
888#[serde(untagged)]
889pub enum PostCommerceStoreByStoreidAuthorizeError {
890 UnknownValue(serde_json::Value),
891}
892
893#[derive(Debug, Clone, Serialize, Deserialize)]
895#[serde(untagged)]
896pub enum PostCommerceStoreByStoreidAuthorizeByOrderidError {
897 UnknownValue(serde_json::Value),
898}
899
900#[derive(Debug, Clone, Serialize, Deserialize)]
902#[serde(untagged)]
903pub enum PostCommerceStoreByStoreidCaptureByOrderidError {
904 UnknownValue(serde_json::Value),
905}
906
907#[derive(Debug, Clone, Serialize, Deserialize)]
909#[serde(untagged)]
910pub enum PostCommerceStoreByStoreidChargeError {
911 UnknownValue(serde_json::Value),
912}
913
914#[derive(Debug, Clone, Serialize, Deserialize)]
916#[serde(untagged)]
917pub enum PostCommerceStoreByStoreidCheckoutAuthorizeError {
918 UnknownValue(serde_json::Value),
919}
920
921#[derive(Debug, Clone, Serialize, Deserialize)]
923#[serde(untagged)]
924pub enum PostCommerceStoreByStoreidCheckoutAuthorizeByOrderidError {
925 UnknownValue(serde_json::Value),
926}
927
928#[derive(Debug, Clone, Serialize, Deserialize)]
930#[serde(untagged)]
931pub enum PostCommerceStoreByStoreidCheckoutCaptureByOrderidError {
932 UnknownValue(serde_json::Value),
933}
934
935#[derive(Debug, Clone, Serialize, Deserialize)]
937#[serde(untagged)]
938pub enum PostCommerceStoreByStoreidCheckoutChargeError {
939 UnknownValue(serde_json::Value),
940}
941
942#[derive(Debug, Clone, Serialize, Deserialize)]
944#[serde(untagged)]
945pub enum PostCommerceStoreByStoreidCheckoutPaypalCancelByPaykeyError {
946 UnknownValue(serde_json::Value),
947}
948
949#[derive(Debug, Clone, Serialize, Deserialize)]
951#[serde(untagged)]
952pub enum PostCommerceStoreByStoreidCheckoutPaypalConfirmByPaykeyError {
953 UnknownValue(serde_json::Value),
954}
955
956#[derive(Debug, Clone, Serialize, Deserialize)]
958#[serde(untagged)]
959pub enum PostCommerceStoreByStoreidCheckoutPaypalPayError {
960 UnknownValue(serde_json::Value),
961}
962
963#[derive(Debug, Clone, Serialize, Deserialize)]
965#[serde(untagged)]
966pub enum PostCommerceStoreByStoreidListingByKeyError {
967 UnknownValue(serde_json::Value),
968}
969
970#[derive(Debug, Clone, Serialize, Deserialize)]
972#[serde(untagged)]
973pub enum PostCommerceStoreByStoreidPaypalCancelByPaykeyError {
974 UnknownValue(serde_json::Value),
975}
976
977#[derive(Debug, Clone, Serialize, Deserialize)]
979#[serde(untagged)]
980pub enum PostCommerceStoreByStoreidPaypalConfirmByPaykeyError {
981 UnknownValue(serde_json::Value),
982}
983
984#[derive(Debug, Clone, Serialize, Deserialize)]
986#[serde(untagged)]
987pub enum PostCommerceStoreByStoreidPaypalPayError {
988 UnknownValue(serde_json::Value),
989}
990
991#[derive(Debug, Clone, Serialize, Deserialize)]
993#[serde(untagged)]
994pub enum PostCommerceStoreByStoreidTrialError {
995 UnknownValue(serde_json::Value),
996}
997
998#[derive(Debug, Clone, Serialize, Deserialize)]
1000#[serde(untagged)]
1001pub enum PostCommerceStoreTokenError {
1002 UnknownValue(serde_json::Value),
1003}
1004
1005#[derive(Debug, Clone, Serialize, Deserialize)]
1007#[serde(untagged)]
1008pub enum PostCommerceSubmissionError {
1009 UnknownValue(serde_json::Value),
1010}
1011
1012#[derive(Debug, Clone, Serialize, Deserialize)]
1014#[serde(untagged)]
1015pub enum PostCommerceSubmissionBySubmissionidError {
1016 UnknownValue(serde_json::Value),
1017}
1018
1019#[derive(Debug, Clone, Serialize, Deserialize)]
1021#[serde(untagged)]
1022pub enum PostCommerceSubscriberError {
1023 UnknownValue(serde_json::Value),
1024}
1025
1026#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum PostCommerceSubscriberBySubscriberidError {
1030 UnknownValue(serde_json::Value),
1031}
1032
1033#[derive(Debug, Clone, Serialize, Deserialize)]
1035#[serde(untagged)]
1036pub enum PostCommerceTokentransactionError {
1037 UnknownValue(serde_json::Value),
1038}
1039
1040#[derive(Debug, Clone, Serialize, Deserialize)]
1042#[serde(untagged)]
1043pub enum PostCommerceTokentransactionByTokentransactionidError {
1044 UnknownValue(serde_json::Value),
1045}
1046
1047#[derive(Debug, Clone, Serialize, Deserialize)]
1049#[serde(untagged)]
1050pub enum PostCommerceTransferError {
1051 UnknownValue(serde_json::Value),
1052}
1053
1054#[derive(Debug, Clone, Serialize, Deserialize)]
1056#[serde(untagged)]
1057pub enum PostCommerceTransferByTransferidError {
1058 UnknownValue(serde_json::Value),
1059}
1060
1061#[derive(Debug, Clone, Serialize, Deserialize)]
1063#[serde(untagged)]
1064pub enum PostCommerceVariantError {
1065 UnknownValue(serde_json::Value),
1066}
1067
1068#[derive(Debug, Clone, Serialize, Deserialize)]
1070#[serde(untagged)]
1071pub enum PostCommerceVariantByVariantidError {
1072 UnknownValue(serde_json::Value),
1073}
1074
1075#[derive(Debug, Clone, Serialize, Deserialize)]
1077#[serde(untagged)]
1078pub enum PostCommerceWalletError {
1079 UnknownValue(serde_json::Value),
1080}
1081
1082#[derive(Debug, Clone, Serialize, Deserialize)]
1084#[serde(untagged)]
1085pub enum PostCommerceWalletByWalletidError {
1086 UnknownValue(serde_json::Value),
1087}
1088
1089#[derive(Debug, Clone, Serialize, Deserialize)]
1091#[serde(untagged)]
1092pub enum PostCommerceWatchlistError {
1093 UnknownValue(serde_json::Value),
1094}
1095
1096#[derive(Debug, Clone, Serialize, Deserialize)]
1098#[serde(untagged)]
1099pub enum PostCommerceWatchlistByWatchlistidError {
1100 UnknownValue(serde_json::Value),
1101}
1102
1103#[derive(Debug, Clone, Serialize, Deserialize)]
1105#[serde(untagged)]
1106pub enum PostCommerceWebhookError {
1107 UnknownValue(serde_json::Value),
1108}
1109
1110#[derive(Debug, Clone, Serialize, Deserialize)]
1112#[serde(untagged)]
1113pub enum PostCommerceWebhookByWebhookidError {
1114 UnknownValue(serde_json::Value),
1115}
1116
1117#[derive(Debug, Clone, Serialize, Deserialize)]
1119#[serde(untagged)]
1120pub enum PostCommerceWebhooksByProviderError {
1121 UnknownValue(serde_json::Value),
1122}
1123
1124#[derive(Debug, Clone, Serialize, Deserialize)]
1126#[serde(untagged)]
1127pub enum PutCommerceCollectionByCollectionidError {
1128 UnknownValue(serde_json::Value),
1129}
1130
1131#[derive(Debug, Clone, Serialize, Deserialize)]
1133#[serde(untagged)]
1134pub enum PutCommerceDisclosureByDisclosureidError {
1135 UnknownValue(serde_json::Value),
1136}
1137
1138#[derive(Debug, Clone, Serialize, Deserialize)]
1140#[serde(untagged)]
1141pub enum PutCommerceDiscountByDiscountidError {
1142 UnknownValue(serde_json::Value),
1143}
1144
1145#[derive(Debug, Clone, Serialize, Deserialize)]
1147#[serde(untagged)]
1148pub enum PutCommerceMovieByMovieidError {
1149 UnknownValue(serde_json::Value),
1150}
1151
1152#[derive(Debug, Clone, Serialize, Deserialize)]
1154#[serde(untagged)]
1155pub enum PutCommerceNoteByNoteidError {
1156 UnknownValue(serde_json::Value),
1157}
1158
1159#[derive(Debug, Clone, Serialize, Deserialize)]
1161#[serde(untagged)]
1162pub enum PutCommercePlansEntriesBySlugError {
1163 UnknownValue(serde_json::Value),
1164}
1165
1166#[derive(Debug, Clone, Serialize, Deserialize)]
1168#[serde(untagged)]
1169pub enum PutCommerceProductByProductidError {
1170 UnknownValue(serde_json::Value),
1171}
1172
1173#[derive(Debug, Clone, Serialize, Deserialize)]
1175#[serde(untagged)]
1176pub enum PutCommerceRatesEntriesByProductByMeterError {
1177 UnknownValue(serde_json::Value),
1178}
1179
1180#[derive(Debug, Clone, Serialize, Deserialize)]
1182#[serde(untagged)]
1183pub enum PutCommerceReturnByReturnidError {
1184 UnknownValue(serde_json::Value),
1185}
1186
1187#[derive(Debug, Clone, Serialize, Deserialize)]
1189#[serde(untagged)]
1190pub enum PutCommerceSaleschannelBySaleschannelidError {
1191 UnknownValue(serde_json::Value),
1192}
1193
1194#[derive(Debug, Clone, Serialize, Deserialize)]
1196#[serde(untagged)]
1197pub enum PutCommerceStocklocationByStocklocationidError {
1198 UnknownValue(serde_json::Value),
1199}
1200
1201#[derive(Debug, Clone, Serialize, Deserialize)]
1203#[serde(untagged)]
1204pub enum PutCommerceStoreByStoreidError {
1205 UnknownValue(serde_json::Value),
1206}
1207
1208#[derive(Debug, Clone, Serialize, Deserialize)]
1210#[serde(untagged)]
1211pub enum PutCommerceStoreByStoreidListingByKeyError {
1212 UnknownValue(serde_json::Value),
1213}
1214
1215#[derive(Debug, Clone, Serialize, Deserialize)]
1217#[serde(untagged)]
1218pub enum PutCommerceSubmissionBySubmissionidError {
1219 UnknownValue(serde_json::Value),
1220}
1221
1222#[derive(Debug, Clone, Serialize, Deserialize)]
1224#[serde(untagged)]
1225pub enum PutCommerceSubscriberBySubscriberidError {
1226 UnknownValue(serde_json::Value),
1227}
1228
1229#[derive(Debug, Clone, Serialize, Deserialize)]
1231#[serde(untagged)]
1232pub enum PutCommerceTokentransactionByTokentransactionidError {
1233 UnknownValue(serde_json::Value),
1234}
1235
1236#[derive(Debug, Clone, Serialize, Deserialize)]
1238#[serde(untagged)]
1239pub enum PutCommerceTransferByTransferidError {
1240 UnknownValue(serde_json::Value),
1241}
1242
1243#[derive(Debug, Clone, Serialize, Deserialize)]
1245#[serde(untagged)]
1246pub enum PutCommerceVariantByVariantidError {
1247 UnknownValue(serde_json::Value),
1248}
1249
1250#[derive(Debug, Clone, Serialize, Deserialize)]
1252#[serde(untagged)]
1253pub enum PutCommerceWalletByWalletidError {
1254 UnknownValue(serde_json::Value),
1255}
1256
1257#[derive(Debug, Clone, Serialize, Deserialize)]
1259#[serde(untagged)]
1260pub enum PutCommerceWatchlistByWatchlistidError {
1261 UnknownValue(serde_json::Value),
1262}
1263
1264#[derive(Debug, Clone, Serialize, Deserialize)]
1266#[serde(untagged)]
1267pub enum PutCommerceWebhookByWebhookidError {
1268 UnknownValue(serde_json::Value),
1269}
1270
1271#[derive(Debug, Clone, Serialize, Deserialize)]
1273#[serde(untagged)]
1274pub enum SetCartItemError {
1275 UnknownValue(serde_json::Value),
1276}
1277
1278#[derive(Debug, Clone, Serialize, Deserialize)]
1280#[serde(untagged)]
1281pub enum TakePaymentError {
1282 UnknownValue(serde_json::Value),
1283}
1284
1285
1286pub async fn delete_commerce_collection_by_collectionid(configuration: &configuration::Configuration, collectionid: &str) -> Result<(), Error<DeleteCommerceCollectionByCollectionidError>> {
1288 let p_collectionid = collectionid;
1290
1291 let uri_str = format!("{}/v1/commerce/collection/{collectionid}", configuration.base_path, collectionid=crate::apis::urlencode(p_collectionid));
1292 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1293
1294 if let Some(ref user_agent) = configuration.user_agent {
1295 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1296 }
1297 if let Some(ref token) = configuration.bearer_access_token {
1298 req_builder = req_builder.bearer_auth(token.to_owned());
1299 };
1300
1301 let req = req_builder.build()?;
1302 let resp = configuration.client.execute(req).await?;
1303
1304 let status = resp.status();
1305
1306 if !status.is_client_error() && !status.is_server_error() {
1307 Ok(())
1308 } else {
1309 let content = resp.text().await?;
1310 let entity: Option<DeleteCommerceCollectionByCollectionidError> = serde_json::from_str(&content).ok();
1311 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1312 }
1313}
1314
1315pub async fn delete_commerce_disclosure_by_disclosureid(configuration: &configuration::Configuration, disclosureid: &str) -> Result<(), Error<DeleteCommerceDisclosureByDisclosureidError>> {
1317 let p_disclosureid = disclosureid;
1319
1320 let uri_str = format!("{}/v1/commerce/disclosure/{disclosureid}", configuration.base_path, disclosureid=crate::apis::urlencode(p_disclosureid));
1321 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1322
1323 if let Some(ref user_agent) = configuration.user_agent {
1324 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1325 }
1326 if let Some(ref token) = configuration.bearer_access_token {
1327 req_builder = req_builder.bearer_auth(token.to_owned());
1328 };
1329
1330 let req = req_builder.build()?;
1331 let resp = configuration.client.execute(req).await?;
1332
1333 let status = resp.status();
1334
1335 if !status.is_client_error() && !status.is_server_error() {
1336 Ok(())
1337 } else {
1338 let content = resp.text().await?;
1339 let entity: Option<DeleteCommerceDisclosureByDisclosureidError> = serde_json::from_str(&content).ok();
1340 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1341 }
1342}
1343
1344pub async fn delete_commerce_discount_by_discountid(configuration: &configuration::Configuration, discountid: &str) -> Result<(), Error<DeleteCommerceDiscountByDiscountidError>> {
1346 let p_discountid = discountid;
1348
1349 let uri_str = format!("{}/v1/commerce/discount/{discountid}", configuration.base_path, discountid=crate::apis::urlencode(p_discountid));
1350 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1351
1352 if let Some(ref user_agent) = configuration.user_agent {
1353 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1354 }
1355 if let Some(ref token) = configuration.bearer_access_token {
1356 req_builder = req_builder.bearer_auth(token.to_owned());
1357 };
1358
1359 let req = req_builder.build()?;
1360 let resp = configuration.client.execute(req).await?;
1361
1362 let status = resp.status();
1363
1364 if !status.is_client_error() && !status.is_server_error() {
1365 Ok(())
1366 } else {
1367 let content = resp.text().await?;
1368 let entity: Option<DeleteCommerceDiscountByDiscountidError> = serde_json::from_str(&content).ok();
1369 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1370 }
1371}
1372
1373pub async fn delete_commerce_movie_by_movieid(configuration: &configuration::Configuration, movieid: &str) -> Result<(), Error<DeleteCommerceMovieByMovieidError>> {
1375 let p_movieid = movieid;
1377
1378 let uri_str = format!("{}/v1/commerce/movie/{movieid}", configuration.base_path, movieid=crate::apis::urlencode(p_movieid));
1379 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1380
1381 if let Some(ref user_agent) = configuration.user_agent {
1382 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1383 }
1384 if let Some(ref token) = configuration.bearer_access_token {
1385 req_builder = req_builder.bearer_auth(token.to_owned());
1386 };
1387
1388 let req = req_builder.build()?;
1389 let resp = configuration.client.execute(req).await?;
1390
1391 let status = resp.status();
1392
1393 if !status.is_client_error() && !status.is_server_error() {
1394 Ok(())
1395 } else {
1396 let content = resp.text().await?;
1397 let entity: Option<DeleteCommerceMovieByMovieidError> = serde_json::from_str(&content).ok();
1398 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1399 }
1400}
1401
1402pub async fn delete_commerce_note_by_noteid(configuration: &configuration::Configuration, noteid: &str) -> Result<(), Error<DeleteCommerceNoteByNoteidError>> {
1404 let p_noteid = noteid;
1406
1407 let uri_str = format!("{}/v1/commerce/note/{noteid}", configuration.base_path, noteid=crate::apis::urlencode(p_noteid));
1408 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1409
1410 if let Some(ref user_agent) = configuration.user_agent {
1411 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1412 }
1413 if let Some(ref token) = configuration.bearer_access_token {
1414 req_builder = req_builder.bearer_auth(token.to_owned());
1415 };
1416
1417 let req = req_builder.build()?;
1418 let resp = configuration.client.execute(req).await?;
1419
1420 let status = resp.status();
1421
1422 if !status.is_client_error() && !status.is_server_error() {
1423 Ok(())
1424 } else {
1425 let content = resp.text().await?;
1426 let entity: Option<DeleteCommerceNoteByNoteidError> = serde_json::from_str(&content).ok();
1427 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1428 }
1429}
1430
1431pub async fn delete_commerce_plans_entries_by_slug(configuration: &configuration::Configuration, slug: &str) -> Result<(), Error<DeleteCommercePlansEntriesBySlugError>> {
1433 let p_slug = slug;
1435
1436 let uri_str = format!("{}/v1/commerce/plans/entries/{slug}", configuration.base_path, slug=crate::apis::urlencode(p_slug));
1437 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1438
1439 if let Some(ref user_agent) = configuration.user_agent {
1440 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1441 }
1442 if let Some(ref token) = configuration.bearer_access_token {
1443 req_builder = req_builder.bearer_auth(token.to_owned());
1444 };
1445
1446 let req = req_builder.build()?;
1447 let resp = configuration.client.execute(req).await?;
1448
1449 let status = resp.status();
1450
1451 if !status.is_client_error() && !status.is_server_error() {
1452 Ok(())
1453 } else {
1454 let content = resp.text().await?;
1455 let entity: Option<DeleteCommercePlansEntriesBySlugError> = serde_json::from_str(&content).ok();
1456 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1457 }
1458}
1459
1460pub async fn delete_commerce_product_by_productid(configuration: &configuration::Configuration, productid: &str) -> Result<(), Error<DeleteCommerceProductByProductidError>> {
1462 let p_productid = productid;
1464
1465 let uri_str = format!("{}/v1/commerce/product/{productid}", configuration.base_path, productid=crate::apis::urlencode(p_productid));
1466 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1467
1468 if let Some(ref user_agent) = configuration.user_agent {
1469 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1470 }
1471 if let Some(ref token) = configuration.bearer_access_token {
1472 req_builder = req_builder.bearer_auth(token.to_owned());
1473 };
1474
1475 let req = req_builder.build()?;
1476 let resp = configuration.client.execute(req).await?;
1477
1478 let status = resp.status();
1479
1480 if !status.is_client_error() && !status.is_server_error() {
1481 Ok(())
1482 } else {
1483 let content = resp.text().await?;
1484 let entity: Option<DeleteCommerceProductByProductidError> = serde_json::from_str(&content).ok();
1485 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1486 }
1487}
1488
1489pub async fn delete_commerce_rates_entries_by_product_by_meter(configuration: &configuration::Configuration, product: &str, meter: &str) -> Result<(), Error<DeleteCommerceRatesEntriesByProductByMeterError>> {
1491 let p_product = product;
1493 let p_meter = meter;
1494
1495 let uri_str = format!("{}/v1/commerce/rates/entries/{product}/{meter}", configuration.base_path, product=crate::apis::urlencode(p_product), meter=crate::apis::urlencode(p_meter));
1496 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1497
1498 if let Some(ref user_agent) = configuration.user_agent {
1499 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1500 }
1501 if let Some(ref token) = configuration.bearer_access_token {
1502 req_builder = req_builder.bearer_auth(token.to_owned());
1503 };
1504
1505 let req = req_builder.build()?;
1506 let resp = configuration.client.execute(req).await?;
1507
1508 let status = resp.status();
1509
1510 if !status.is_client_error() && !status.is_server_error() {
1511 Ok(())
1512 } else {
1513 let content = resp.text().await?;
1514 let entity: Option<DeleteCommerceRatesEntriesByProductByMeterError> = serde_json::from_str(&content).ok();
1515 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1516 }
1517}
1518
1519pub async fn delete_commerce_return_by_returnid(configuration: &configuration::Configuration, returnid: &str) -> Result<(), Error<DeleteCommerceReturnByReturnidError>> {
1521 let p_returnid = returnid;
1523
1524 let uri_str = format!("{}/v1/commerce/return/{returnid}", configuration.base_path, returnid=crate::apis::urlencode(p_returnid));
1525 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1526
1527 if let Some(ref user_agent) = configuration.user_agent {
1528 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1529 }
1530 if let Some(ref token) = configuration.bearer_access_token {
1531 req_builder = req_builder.bearer_auth(token.to_owned());
1532 };
1533
1534 let req = req_builder.build()?;
1535 let resp = configuration.client.execute(req).await?;
1536
1537 let status = resp.status();
1538
1539 if !status.is_client_error() && !status.is_server_error() {
1540 Ok(())
1541 } else {
1542 let content = resp.text().await?;
1543 let entity: Option<DeleteCommerceReturnByReturnidError> = serde_json::from_str(&content).ok();
1544 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1545 }
1546}
1547
1548pub async fn delete_commerce_saleschannel_by_saleschannelid(configuration: &configuration::Configuration, saleschannelid: &str) -> Result<(), Error<DeleteCommerceSaleschannelBySaleschannelidError>> {
1550 let p_saleschannelid = saleschannelid;
1552
1553 let uri_str = format!("{}/v1/commerce/saleschannel/{saleschannelid}", configuration.base_path, saleschannelid=crate::apis::urlencode(p_saleschannelid));
1554 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1555
1556 if let Some(ref user_agent) = configuration.user_agent {
1557 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1558 }
1559 if let Some(ref token) = configuration.bearer_access_token {
1560 req_builder = req_builder.bearer_auth(token.to_owned());
1561 };
1562
1563 let req = req_builder.build()?;
1564 let resp = configuration.client.execute(req).await?;
1565
1566 let status = resp.status();
1567
1568 if !status.is_client_error() && !status.is_server_error() {
1569 Ok(())
1570 } else {
1571 let content = resp.text().await?;
1572 let entity: Option<DeleteCommerceSaleschannelBySaleschannelidError> = serde_json::from_str(&content).ok();
1573 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1574 }
1575}
1576
1577pub async fn delete_commerce_stocklocation_by_stocklocationid(configuration: &configuration::Configuration, stocklocationid: &str) -> Result<(), Error<DeleteCommerceStocklocationByStocklocationidError>> {
1579 let p_stocklocationid = stocklocationid;
1581
1582 let uri_str = format!("{}/v1/commerce/stocklocation/{stocklocationid}", configuration.base_path, stocklocationid=crate::apis::urlencode(p_stocklocationid));
1583 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1584
1585 if let Some(ref user_agent) = configuration.user_agent {
1586 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1587 }
1588 if let Some(ref token) = configuration.bearer_access_token {
1589 req_builder = req_builder.bearer_auth(token.to_owned());
1590 };
1591
1592 let req = req_builder.build()?;
1593 let resp = configuration.client.execute(req).await?;
1594
1595 let status = resp.status();
1596
1597 if !status.is_client_error() && !status.is_server_error() {
1598 Ok(())
1599 } else {
1600 let content = resp.text().await?;
1601 let entity: Option<DeleteCommerceStocklocationByStocklocationidError> = serde_json::from_str(&content).ok();
1602 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1603 }
1604}
1605
1606pub async fn delete_commerce_store_by_storeid(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<DeleteCommerceStoreByStoreidError>> {
1608 let p_storeid = storeid;
1610
1611 let uri_str = format!("{}/v1/commerce/store/{storeid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
1612 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1613
1614 if let Some(ref user_agent) = configuration.user_agent {
1615 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1616 }
1617 if let Some(ref token) = configuration.bearer_access_token {
1618 req_builder = req_builder.bearer_auth(token.to_owned());
1619 };
1620
1621 let req = req_builder.build()?;
1622 let resp = configuration.client.execute(req).await?;
1623
1624 let status = resp.status();
1625
1626 if !status.is_client_error() && !status.is_server_error() {
1627 Ok(())
1628 } else {
1629 let content = resp.text().await?;
1630 let entity: Option<DeleteCommerceStoreByStoreidError> = serde_json::from_str(&content).ok();
1631 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1632 }
1633}
1634
1635pub async fn delete_commerce_store_by_storeid_listing_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<DeleteCommerceStoreByStoreidListingByKeyError>> {
1637 let p_storeid = storeid;
1639 let p_key = key;
1640
1641 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
1642 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1643
1644 if let Some(ref user_agent) = configuration.user_agent {
1645 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1646 }
1647 if let Some(ref token) = configuration.bearer_access_token {
1648 req_builder = req_builder.bearer_auth(token.to_owned());
1649 };
1650
1651 let req = req_builder.build()?;
1652 let resp = configuration.client.execute(req).await?;
1653
1654 let status = resp.status();
1655
1656 if !status.is_client_error() && !status.is_server_error() {
1657 Ok(())
1658 } else {
1659 let content = resp.text().await?;
1660 let entity: Option<DeleteCommerceStoreByStoreidListingByKeyError> = serde_json::from_str(&content).ok();
1661 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1662 }
1663}
1664
1665pub async fn delete_commerce_submission_by_submissionid(configuration: &configuration::Configuration, submissionid: &str) -> Result<(), Error<DeleteCommerceSubmissionBySubmissionidError>> {
1667 let p_submissionid = submissionid;
1669
1670 let uri_str = format!("{}/v1/commerce/submission/{submissionid}", configuration.base_path, submissionid=crate::apis::urlencode(p_submissionid));
1671 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1672
1673 if let Some(ref user_agent) = configuration.user_agent {
1674 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1675 }
1676 if let Some(ref token) = configuration.bearer_access_token {
1677 req_builder = req_builder.bearer_auth(token.to_owned());
1678 };
1679
1680 let req = req_builder.build()?;
1681 let resp = configuration.client.execute(req).await?;
1682
1683 let status = resp.status();
1684
1685 if !status.is_client_error() && !status.is_server_error() {
1686 Ok(())
1687 } else {
1688 let content = resp.text().await?;
1689 let entity: Option<DeleteCommerceSubmissionBySubmissionidError> = serde_json::from_str(&content).ok();
1690 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1691 }
1692}
1693
1694pub async fn delete_commerce_subscriber_by_subscriberid(configuration: &configuration::Configuration, subscriberid: &str) -> Result<(), Error<DeleteCommerceSubscriberBySubscriberidError>> {
1696 let p_subscriberid = subscriberid;
1698
1699 let uri_str = format!("{}/v1/commerce/subscriber/{subscriberid}", configuration.base_path, subscriberid=crate::apis::urlencode(p_subscriberid));
1700 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1701
1702 if let Some(ref user_agent) = configuration.user_agent {
1703 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1704 }
1705 if let Some(ref token) = configuration.bearer_access_token {
1706 req_builder = req_builder.bearer_auth(token.to_owned());
1707 };
1708
1709 let req = req_builder.build()?;
1710 let resp = configuration.client.execute(req).await?;
1711
1712 let status = resp.status();
1713
1714 if !status.is_client_error() && !status.is_server_error() {
1715 Ok(())
1716 } else {
1717 let content = resp.text().await?;
1718 let entity: Option<DeleteCommerceSubscriberBySubscriberidError> = serde_json::from_str(&content).ok();
1719 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1720 }
1721}
1722
1723pub async fn delete_commerce_tokentransaction_by_tokentransactionid(configuration: &configuration::Configuration, tokentransactionid: &str) -> Result<(), Error<DeleteCommerceTokentransactionByTokentransactionidError>> {
1725 let p_tokentransactionid = tokentransactionid;
1727
1728 let uri_str = format!("{}/v1/commerce/tokentransaction/{tokentransactionid}", configuration.base_path, tokentransactionid=crate::apis::urlencode(p_tokentransactionid));
1729 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1730
1731 if let Some(ref user_agent) = configuration.user_agent {
1732 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1733 }
1734 if let Some(ref token) = configuration.bearer_access_token {
1735 req_builder = req_builder.bearer_auth(token.to_owned());
1736 };
1737
1738 let req = req_builder.build()?;
1739 let resp = configuration.client.execute(req).await?;
1740
1741 let status = resp.status();
1742
1743 if !status.is_client_error() && !status.is_server_error() {
1744 Ok(())
1745 } else {
1746 let content = resp.text().await?;
1747 let entity: Option<DeleteCommerceTokentransactionByTokentransactionidError> = serde_json::from_str(&content).ok();
1748 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1749 }
1750}
1751
1752pub async fn delete_commerce_transfer_by_transferid(configuration: &configuration::Configuration, transferid: &str) -> Result<(), Error<DeleteCommerceTransferByTransferidError>> {
1754 let p_transferid = transferid;
1756
1757 let uri_str = format!("{}/v1/commerce/transfer/{transferid}", configuration.base_path, transferid=crate::apis::urlencode(p_transferid));
1758 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1759
1760 if let Some(ref user_agent) = configuration.user_agent {
1761 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1762 }
1763 if let Some(ref token) = configuration.bearer_access_token {
1764 req_builder = req_builder.bearer_auth(token.to_owned());
1765 };
1766
1767 let req = req_builder.build()?;
1768 let resp = configuration.client.execute(req).await?;
1769
1770 let status = resp.status();
1771
1772 if !status.is_client_error() && !status.is_server_error() {
1773 Ok(())
1774 } else {
1775 let content = resp.text().await?;
1776 let entity: Option<DeleteCommerceTransferByTransferidError> = serde_json::from_str(&content).ok();
1777 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1778 }
1779}
1780
1781pub async fn delete_commerce_variant_by_variantid(configuration: &configuration::Configuration, variantid: &str) -> Result<(), Error<DeleteCommerceVariantByVariantidError>> {
1783 let p_variantid = variantid;
1785
1786 let uri_str = format!("{}/v1/commerce/variant/{variantid}", configuration.base_path, variantid=crate::apis::urlencode(p_variantid));
1787 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1788
1789 if let Some(ref user_agent) = configuration.user_agent {
1790 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1791 }
1792 if let Some(ref token) = configuration.bearer_access_token {
1793 req_builder = req_builder.bearer_auth(token.to_owned());
1794 };
1795
1796 let req = req_builder.build()?;
1797 let resp = configuration.client.execute(req).await?;
1798
1799 let status = resp.status();
1800
1801 if !status.is_client_error() && !status.is_server_error() {
1802 Ok(())
1803 } else {
1804 let content = resp.text().await?;
1805 let entity: Option<DeleteCommerceVariantByVariantidError> = serde_json::from_str(&content).ok();
1806 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1807 }
1808}
1809
1810pub async fn delete_commerce_wallet_by_walletid(configuration: &configuration::Configuration, walletid: &str) -> Result<(), Error<DeleteCommerceWalletByWalletidError>> {
1812 let p_walletid = walletid;
1814
1815 let uri_str = format!("{}/v1/commerce/wallet/{walletid}", configuration.base_path, walletid=crate::apis::urlencode(p_walletid));
1816 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1817
1818 if let Some(ref user_agent) = configuration.user_agent {
1819 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1820 }
1821 if let Some(ref token) = configuration.bearer_access_token {
1822 req_builder = req_builder.bearer_auth(token.to_owned());
1823 };
1824
1825 let req = req_builder.build()?;
1826 let resp = configuration.client.execute(req).await?;
1827
1828 let status = resp.status();
1829
1830 if !status.is_client_error() && !status.is_server_error() {
1831 Ok(())
1832 } else {
1833 let content = resp.text().await?;
1834 let entity: Option<DeleteCommerceWalletByWalletidError> = serde_json::from_str(&content).ok();
1835 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1836 }
1837}
1838
1839pub async fn delete_commerce_watchlist_by_watchlistid(configuration: &configuration::Configuration, watchlistid: &str) -> Result<(), Error<DeleteCommerceWatchlistByWatchlistidError>> {
1841 let p_watchlistid = watchlistid;
1843
1844 let uri_str = format!("{}/v1/commerce/watchlist/{watchlistid}", configuration.base_path, watchlistid=crate::apis::urlencode(p_watchlistid));
1845 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1846
1847 if let Some(ref user_agent) = configuration.user_agent {
1848 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1849 }
1850 if let Some(ref token) = configuration.bearer_access_token {
1851 req_builder = req_builder.bearer_auth(token.to_owned());
1852 };
1853
1854 let req = req_builder.build()?;
1855 let resp = configuration.client.execute(req).await?;
1856
1857 let status = resp.status();
1858
1859 if !status.is_client_error() && !status.is_server_error() {
1860 Ok(())
1861 } else {
1862 let content = resp.text().await?;
1863 let entity: Option<DeleteCommerceWatchlistByWatchlistidError> = serde_json::from_str(&content).ok();
1864 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1865 }
1866}
1867
1868pub async fn delete_commerce_webhook_by_webhookid(configuration: &configuration::Configuration, webhookid: &str) -> Result<(), Error<DeleteCommerceWebhookByWebhookidError>> {
1870 let p_webhookid = webhookid;
1872
1873 let uri_str = format!("{}/v1/commerce/webhook/{webhookid}", configuration.base_path, webhookid=crate::apis::urlencode(p_webhookid));
1874 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1875
1876 if let Some(ref user_agent) = configuration.user_agent {
1877 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1878 }
1879 if let Some(ref token) = configuration.bearer_access_token {
1880 req_builder = req_builder.bearer_auth(token.to_owned());
1881 };
1882
1883 let req = req_builder.build()?;
1884 let resp = configuration.client.execute(req).await?;
1885
1886 let status = resp.status();
1887
1888 if !status.is_client_error() && !status.is_server_error() {
1889 Ok(())
1890 } else {
1891 let content = resp.text().await?;
1892 let entity: Option<DeleteCommerceWebhookByWebhookidError> = serde_json::from_str(&content).ok();
1893 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1894 }
1895}
1896
1897pub async fn discard_cart(configuration: &configuration::Configuration, id: &str) -> Result<models::Cart, Error<DiscardCartError>> {
1899 let p_id = id;
1901
1902 let uri_str = format!("{}/v1/commerce/cart/{id}/discard", configuration.base_path, id=crate::apis::urlencode(p_id));
1903 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1904
1905 if let Some(ref user_agent) = configuration.user_agent {
1906 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1907 }
1908 if let Some(ref token) = configuration.bearer_access_token {
1909 req_builder = req_builder.bearer_auth(token.to_owned());
1910 };
1911
1912 let req = req_builder.build()?;
1913 let resp = configuration.client.execute(req).await?;
1914
1915 let status = resp.status();
1916 let content_type = resp
1917 .headers()
1918 .get("content-type")
1919 .and_then(|v| v.to_str().ok())
1920 .unwrap_or("application/octet-stream");
1921 let content_type = super::ContentType::from(content_type);
1922
1923 if !status.is_client_error() && !status.is_server_error() {
1924 let content = resp.text().await?;
1925 match content_type {
1926 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1927 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Cart`"))),
1928 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Cart`")))),
1929 }
1930 } else {
1931 let content = resp.text().await?;
1932 let entity: Option<DiscardCartError> = serde_json::from_str(&content).ok();
1933 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1934 }
1935}
1936
1937pub async fn get_cart(configuration: &configuration::Configuration, id: &str) -> Result<models::Cart, Error<GetCartError>> {
1939 let p_id = id;
1941
1942 let uri_str = format!("{}/v1/commerce/cart/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
1943 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1944
1945 if let Some(ref user_agent) = configuration.user_agent {
1946 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1947 }
1948 if let Some(ref token) = configuration.bearer_access_token {
1949 req_builder = req_builder.bearer_auth(token.to_owned());
1950 };
1951
1952 let req = req_builder.build()?;
1953 let resp = configuration.client.execute(req).await?;
1954
1955 let status = resp.status();
1956 let content_type = resp
1957 .headers()
1958 .get("content-type")
1959 .and_then(|v| v.to_str().ok())
1960 .unwrap_or("application/octet-stream");
1961 let content_type = super::ContentType::from(content_type);
1962
1963 if !status.is_client_error() && !status.is_server_error() {
1964 let content = resp.text().await?;
1965 match content_type {
1966 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1967 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Cart`"))),
1968 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Cart`")))),
1969 }
1970 } else {
1971 let content = resp.text().await?;
1972 let entity: Option<GetCartError> = serde_json::from_str(&content).ok();
1973 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1974 }
1975}
1976
1977pub async fn get_commerce_admin_catalog(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceAdminCatalogError>> {
1979
1980 let uri_str = format!("{}/v1/commerce/admin/catalog", configuration.base_path);
1981 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1982
1983 if let Some(ref user_agent) = configuration.user_agent {
1984 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1985 }
1986 if let Some(ref token) = configuration.bearer_access_token {
1987 req_builder = req_builder.bearer_auth(token.to_owned());
1988 };
1989
1990 let req = req_builder.build()?;
1991 let resp = configuration.client.execute(req).await?;
1992
1993 let status = resp.status();
1994
1995 if !status.is_client_error() && !status.is_server_error() {
1996 Ok(())
1997 } else {
1998 let content = resp.text().await?;
1999 let entity: Option<GetCommerceAdminCatalogError> = serde_json::from_str(&content).ok();
2000 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2001 }
2002}
2003
2004pub async fn get_commerce_catalog(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceCatalogError>> {
2006
2007 let uri_str = format!("{}/v1/commerce/catalog", configuration.base_path);
2008 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2009
2010 if let Some(ref user_agent) = configuration.user_agent {
2011 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2012 }
2013 if let Some(ref token) = configuration.bearer_access_token {
2014 req_builder = req_builder.bearer_auth(token.to_owned());
2015 };
2016
2017 let req = req_builder.build()?;
2018 let resp = configuration.client.execute(req).await?;
2019
2020 let status = resp.status();
2021
2022 if !status.is_client_error() && !status.is_server_error() {
2023 Ok(())
2024 } else {
2025 let content = resp.text().await?;
2026 let entity: Option<GetCommerceCatalogError> = serde_json::from_str(&content).ok();
2027 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2028 }
2029}
2030
2031pub async fn get_commerce_catalog_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceCatalogEntriesError>> {
2033
2034 let uri_str = format!("{}/v1/commerce/catalog/entries", configuration.base_path);
2035 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2036
2037 if let Some(ref user_agent) = configuration.user_agent {
2038 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2039 }
2040 if let Some(ref token) = configuration.bearer_access_token {
2041 req_builder = req_builder.bearer_auth(token.to_owned());
2042 };
2043
2044 let req = req_builder.build()?;
2045 let resp = configuration.client.execute(req).await?;
2046
2047 let status = resp.status();
2048
2049 if !status.is_client_error() && !status.is_server_error() {
2050 Ok(())
2051 } else {
2052 let content = resp.text().await?;
2053 let entity: Option<GetCommerceCatalogEntriesError> = serde_json::from_str(&content).ok();
2054 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2055 }
2056}
2057
2058pub async fn get_commerce_collection(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceCollectionError>> {
2060
2061 let uri_str = format!("{}/v1/commerce/collection/", configuration.base_path);
2062 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2063
2064 if let Some(ref user_agent) = configuration.user_agent {
2065 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2066 }
2067 if let Some(ref token) = configuration.bearer_access_token {
2068 req_builder = req_builder.bearer_auth(token.to_owned());
2069 };
2070
2071 let req = req_builder.build()?;
2072 let resp = configuration.client.execute(req).await?;
2073
2074 let status = resp.status();
2075
2076 if !status.is_client_error() && !status.is_server_error() {
2077 Ok(())
2078 } else {
2079 let content = resp.text().await?;
2080 let entity: Option<GetCommerceCollectionError> = serde_json::from_str(&content).ok();
2081 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2082 }
2083}
2084
2085pub async fn get_commerce_collection_by_collectionid(configuration: &configuration::Configuration, collectionid: &str) -> Result<(), Error<GetCommerceCollectionByCollectionidError>> {
2087 let p_collectionid = collectionid;
2089
2090 let uri_str = format!("{}/v1/commerce/collection/{collectionid}", configuration.base_path, collectionid=crate::apis::urlencode(p_collectionid));
2091 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2092
2093 if let Some(ref user_agent) = configuration.user_agent {
2094 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2095 }
2096 if let Some(ref token) = configuration.bearer_access_token {
2097 req_builder = req_builder.bearer_auth(token.to_owned());
2098 };
2099
2100 let req = req_builder.build()?;
2101 let resp = configuration.client.execute(req).await?;
2102
2103 let status = resp.status();
2104
2105 if !status.is_client_error() && !status.is_server_error() {
2106 Ok(())
2107 } else {
2108 let content = resp.text().await?;
2109 let entity: Option<GetCommerceCollectionByCollectionidError> = serde_json::from_str(&content).ok();
2110 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2111 }
2112}
2113
2114pub async fn get_commerce_currencies(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceCurrenciesError>> {
2116
2117 let uri_str = format!("{}/v1/commerce/currencies", configuration.base_path);
2118 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2119
2120 if let Some(ref user_agent) = configuration.user_agent {
2121 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2122 }
2123 if let Some(ref token) = configuration.bearer_access_token {
2124 req_builder = req_builder.bearer_auth(token.to_owned());
2125 };
2126
2127 let req = req_builder.build()?;
2128 let resp = configuration.client.execute(req).await?;
2129
2130 let status = resp.status();
2131
2132 if !status.is_client_error() && !status.is_server_error() {
2133 Ok(())
2134 } else {
2135 let content = resp.text().await?;
2136 let entity: Option<GetCommerceCurrenciesError> = serde_json::from_str(&content).ok();
2137 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2138 }
2139}
2140
2141pub async fn get_commerce_deposits(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceDepositsError>> {
2143
2144 let uri_str = format!("{}/v1/commerce/deposits", configuration.base_path);
2145 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2146
2147 if let Some(ref user_agent) = configuration.user_agent {
2148 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2149 }
2150 if let Some(ref token) = configuration.bearer_access_token {
2151 req_builder = req_builder.bearer_auth(token.to_owned());
2152 };
2153
2154 let req = req_builder.build()?;
2155 let resp = configuration.client.execute(req).await?;
2156
2157 let status = resp.status();
2158
2159 if !status.is_client_error() && !status.is_server_error() {
2160 Ok(())
2161 } else {
2162 let content = resp.text().await?;
2163 let entity: Option<GetCommerceDepositsError> = serde_json::from_str(&content).ok();
2164 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2165 }
2166}
2167
2168pub async fn get_commerce_disclosure(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceDisclosureError>> {
2170
2171 let uri_str = format!("{}/v1/commerce/disclosure/", configuration.base_path);
2172 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2173
2174 if let Some(ref user_agent) = configuration.user_agent {
2175 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2176 }
2177 if let Some(ref token) = configuration.bearer_access_token {
2178 req_builder = req_builder.bearer_auth(token.to_owned());
2179 };
2180
2181 let req = req_builder.build()?;
2182 let resp = configuration.client.execute(req).await?;
2183
2184 let status = resp.status();
2185
2186 if !status.is_client_error() && !status.is_server_error() {
2187 Ok(())
2188 } else {
2189 let content = resp.text().await?;
2190 let entity: Option<GetCommerceDisclosureError> = serde_json::from_str(&content).ok();
2191 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2192 }
2193}
2194
2195pub async fn get_commerce_disclosure_by_disclosureid(configuration: &configuration::Configuration, disclosureid: &str) -> Result<(), Error<GetCommerceDisclosureByDisclosureidError>> {
2197 let p_disclosureid = disclosureid;
2199
2200 let uri_str = format!("{}/v1/commerce/disclosure/{disclosureid}", configuration.base_path, disclosureid=crate::apis::urlencode(p_disclosureid));
2201 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2202
2203 if let Some(ref user_agent) = configuration.user_agent {
2204 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2205 }
2206 if let Some(ref token) = configuration.bearer_access_token {
2207 req_builder = req_builder.bearer_auth(token.to_owned());
2208 };
2209
2210 let req = req_builder.build()?;
2211 let resp = configuration.client.execute(req).await?;
2212
2213 let status = resp.status();
2214
2215 if !status.is_client_error() && !status.is_server_error() {
2216 Ok(())
2217 } else {
2218 let content = resp.text().await?;
2219 let entity: Option<GetCommerceDisclosureByDisclosureidError> = serde_json::from_str(&content).ok();
2220 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2221 }
2222}
2223
2224pub async fn get_commerce_discount(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceDiscountError>> {
2226
2227 let uri_str = format!("{}/v1/commerce/discount/", configuration.base_path);
2228 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2229
2230 if let Some(ref user_agent) = configuration.user_agent {
2231 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2232 }
2233 if let Some(ref token) = configuration.bearer_access_token {
2234 req_builder = req_builder.bearer_auth(token.to_owned());
2235 };
2236
2237 let req = req_builder.build()?;
2238 let resp = configuration.client.execute(req).await?;
2239
2240 let status = resp.status();
2241
2242 if !status.is_client_error() && !status.is_server_error() {
2243 Ok(())
2244 } else {
2245 let content = resp.text().await?;
2246 let entity: Option<GetCommerceDiscountError> = serde_json::from_str(&content).ok();
2247 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2248 }
2249}
2250
2251pub async fn get_commerce_discount_by_discountid(configuration: &configuration::Configuration, discountid: &str) -> Result<(), Error<GetCommerceDiscountByDiscountidError>> {
2253 let p_discountid = discountid;
2255
2256 let uri_str = format!("{}/v1/commerce/discount/{discountid}", configuration.base_path, discountid=crate::apis::urlencode(p_discountid));
2257 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2258
2259 if let Some(ref user_agent) = configuration.user_agent {
2260 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2261 }
2262 if let Some(ref token) = configuration.bearer_access_token {
2263 req_builder = req_builder.bearer_auth(token.to_owned());
2264 };
2265
2266 let req = req_builder.build()?;
2267 let resp = configuration.client.execute(req).await?;
2268
2269 let status = resp.status();
2270
2271 if !status.is_client_error() && !status.is_server_error() {
2272 Ok(())
2273 } else {
2274 let content = resp.text().await?;
2275 let entity: Option<GetCommerceDiscountByDiscountidError> = serde_json::from_str(&content).ok();
2276 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2277 }
2278}
2279
2280pub async fn get_commerce_health(configuration: &configuration::Configuration, ) -> Result<models::Liveness, Error<GetCommerceHealthError>> {
2282
2283 let uri_str = format!("{}/v1/commerce/health", configuration.base_path);
2284 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2285
2286 if let Some(ref user_agent) = configuration.user_agent {
2287 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2288 }
2289 if let Some(ref token) = configuration.bearer_access_token {
2290 req_builder = req_builder.bearer_auth(token.to_owned());
2291 };
2292
2293 let req = req_builder.build()?;
2294 let resp = configuration.client.execute(req).await?;
2295
2296 let status = resp.status();
2297 let content_type = resp
2298 .headers()
2299 .get("content-type")
2300 .and_then(|v| v.to_str().ok())
2301 .unwrap_or("application/octet-stream");
2302 let content_type = super::ContentType::from(content_type);
2303
2304 if !status.is_client_error() && !status.is_server_error() {
2305 let content = resp.text().await?;
2306 match content_type {
2307 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2308 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Liveness`"))),
2309 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Liveness`")))),
2310 }
2311 } else {
2312 let content = resp.text().await?;
2313 let entity: Option<GetCommerceHealthError> = serde_json::from_str(&content).ok();
2314 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2315 }
2316}
2317
2318pub async fn get_commerce_movie(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceMovieError>> {
2320
2321 let uri_str = format!("{}/v1/commerce/movie/", configuration.base_path);
2322 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2323
2324 if let Some(ref user_agent) = configuration.user_agent {
2325 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2326 }
2327 if let Some(ref token) = configuration.bearer_access_token {
2328 req_builder = req_builder.bearer_auth(token.to_owned());
2329 };
2330
2331 let req = req_builder.build()?;
2332 let resp = configuration.client.execute(req).await?;
2333
2334 let status = resp.status();
2335
2336 if !status.is_client_error() && !status.is_server_error() {
2337 Ok(())
2338 } else {
2339 let content = resp.text().await?;
2340 let entity: Option<GetCommerceMovieError> = serde_json::from_str(&content).ok();
2341 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2342 }
2343}
2344
2345pub async fn get_commerce_movie_by_movieid(configuration: &configuration::Configuration, movieid: &str) -> Result<(), Error<GetCommerceMovieByMovieidError>> {
2347 let p_movieid = movieid;
2349
2350 let uri_str = format!("{}/v1/commerce/movie/{movieid}", configuration.base_path, movieid=crate::apis::urlencode(p_movieid));
2351 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2352
2353 if let Some(ref user_agent) = configuration.user_agent {
2354 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2355 }
2356 if let Some(ref token) = configuration.bearer_access_token {
2357 req_builder = req_builder.bearer_auth(token.to_owned());
2358 };
2359
2360 let req = req_builder.build()?;
2361 let resp = configuration.client.execute(req).await?;
2362
2363 let status = resp.status();
2364
2365 if !status.is_client_error() && !status.is_server_error() {
2366 Ok(())
2367 } else {
2368 let content = resp.text().await?;
2369 let entity: Option<GetCommerceMovieByMovieidError> = serde_json::from_str(&content).ok();
2370 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2371 }
2372}
2373
2374pub async fn get_commerce_note(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceNoteError>> {
2376
2377 let uri_str = format!("{}/v1/commerce/note/", configuration.base_path);
2378 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2379
2380 if let Some(ref user_agent) = configuration.user_agent {
2381 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2382 }
2383 if let Some(ref token) = configuration.bearer_access_token {
2384 req_builder = req_builder.bearer_auth(token.to_owned());
2385 };
2386
2387 let req = req_builder.build()?;
2388 let resp = configuration.client.execute(req).await?;
2389
2390 let status = resp.status();
2391
2392 if !status.is_client_error() && !status.is_server_error() {
2393 Ok(())
2394 } else {
2395 let content = resp.text().await?;
2396 let entity: Option<GetCommerceNoteError> = serde_json::from_str(&content).ok();
2397 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2398 }
2399}
2400
2401pub async fn get_commerce_note_by_noteid(configuration: &configuration::Configuration, noteid: &str) -> Result<(), Error<GetCommerceNoteByNoteidError>> {
2403 let p_noteid = noteid;
2405
2406 let uri_str = format!("{}/v1/commerce/note/{noteid}", configuration.base_path, noteid=crate::apis::urlencode(p_noteid));
2407 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2408
2409 if let Some(ref user_agent) = configuration.user_agent {
2410 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2411 }
2412 if let Some(ref token) = configuration.bearer_access_token {
2413 req_builder = req_builder.bearer_auth(token.to_owned());
2414 };
2415
2416 let req = req_builder.build()?;
2417 let resp = configuration.client.execute(req).await?;
2418
2419 let status = resp.status();
2420
2421 if !status.is_client_error() && !status.is_server_error() {
2422 Ok(())
2423 } else {
2424 let content = resp.text().await?;
2425 let entity: Option<GetCommerceNoteByNoteidError> = serde_json::from_str(&content).ok();
2426 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2427 }
2428}
2429
2430pub async fn get_commerce_org(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceOrgError>> {
2432
2433 let uri_str = format!("{}/v1/commerce/org", configuration.base_path);
2434 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2435
2436 if let Some(ref user_agent) = configuration.user_agent {
2437 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2438 }
2439 if let Some(ref token) = configuration.bearer_access_token {
2440 req_builder = req_builder.bearer_auth(token.to_owned());
2441 };
2442
2443 let req = req_builder.build()?;
2444 let resp = configuration.client.execute(req).await?;
2445
2446 let status = resp.status();
2447
2448 if !status.is_client_error() && !status.is_server_error() {
2449 Ok(())
2450 } else {
2451 let content = resp.text().await?;
2452 let entity: Option<GetCommerceOrgError> = serde_json::from_str(&content).ok();
2453 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2454 }
2455}
2456
2457pub async fn get_commerce_plans_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommercePlansEntriesError>> {
2459
2460 let uri_str = format!("{}/v1/commerce/plans/entries", configuration.base_path);
2461 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2462
2463 if let Some(ref user_agent) = configuration.user_agent {
2464 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2465 }
2466 if let Some(ref token) = configuration.bearer_access_token {
2467 req_builder = req_builder.bearer_auth(token.to_owned());
2468 };
2469
2470 let req = req_builder.build()?;
2471 let resp = configuration.client.execute(req).await?;
2472
2473 let status = resp.status();
2474
2475 if !status.is_client_error() && !status.is_server_error() {
2476 Ok(())
2477 } else {
2478 let content = resp.text().await?;
2479 let entity: Option<GetCommercePlansEntriesError> = serde_json::from_str(&content).ok();
2480 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2481 }
2482}
2483
2484pub async fn get_commerce_product(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceProductError>> {
2486
2487 let uri_str = format!("{}/v1/commerce/product/", configuration.base_path);
2488 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2489
2490 if let Some(ref user_agent) = configuration.user_agent {
2491 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2492 }
2493 if let Some(ref token) = configuration.bearer_access_token {
2494 req_builder = req_builder.bearer_auth(token.to_owned());
2495 };
2496
2497 let req = req_builder.build()?;
2498 let resp = configuration.client.execute(req).await?;
2499
2500 let status = resp.status();
2501
2502 if !status.is_client_error() && !status.is_server_error() {
2503 Ok(())
2504 } else {
2505 let content = resp.text().await?;
2506 let entity: Option<GetCommerceProductError> = serde_json::from_str(&content).ok();
2507 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2508 }
2509}
2510
2511pub async fn get_commerce_product_by_productid(configuration: &configuration::Configuration, productid: &str) -> Result<(), Error<GetCommerceProductByProductidError>> {
2513 let p_productid = productid;
2515
2516 let uri_str = format!("{}/v1/commerce/product/{productid}", configuration.base_path, productid=crate::apis::urlencode(p_productid));
2517 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2518
2519 if let Some(ref user_agent) = configuration.user_agent {
2520 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2521 }
2522 if let Some(ref token) = configuration.bearer_access_token {
2523 req_builder = req_builder.bearer_auth(token.to_owned());
2524 };
2525
2526 let req = req_builder.build()?;
2527 let resp = configuration.client.execute(req).await?;
2528
2529 let status = resp.status();
2530
2531 if !status.is_client_error() && !status.is_server_error() {
2532 Ok(())
2533 } else {
2534 let content = resp.text().await?;
2535 let entity: Option<GetCommerceProductByProductidError> = serde_json::from_str(&content).ok();
2536 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2537 }
2538}
2539
2540pub async fn get_commerce_rates_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceRatesEntriesError>> {
2542
2543 let uri_str = format!("{}/v1/commerce/rates/entries", configuration.base_path);
2544 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2545
2546 if let Some(ref user_agent) = configuration.user_agent {
2547 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2548 }
2549 if let Some(ref token) = configuration.bearer_access_token {
2550 req_builder = req_builder.bearer_auth(token.to_owned());
2551 };
2552
2553 let req = req_builder.build()?;
2554 let resp = configuration.client.execute(req).await?;
2555
2556 let status = resp.status();
2557
2558 if !status.is_client_error() && !status.is_server_error() {
2559 Ok(())
2560 } else {
2561 let content = resp.text().await?;
2562 let entity: Option<GetCommerceRatesEntriesError> = serde_json::from_str(&content).ok();
2563 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2564 }
2565}
2566
2567pub async fn get_commerce_return(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceReturnError>> {
2569
2570 let uri_str = format!("{}/v1/commerce/return/", configuration.base_path);
2571 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2572
2573 if let Some(ref user_agent) = configuration.user_agent {
2574 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2575 }
2576 if let Some(ref token) = configuration.bearer_access_token {
2577 req_builder = req_builder.bearer_auth(token.to_owned());
2578 };
2579
2580 let req = req_builder.build()?;
2581 let resp = configuration.client.execute(req).await?;
2582
2583 let status = resp.status();
2584
2585 if !status.is_client_error() && !status.is_server_error() {
2586 Ok(())
2587 } else {
2588 let content = resp.text().await?;
2589 let entity: Option<GetCommerceReturnError> = serde_json::from_str(&content).ok();
2590 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2591 }
2592}
2593
2594pub async fn get_commerce_return_by_returnid(configuration: &configuration::Configuration, returnid: &str) -> Result<(), Error<GetCommerceReturnByReturnidError>> {
2596 let p_returnid = returnid;
2598
2599 let uri_str = format!("{}/v1/commerce/return/{returnid}", configuration.base_path, returnid=crate::apis::urlencode(p_returnid));
2600 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2601
2602 if let Some(ref user_agent) = configuration.user_agent {
2603 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2604 }
2605 if let Some(ref token) = configuration.bearer_access_token {
2606 req_builder = req_builder.bearer_auth(token.to_owned());
2607 };
2608
2609 let req = req_builder.build()?;
2610 let resp = configuration.client.execute(req).await?;
2611
2612 let status = resp.status();
2613
2614 if !status.is_client_error() && !status.is_server_error() {
2615 Ok(())
2616 } else {
2617 let content = resp.text().await?;
2618 let entity: Option<GetCommerceReturnByReturnidError> = serde_json::from_str(&content).ok();
2619 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2620 }
2621}
2622
2623pub async fn get_commerce_saleschannel(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceSaleschannelError>> {
2625
2626 let uri_str = format!("{}/v1/commerce/saleschannel/", configuration.base_path);
2627 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2628
2629 if let Some(ref user_agent) = configuration.user_agent {
2630 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2631 }
2632 if let Some(ref token) = configuration.bearer_access_token {
2633 req_builder = req_builder.bearer_auth(token.to_owned());
2634 };
2635
2636 let req = req_builder.build()?;
2637 let resp = configuration.client.execute(req).await?;
2638
2639 let status = resp.status();
2640
2641 if !status.is_client_error() && !status.is_server_error() {
2642 Ok(())
2643 } else {
2644 let content = resp.text().await?;
2645 let entity: Option<GetCommerceSaleschannelError> = serde_json::from_str(&content).ok();
2646 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2647 }
2648}
2649
2650pub async fn get_commerce_saleschannel_by_saleschannelid(configuration: &configuration::Configuration, saleschannelid: &str) -> Result<(), Error<GetCommerceSaleschannelBySaleschannelidError>> {
2652 let p_saleschannelid = saleschannelid;
2654
2655 let uri_str = format!("{}/v1/commerce/saleschannel/{saleschannelid}", configuration.base_path, saleschannelid=crate::apis::urlencode(p_saleschannelid));
2656 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2657
2658 if let Some(ref user_agent) = configuration.user_agent {
2659 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2660 }
2661 if let Some(ref token) = configuration.bearer_access_token {
2662 req_builder = req_builder.bearer_auth(token.to_owned());
2663 };
2664
2665 let req = req_builder.build()?;
2666 let resp = configuration.client.execute(req).await?;
2667
2668 let status = resp.status();
2669
2670 if !status.is_client_error() && !status.is_server_error() {
2671 Ok(())
2672 } else {
2673 let content = resp.text().await?;
2674 let entity: Option<GetCommerceSaleschannelBySaleschannelidError> = serde_json::from_str(&content).ok();
2675 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2676 }
2677}
2678
2679pub async fn get_commerce_stocklocation(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceStocklocationError>> {
2681
2682 let uri_str = format!("{}/v1/commerce/stocklocation/", configuration.base_path);
2683 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2684
2685 if let Some(ref user_agent) = configuration.user_agent {
2686 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2687 }
2688 if let Some(ref token) = configuration.bearer_access_token {
2689 req_builder = req_builder.bearer_auth(token.to_owned());
2690 };
2691
2692 let req = req_builder.build()?;
2693 let resp = configuration.client.execute(req).await?;
2694
2695 let status = resp.status();
2696
2697 if !status.is_client_error() && !status.is_server_error() {
2698 Ok(())
2699 } else {
2700 let content = resp.text().await?;
2701 let entity: Option<GetCommerceStocklocationError> = serde_json::from_str(&content).ok();
2702 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2703 }
2704}
2705
2706pub async fn get_commerce_stocklocation_by_stocklocationid(configuration: &configuration::Configuration, stocklocationid: &str) -> Result<(), Error<GetCommerceStocklocationByStocklocationidError>> {
2708 let p_stocklocationid = stocklocationid;
2710
2711 let uri_str = format!("{}/v1/commerce/stocklocation/{stocklocationid}", configuration.base_path, stocklocationid=crate::apis::urlencode(p_stocklocationid));
2712 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2713
2714 if let Some(ref user_agent) = configuration.user_agent {
2715 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2716 }
2717 if let Some(ref token) = configuration.bearer_access_token {
2718 req_builder = req_builder.bearer_auth(token.to_owned());
2719 };
2720
2721 let req = req_builder.build()?;
2722 let resp = configuration.client.execute(req).await?;
2723
2724 let status = resp.status();
2725
2726 if !status.is_client_error() && !status.is_server_error() {
2727 Ok(())
2728 } else {
2729 let content = resp.text().await?;
2730 let entity: Option<GetCommerceStocklocationByStocklocationidError> = serde_json::from_str(&content).ok();
2731 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2732 }
2733}
2734
2735pub async fn get_commerce_store(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceStoreError>> {
2737
2738 let uri_str = format!("{}/v1/commerce/store/", configuration.base_path);
2739 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2740
2741 if let Some(ref user_agent) = configuration.user_agent {
2742 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2743 }
2744 if let Some(ref token) = configuration.bearer_access_token {
2745 req_builder = req_builder.bearer_auth(token.to_owned());
2746 };
2747
2748 let req = req_builder.build()?;
2749 let resp = configuration.client.execute(req).await?;
2750
2751 let status = resp.status();
2752
2753 if !status.is_client_error() && !status.is_server_error() {
2754 Ok(())
2755 } else {
2756 let content = resp.text().await?;
2757 let entity: Option<GetCommerceStoreError> = serde_json::from_str(&content).ok();
2758 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2759 }
2760}
2761
2762pub async fn get_commerce_store_access(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceStoreAccessError>> {
2764
2765 let uri_str = format!("{}/v1/commerce/store/access", configuration.base_path);
2766 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2767
2768 if let Some(ref user_agent) = configuration.user_agent {
2769 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2770 }
2771 if let Some(ref token) = configuration.bearer_access_token {
2772 req_builder = req_builder.bearer_auth(token.to_owned());
2773 };
2774
2775 let req = req_builder.build()?;
2776 let resp = configuration.client.execute(req).await?;
2777
2778 let status = resp.status();
2779
2780 if !status.is_client_error() && !status.is_server_error() {
2781 Ok(())
2782 } else {
2783 let content = resp.text().await?;
2784 let entity: Option<GetCommerceStoreAccessError> = serde_json::from_str(&content).ok();
2785 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2786 }
2787}
2788
2789pub async fn get_commerce_store_by_storeid(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<GetCommerceStoreByStoreidError>> {
2791 let p_storeid = storeid;
2793
2794 let uri_str = format!("{}/v1/commerce/store/{storeid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
2795 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2796
2797 if let Some(ref user_agent) = configuration.user_agent {
2798 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2799 }
2800 if let Some(ref token) = configuration.bearer_access_token {
2801 req_builder = req_builder.bearer_auth(token.to_owned());
2802 };
2803
2804 let req = req_builder.build()?;
2805 let resp = configuration.client.execute(req).await?;
2806
2807 let status = resp.status();
2808
2809 if !status.is_client_error() && !status.is_server_error() {
2810 Ok(())
2811 } else {
2812 let content = resp.text().await?;
2813 let entity: Option<GetCommerceStoreByStoreidError> = serde_json::from_str(&content).ok();
2814 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2815 }
2816}
2817
2818pub async fn get_commerce_store_by_storeid_bundle_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<GetCommerceStoreByStoreidBundleByKeyError>> {
2820 let p_storeid = storeid;
2822 let p_key = key;
2823
2824 let uri_str = format!("{}/v1/commerce/store/{storeid}/bundle/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
2825 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2826
2827 if let Some(ref user_agent) = configuration.user_agent {
2828 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2829 }
2830 if let Some(ref token) = configuration.bearer_access_token {
2831 req_builder = req_builder.bearer_auth(token.to_owned());
2832 };
2833
2834 let req = req_builder.build()?;
2835 let resp = configuration.client.execute(req).await?;
2836
2837 let status = resp.status();
2838
2839 if !status.is_client_error() && !status.is_server_error() {
2840 Ok(())
2841 } else {
2842 let content = resp.text().await?;
2843 let entity: Option<GetCommerceStoreByStoreidBundleByKeyError> = serde_json::from_str(&content).ok();
2844 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2845 }
2846}
2847
2848pub async fn get_commerce_store_by_storeid_listing(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<GetCommerceStoreByStoreidListingError>> {
2850 let p_storeid = storeid;
2852
2853 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
2854 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2855
2856 if let Some(ref user_agent) = configuration.user_agent {
2857 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2858 }
2859 if let Some(ref token) = configuration.bearer_access_token {
2860 req_builder = req_builder.bearer_auth(token.to_owned());
2861 };
2862
2863 let req = req_builder.build()?;
2864 let resp = configuration.client.execute(req).await?;
2865
2866 let status = resp.status();
2867
2868 if !status.is_client_error() && !status.is_server_error() {
2869 Ok(())
2870 } else {
2871 let content = resp.text().await?;
2872 let entity: Option<GetCommerceStoreByStoreidListingError> = serde_json::from_str(&content).ok();
2873 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2874 }
2875}
2876
2877pub async fn get_commerce_store_by_storeid_listing_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<GetCommerceStoreByStoreidListingByKeyError>> {
2879 let p_storeid = storeid;
2881 let p_key = key;
2882
2883 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
2884 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2885
2886 if let Some(ref user_agent) = configuration.user_agent {
2887 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2888 }
2889 if let Some(ref token) = configuration.bearer_access_token {
2890 req_builder = req_builder.bearer_auth(token.to_owned());
2891 };
2892
2893 let req = req_builder.build()?;
2894 let resp = configuration.client.execute(req).await?;
2895
2896 let status = resp.status();
2897
2898 if !status.is_client_error() && !status.is_server_error() {
2899 Ok(())
2900 } else {
2901 let content = resp.text().await?;
2902 let entity: Option<GetCommerceStoreByStoreidListingByKeyError> = serde_json::from_str(&content).ok();
2903 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2904 }
2905}
2906
2907pub async fn get_commerce_store_by_storeid_product_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<GetCommerceStoreByStoreidProductByKeyError>> {
2909 let p_storeid = storeid;
2911 let p_key = key;
2912
2913 let uri_str = format!("{}/v1/commerce/store/{storeid}/product/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
2914 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2915
2916 if let Some(ref user_agent) = configuration.user_agent {
2917 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2918 }
2919 if let Some(ref token) = configuration.bearer_access_token {
2920 req_builder = req_builder.bearer_auth(token.to_owned());
2921 };
2922
2923 let req = req_builder.build()?;
2924 let resp = configuration.client.execute(req).await?;
2925
2926 let status = resp.status();
2927
2928 if !status.is_client_error() && !status.is_server_error() {
2929 Ok(())
2930 } else {
2931 let content = resp.text().await?;
2932 let entity: Option<GetCommerceStoreByStoreidProductByKeyError> = serde_json::from_str(&content).ok();
2933 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2934 }
2935}
2936
2937pub async fn get_commerce_store_by_storeid_variant_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<GetCommerceStoreByStoreidVariantByKeyError>> {
2939 let p_storeid = storeid;
2941 let p_key = key;
2942
2943 let uri_str = format!("{}/v1/commerce/store/{storeid}/variant/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
2944 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2945
2946 if let Some(ref user_agent) = configuration.user_agent {
2947 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2948 }
2949 if let Some(ref token) = configuration.bearer_access_token {
2950 req_builder = req_builder.bearer_auth(token.to_owned());
2951 };
2952
2953 let req = req_builder.build()?;
2954 let resp = configuration.client.execute(req).await?;
2955
2956 let status = resp.status();
2957
2958 if !status.is_client_error() && !status.is_server_error() {
2959 Ok(())
2960 } else {
2961 let content = resp.text().await?;
2962 let entity: Option<GetCommerceStoreByStoreidVariantByKeyError> = serde_json::from_str(&content).ok();
2963 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2964 }
2965}
2966
2967pub async fn get_commerce_store_current(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceStoreCurrentError>> {
2969
2970 let uri_str = format!("{}/v1/commerce/store/current", configuration.base_path);
2971 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2972
2973 if let Some(ref user_agent) = configuration.user_agent {
2974 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2975 }
2976 if let Some(ref token) = configuration.bearer_access_token {
2977 req_builder = req_builder.bearer_auth(token.to_owned());
2978 };
2979
2980 let req = req_builder.build()?;
2981 let resp = configuration.client.execute(req).await?;
2982
2983 let status = resp.status();
2984
2985 if !status.is_client_error() && !status.is_server_error() {
2986 Ok(())
2987 } else {
2988 let content = resp.text().await?;
2989 let entity: Option<GetCommerceStoreCurrentError> = serde_json::from_str(&content).ok();
2990 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2991 }
2992}
2993
2994pub async fn get_commerce_submission(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceSubmissionError>> {
2996
2997 let uri_str = format!("{}/v1/commerce/submission/", configuration.base_path);
2998 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2999
3000 if let Some(ref user_agent) = configuration.user_agent {
3001 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3002 }
3003 if let Some(ref token) = configuration.bearer_access_token {
3004 req_builder = req_builder.bearer_auth(token.to_owned());
3005 };
3006
3007 let req = req_builder.build()?;
3008 let resp = configuration.client.execute(req).await?;
3009
3010 let status = resp.status();
3011
3012 if !status.is_client_error() && !status.is_server_error() {
3013 Ok(())
3014 } else {
3015 let content = resp.text().await?;
3016 let entity: Option<GetCommerceSubmissionError> = serde_json::from_str(&content).ok();
3017 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3018 }
3019}
3020
3021pub async fn get_commerce_submission_by_submissionid(configuration: &configuration::Configuration, submissionid: &str) -> Result<(), Error<GetCommerceSubmissionBySubmissionidError>> {
3023 let p_submissionid = submissionid;
3025
3026 let uri_str = format!("{}/v1/commerce/submission/{submissionid}", configuration.base_path, submissionid=crate::apis::urlencode(p_submissionid));
3027 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3028
3029 if let Some(ref user_agent) = configuration.user_agent {
3030 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3031 }
3032 if let Some(ref token) = configuration.bearer_access_token {
3033 req_builder = req_builder.bearer_auth(token.to_owned());
3034 };
3035
3036 let req = req_builder.build()?;
3037 let resp = configuration.client.execute(req).await?;
3038
3039 let status = resp.status();
3040
3041 if !status.is_client_error() && !status.is_server_error() {
3042 Ok(())
3043 } else {
3044 let content = resp.text().await?;
3045 let entity: Option<GetCommerceSubmissionBySubmissionidError> = serde_json::from_str(&content).ok();
3046 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3047 }
3048}
3049
3050pub async fn get_commerce_subscriber(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceSubscriberError>> {
3052
3053 let uri_str = format!("{}/v1/commerce/subscriber/", configuration.base_path);
3054 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3055
3056 if let Some(ref user_agent) = configuration.user_agent {
3057 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3058 }
3059 if let Some(ref token) = configuration.bearer_access_token {
3060 req_builder = req_builder.bearer_auth(token.to_owned());
3061 };
3062
3063 let req = req_builder.build()?;
3064 let resp = configuration.client.execute(req).await?;
3065
3066 let status = resp.status();
3067
3068 if !status.is_client_error() && !status.is_server_error() {
3069 Ok(())
3070 } else {
3071 let content = resp.text().await?;
3072 let entity: Option<GetCommerceSubscriberError> = serde_json::from_str(&content).ok();
3073 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3074 }
3075}
3076
3077pub async fn get_commerce_subscriber_by_subscriberid(configuration: &configuration::Configuration, subscriberid: &str) -> Result<(), Error<GetCommerceSubscriberBySubscriberidError>> {
3079 let p_subscriberid = subscriberid;
3081
3082 let uri_str = format!("{}/v1/commerce/subscriber/{subscriberid}", configuration.base_path, subscriberid=crate::apis::urlencode(p_subscriberid));
3083 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3084
3085 if let Some(ref user_agent) = configuration.user_agent {
3086 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3087 }
3088 if let Some(ref token) = configuration.bearer_access_token {
3089 req_builder = req_builder.bearer_auth(token.to_owned());
3090 };
3091
3092 let req = req_builder.build()?;
3093 let resp = configuration.client.execute(req).await?;
3094
3095 let status = resp.status();
3096
3097 if !status.is_client_error() && !status.is_server_error() {
3098 Ok(())
3099 } else {
3100 let content = resp.text().await?;
3101 let entity: Option<GetCommerceSubscriberBySubscriberidError> = serde_json::from_str(&content).ok();
3102 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3103 }
3104}
3105
3106pub async fn get_commerce_tokentransaction(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceTokentransactionError>> {
3108
3109 let uri_str = format!("{}/v1/commerce/tokentransaction/", configuration.base_path);
3110 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3111
3112 if let Some(ref user_agent) = configuration.user_agent {
3113 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3114 }
3115 if let Some(ref token) = configuration.bearer_access_token {
3116 req_builder = req_builder.bearer_auth(token.to_owned());
3117 };
3118
3119 let req = req_builder.build()?;
3120 let resp = configuration.client.execute(req).await?;
3121
3122 let status = resp.status();
3123
3124 if !status.is_client_error() && !status.is_server_error() {
3125 Ok(())
3126 } else {
3127 let content = resp.text().await?;
3128 let entity: Option<GetCommerceTokentransactionError> = serde_json::from_str(&content).ok();
3129 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3130 }
3131}
3132
3133pub async fn get_commerce_tokentransaction_by_tokentransactionid(configuration: &configuration::Configuration, tokentransactionid: &str) -> Result<(), Error<GetCommerceTokentransactionByTokentransactionidError>> {
3135 let p_tokentransactionid = tokentransactionid;
3137
3138 let uri_str = format!("{}/v1/commerce/tokentransaction/{tokentransactionid}", configuration.base_path, tokentransactionid=crate::apis::urlencode(p_tokentransactionid));
3139 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3140
3141 if let Some(ref user_agent) = configuration.user_agent {
3142 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3143 }
3144 if let Some(ref token) = configuration.bearer_access_token {
3145 req_builder = req_builder.bearer_auth(token.to_owned());
3146 };
3147
3148 let req = req_builder.build()?;
3149 let resp = configuration.client.execute(req).await?;
3150
3151 let status = resp.status();
3152
3153 if !status.is_client_error() && !status.is_server_error() {
3154 Ok(())
3155 } else {
3156 let content = resp.text().await?;
3157 let entity: Option<GetCommerceTokentransactionByTokentransactionidError> = serde_json::from_str(&content).ok();
3158 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3159 }
3160}
3161
3162pub async fn get_commerce_transfer(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceTransferError>> {
3164
3165 let uri_str = format!("{}/v1/commerce/transfer/", configuration.base_path);
3166 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3167
3168 if let Some(ref user_agent) = configuration.user_agent {
3169 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3170 }
3171 if let Some(ref token) = configuration.bearer_access_token {
3172 req_builder = req_builder.bearer_auth(token.to_owned());
3173 };
3174
3175 let req = req_builder.build()?;
3176 let resp = configuration.client.execute(req).await?;
3177
3178 let status = resp.status();
3179
3180 if !status.is_client_error() && !status.is_server_error() {
3181 Ok(())
3182 } else {
3183 let content = resp.text().await?;
3184 let entity: Option<GetCommerceTransferError> = serde_json::from_str(&content).ok();
3185 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3186 }
3187}
3188
3189pub async fn get_commerce_transfer_by_transferid(configuration: &configuration::Configuration, transferid: &str) -> Result<(), Error<GetCommerceTransferByTransferidError>> {
3191 let p_transferid = transferid;
3193
3194 let uri_str = format!("{}/v1/commerce/transfer/{transferid}", configuration.base_path, transferid=crate::apis::urlencode(p_transferid));
3195 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3196
3197 if let Some(ref user_agent) = configuration.user_agent {
3198 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3199 }
3200 if let Some(ref token) = configuration.bearer_access_token {
3201 req_builder = req_builder.bearer_auth(token.to_owned());
3202 };
3203
3204 let req = req_builder.build()?;
3205 let resp = configuration.client.execute(req).await?;
3206
3207 let status = resp.status();
3208
3209 if !status.is_client_error() && !status.is_server_error() {
3210 Ok(())
3211 } else {
3212 let content = resp.text().await?;
3213 let entity: Option<GetCommerceTransferByTransferidError> = serde_json::from_str(&content).ok();
3214 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3215 }
3216}
3217
3218pub async fn get_commerce_variant(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceVariantError>> {
3220
3221 let uri_str = format!("{}/v1/commerce/variant/", configuration.base_path);
3222 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3223
3224 if let Some(ref user_agent) = configuration.user_agent {
3225 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3226 }
3227 if let Some(ref token) = configuration.bearer_access_token {
3228 req_builder = req_builder.bearer_auth(token.to_owned());
3229 };
3230
3231 let req = req_builder.build()?;
3232 let resp = configuration.client.execute(req).await?;
3233
3234 let status = resp.status();
3235
3236 if !status.is_client_error() && !status.is_server_error() {
3237 Ok(())
3238 } else {
3239 let content = resp.text().await?;
3240 let entity: Option<GetCommerceVariantError> = serde_json::from_str(&content).ok();
3241 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3242 }
3243}
3244
3245pub async fn get_commerce_variant_by_variantid(configuration: &configuration::Configuration, variantid: &str) -> Result<(), Error<GetCommerceVariantByVariantidError>> {
3247 let p_variantid = variantid;
3249
3250 let uri_str = format!("{}/v1/commerce/variant/{variantid}", configuration.base_path, variantid=crate::apis::urlencode(p_variantid));
3251 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3252
3253 if let Some(ref user_agent) = configuration.user_agent {
3254 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3255 }
3256 if let Some(ref token) = configuration.bearer_access_token {
3257 req_builder = req_builder.bearer_auth(token.to_owned());
3258 };
3259
3260 let req = req_builder.build()?;
3261 let resp = configuration.client.execute(req).await?;
3262
3263 let status = resp.status();
3264
3265 if !status.is_client_error() && !status.is_server_error() {
3266 Ok(())
3267 } else {
3268 let content = resp.text().await?;
3269 let entity: Option<GetCommerceVariantByVariantidError> = serde_json::from_str(&content).ok();
3270 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3271 }
3272}
3273
3274pub async fn get_commerce_wallet(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceWalletError>> {
3276
3277 let uri_str = format!("{}/v1/commerce/wallet/", configuration.base_path);
3278 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3279
3280 if let Some(ref user_agent) = configuration.user_agent {
3281 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3282 }
3283 if let Some(ref token) = configuration.bearer_access_token {
3284 req_builder = req_builder.bearer_auth(token.to_owned());
3285 };
3286
3287 let req = req_builder.build()?;
3288 let resp = configuration.client.execute(req).await?;
3289
3290 let status = resp.status();
3291
3292 if !status.is_client_error() && !status.is_server_error() {
3293 Ok(())
3294 } else {
3295 let content = resp.text().await?;
3296 let entity: Option<GetCommerceWalletError> = serde_json::from_str(&content).ok();
3297 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3298 }
3299}
3300
3301pub async fn get_commerce_wallet_by_walletid(configuration: &configuration::Configuration, walletid: &str) -> Result<(), Error<GetCommerceWalletByWalletidError>> {
3303 let p_walletid = walletid;
3305
3306 let uri_str = format!("{}/v1/commerce/wallet/{walletid}", configuration.base_path, walletid=crate::apis::urlencode(p_walletid));
3307 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3308
3309 if let Some(ref user_agent) = configuration.user_agent {
3310 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3311 }
3312 if let Some(ref token) = configuration.bearer_access_token {
3313 req_builder = req_builder.bearer_auth(token.to_owned());
3314 };
3315
3316 let req = req_builder.build()?;
3317 let resp = configuration.client.execute(req).await?;
3318
3319 let status = resp.status();
3320
3321 if !status.is_client_error() && !status.is_server_error() {
3322 Ok(())
3323 } else {
3324 let content = resp.text().await?;
3325 let entity: Option<GetCommerceWalletByWalletidError> = serde_json::from_str(&content).ok();
3326 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3327 }
3328}
3329
3330pub async fn get_commerce_watchlist(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceWatchlistError>> {
3332
3333 let uri_str = format!("{}/v1/commerce/watchlist/", configuration.base_path);
3334 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3335
3336 if let Some(ref user_agent) = configuration.user_agent {
3337 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3338 }
3339 if let Some(ref token) = configuration.bearer_access_token {
3340 req_builder = req_builder.bearer_auth(token.to_owned());
3341 };
3342
3343 let req = req_builder.build()?;
3344 let resp = configuration.client.execute(req).await?;
3345
3346 let status = resp.status();
3347
3348 if !status.is_client_error() && !status.is_server_error() {
3349 Ok(())
3350 } else {
3351 let content = resp.text().await?;
3352 let entity: Option<GetCommerceWatchlistError> = serde_json::from_str(&content).ok();
3353 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3354 }
3355}
3356
3357pub async fn get_commerce_watchlist_by_watchlistid(configuration: &configuration::Configuration, watchlistid: &str) -> Result<(), Error<GetCommerceWatchlistByWatchlistidError>> {
3359 let p_watchlistid = watchlistid;
3361
3362 let uri_str = format!("{}/v1/commerce/watchlist/{watchlistid}", configuration.base_path, watchlistid=crate::apis::urlencode(p_watchlistid));
3363 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3364
3365 if let Some(ref user_agent) = configuration.user_agent {
3366 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3367 }
3368 if let Some(ref token) = configuration.bearer_access_token {
3369 req_builder = req_builder.bearer_auth(token.to_owned());
3370 };
3371
3372 let req = req_builder.build()?;
3373 let resp = configuration.client.execute(req).await?;
3374
3375 let status = resp.status();
3376
3377 if !status.is_client_error() && !status.is_server_error() {
3378 Ok(())
3379 } else {
3380 let content = resp.text().await?;
3381 let entity: Option<GetCommerceWatchlistByWatchlistidError> = serde_json::from_str(&content).ok();
3382 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3383 }
3384}
3385
3386pub async fn get_commerce_webhook(configuration: &configuration::Configuration, ) -> Result<(), Error<GetCommerceWebhookError>> {
3388
3389 let uri_str = format!("{}/v1/commerce/webhook/", configuration.base_path);
3390 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3391
3392 if let Some(ref user_agent) = configuration.user_agent {
3393 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3394 }
3395 if let Some(ref token) = configuration.bearer_access_token {
3396 req_builder = req_builder.bearer_auth(token.to_owned());
3397 };
3398
3399 let req = req_builder.build()?;
3400 let resp = configuration.client.execute(req).await?;
3401
3402 let status = resp.status();
3403
3404 if !status.is_client_error() && !status.is_server_error() {
3405 Ok(())
3406 } else {
3407 let content = resp.text().await?;
3408 let entity: Option<GetCommerceWebhookError> = serde_json::from_str(&content).ok();
3409 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3410 }
3411}
3412
3413pub async fn get_commerce_webhook_by_webhookid(configuration: &configuration::Configuration, webhookid: &str) -> Result<(), Error<GetCommerceWebhookByWebhookidError>> {
3415 let p_webhookid = webhookid;
3417
3418 let uri_str = format!("{}/v1/commerce/webhook/{webhookid}", configuration.base_path, webhookid=crate::apis::urlencode(p_webhookid));
3419 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3420
3421 if let Some(ref user_agent) = configuration.user_agent {
3422 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3423 }
3424 if let Some(ref token) = configuration.bearer_access_token {
3425 req_builder = req_builder.bearer_auth(token.to_owned());
3426 };
3427
3428 let req = req_builder.build()?;
3429 let resp = configuration.client.execute(req).await?;
3430
3431 let status = resp.status();
3432
3433 if !status.is_client_error() && !status.is_server_error() {
3434 Ok(())
3435 } else {
3436 let content = resp.text().await?;
3437 let entity: Option<GetCommerceWebhookByWebhookidError> = serde_json::from_str(&content).ok();
3438 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3439 }
3440}
3441
3442pub async fn get_payment(configuration: &configuration::Configuration, id: &str) -> Result<models::PaymentRecord, Error<GetPaymentError>> {
3444 let p_id = id;
3446
3447 let uri_str = format!("{}/v1/commerce/payments/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
3448 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3449
3450 if let Some(ref user_agent) = configuration.user_agent {
3451 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3452 }
3453 if let Some(ref token) = configuration.bearer_access_token {
3454 req_builder = req_builder.bearer_auth(token.to_owned());
3455 };
3456
3457 let req = req_builder.build()?;
3458 let resp = configuration.client.execute(req).await?;
3459
3460 let status = resp.status();
3461 let content_type = resp
3462 .headers()
3463 .get("content-type")
3464 .and_then(|v| v.to_str().ok())
3465 .unwrap_or("application/octet-stream");
3466 let content_type = super::ContentType::from(content_type);
3467
3468 if !status.is_client_error() && !status.is_server_error() {
3469 let content = resp.text().await?;
3470 match content_type {
3471 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3472 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentRecord`"))),
3473 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentRecord`")))),
3474 }
3475 } else {
3476 let content = resp.text().await?;
3477 let entity: Option<GetPaymentError> = serde_json::from_str(&content).ok();
3478 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3479 }
3480}
3481
3482pub async fn open_cart(configuration: &configuration::Configuration, cart_open: models::CartOpen) -> Result<models::Cart, Error<OpenCartError>> {
3484 let p_cart_open = cart_open;
3486
3487 let uri_str = format!("{}/v1/commerce/cart", configuration.base_path);
3488 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3489
3490 if let Some(ref user_agent) = configuration.user_agent {
3491 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3492 }
3493 if let Some(ref token) = configuration.bearer_access_token {
3494 req_builder = req_builder.bearer_auth(token.to_owned());
3495 };
3496 req_builder = req_builder.json(&p_cart_open);
3497
3498 let req = req_builder.build()?;
3499 let resp = configuration.client.execute(req).await?;
3500
3501 let status = resp.status();
3502 let content_type = resp
3503 .headers()
3504 .get("content-type")
3505 .and_then(|v| v.to_str().ok())
3506 .unwrap_or("application/octet-stream");
3507 let content_type = super::ContentType::from(content_type);
3508
3509 if !status.is_client_error() && !status.is_server_error() {
3510 let content = resp.text().await?;
3511 match content_type {
3512 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3513 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Cart`"))),
3514 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Cart`")))),
3515 }
3516 } else {
3517 let content = resp.text().await?;
3518 let entity: Option<OpenCartError> = serde_json::from_str(&content).ok();
3519 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3520 }
3521}
3522
3523pub async fn patch_commerce_collection_by_collectionid(configuration: &configuration::Configuration, collectionid: &str) -> Result<(), Error<PatchCommerceCollectionByCollectionidError>> {
3525 let p_collectionid = collectionid;
3527
3528 let uri_str = format!("{}/v1/commerce/collection/{collectionid}", configuration.base_path, collectionid=crate::apis::urlencode(p_collectionid));
3529 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3530
3531 if let Some(ref user_agent) = configuration.user_agent {
3532 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3533 }
3534 if let Some(ref token) = configuration.bearer_access_token {
3535 req_builder = req_builder.bearer_auth(token.to_owned());
3536 };
3537
3538 let req = req_builder.build()?;
3539 let resp = configuration.client.execute(req).await?;
3540
3541 let status = resp.status();
3542
3543 if !status.is_client_error() && !status.is_server_error() {
3544 Ok(())
3545 } else {
3546 let content = resp.text().await?;
3547 let entity: Option<PatchCommerceCollectionByCollectionidError> = serde_json::from_str(&content).ok();
3548 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3549 }
3550}
3551
3552pub async fn patch_commerce_disclosure_by_disclosureid(configuration: &configuration::Configuration, disclosureid: &str) -> Result<(), Error<PatchCommerceDisclosureByDisclosureidError>> {
3554 let p_disclosureid = disclosureid;
3556
3557 let uri_str = format!("{}/v1/commerce/disclosure/{disclosureid}", configuration.base_path, disclosureid=crate::apis::urlencode(p_disclosureid));
3558 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3559
3560 if let Some(ref user_agent) = configuration.user_agent {
3561 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3562 }
3563 if let Some(ref token) = configuration.bearer_access_token {
3564 req_builder = req_builder.bearer_auth(token.to_owned());
3565 };
3566
3567 let req = req_builder.build()?;
3568 let resp = configuration.client.execute(req).await?;
3569
3570 let status = resp.status();
3571
3572 if !status.is_client_error() && !status.is_server_error() {
3573 Ok(())
3574 } else {
3575 let content = resp.text().await?;
3576 let entity: Option<PatchCommerceDisclosureByDisclosureidError> = serde_json::from_str(&content).ok();
3577 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3578 }
3579}
3580
3581pub async fn patch_commerce_discount_by_discountid(configuration: &configuration::Configuration, discountid: &str) -> Result<(), Error<PatchCommerceDiscountByDiscountidError>> {
3583 let p_discountid = discountid;
3585
3586 let uri_str = format!("{}/v1/commerce/discount/{discountid}", configuration.base_path, discountid=crate::apis::urlencode(p_discountid));
3587 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3588
3589 if let Some(ref user_agent) = configuration.user_agent {
3590 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3591 }
3592 if let Some(ref token) = configuration.bearer_access_token {
3593 req_builder = req_builder.bearer_auth(token.to_owned());
3594 };
3595
3596 let req = req_builder.build()?;
3597 let resp = configuration.client.execute(req).await?;
3598
3599 let status = resp.status();
3600
3601 if !status.is_client_error() && !status.is_server_error() {
3602 Ok(())
3603 } else {
3604 let content = resp.text().await?;
3605 let entity: Option<PatchCommerceDiscountByDiscountidError> = serde_json::from_str(&content).ok();
3606 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3607 }
3608}
3609
3610pub async fn patch_commerce_movie_by_movieid(configuration: &configuration::Configuration, movieid: &str) -> Result<(), Error<PatchCommerceMovieByMovieidError>> {
3612 let p_movieid = movieid;
3614
3615 let uri_str = format!("{}/v1/commerce/movie/{movieid}", configuration.base_path, movieid=crate::apis::urlencode(p_movieid));
3616 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3617
3618 if let Some(ref user_agent) = configuration.user_agent {
3619 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3620 }
3621 if let Some(ref token) = configuration.bearer_access_token {
3622 req_builder = req_builder.bearer_auth(token.to_owned());
3623 };
3624
3625 let req = req_builder.build()?;
3626 let resp = configuration.client.execute(req).await?;
3627
3628 let status = resp.status();
3629
3630 if !status.is_client_error() && !status.is_server_error() {
3631 Ok(())
3632 } else {
3633 let content = resp.text().await?;
3634 let entity: Option<PatchCommerceMovieByMovieidError> = serde_json::from_str(&content).ok();
3635 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3636 }
3637}
3638
3639pub async fn patch_commerce_note_by_noteid(configuration: &configuration::Configuration, noteid: &str) -> Result<(), Error<PatchCommerceNoteByNoteidError>> {
3641 let p_noteid = noteid;
3643
3644 let uri_str = format!("{}/v1/commerce/note/{noteid}", configuration.base_path, noteid=crate::apis::urlencode(p_noteid));
3645 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3646
3647 if let Some(ref user_agent) = configuration.user_agent {
3648 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3649 }
3650 if let Some(ref token) = configuration.bearer_access_token {
3651 req_builder = req_builder.bearer_auth(token.to_owned());
3652 };
3653
3654 let req = req_builder.build()?;
3655 let resp = configuration.client.execute(req).await?;
3656
3657 let status = resp.status();
3658
3659 if !status.is_client_error() && !status.is_server_error() {
3660 Ok(())
3661 } else {
3662 let content = resp.text().await?;
3663 let entity: Option<PatchCommerceNoteByNoteidError> = serde_json::from_str(&content).ok();
3664 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3665 }
3666}
3667
3668pub async fn patch_commerce_product_by_productid(configuration: &configuration::Configuration, productid: &str) -> Result<(), Error<PatchCommerceProductByProductidError>> {
3670 let p_productid = productid;
3672
3673 let uri_str = format!("{}/v1/commerce/product/{productid}", configuration.base_path, productid=crate::apis::urlencode(p_productid));
3674 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3675
3676 if let Some(ref user_agent) = configuration.user_agent {
3677 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3678 }
3679 if let Some(ref token) = configuration.bearer_access_token {
3680 req_builder = req_builder.bearer_auth(token.to_owned());
3681 };
3682
3683 let req = req_builder.build()?;
3684 let resp = configuration.client.execute(req).await?;
3685
3686 let status = resp.status();
3687
3688 if !status.is_client_error() && !status.is_server_error() {
3689 Ok(())
3690 } else {
3691 let content = resp.text().await?;
3692 let entity: Option<PatchCommerceProductByProductidError> = serde_json::from_str(&content).ok();
3693 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3694 }
3695}
3696
3697pub async fn patch_commerce_return_by_returnid(configuration: &configuration::Configuration, returnid: &str) -> Result<(), Error<PatchCommerceReturnByReturnidError>> {
3699 let p_returnid = returnid;
3701
3702 let uri_str = format!("{}/v1/commerce/return/{returnid}", configuration.base_path, returnid=crate::apis::urlencode(p_returnid));
3703 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3704
3705 if let Some(ref user_agent) = configuration.user_agent {
3706 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3707 }
3708 if let Some(ref token) = configuration.bearer_access_token {
3709 req_builder = req_builder.bearer_auth(token.to_owned());
3710 };
3711
3712 let req = req_builder.build()?;
3713 let resp = configuration.client.execute(req).await?;
3714
3715 let status = resp.status();
3716
3717 if !status.is_client_error() && !status.is_server_error() {
3718 Ok(())
3719 } else {
3720 let content = resp.text().await?;
3721 let entity: Option<PatchCommerceReturnByReturnidError> = serde_json::from_str(&content).ok();
3722 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3723 }
3724}
3725
3726pub async fn patch_commerce_saleschannel_by_saleschannelid(configuration: &configuration::Configuration, saleschannelid: &str) -> Result<(), Error<PatchCommerceSaleschannelBySaleschannelidError>> {
3728 let p_saleschannelid = saleschannelid;
3730
3731 let uri_str = format!("{}/v1/commerce/saleschannel/{saleschannelid}", configuration.base_path, saleschannelid=crate::apis::urlencode(p_saleschannelid));
3732 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3733
3734 if let Some(ref user_agent) = configuration.user_agent {
3735 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3736 }
3737 if let Some(ref token) = configuration.bearer_access_token {
3738 req_builder = req_builder.bearer_auth(token.to_owned());
3739 };
3740
3741 let req = req_builder.build()?;
3742 let resp = configuration.client.execute(req).await?;
3743
3744 let status = resp.status();
3745
3746 if !status.is_client_error() && !status.is_server_error() {
3747 Ok(())
3748 } else {
3749 let content = resp.text().await?;
3750 let entity: Option<PatchCommerceSaleschannelBySaleschannelidError> = serde_json::from_str(&content).ok();
3751 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3752 }
3753}
3754
3755pub async fn patch_commerce_stocklocation_by_stocklocationid(configuration: &configuration::Configuration, stocklocationid: &str) -> Result<(), Error<PatchCommerceStocklocationByStocklocationidError>> {
3757 let p_stocklocationid = stocklocationid;
3759
3760 let uri_str = format!("{}/v1/commerce/stocklocation/{stocklocationid}", configuration.base_path, stocklocationid=crate::apis::urlencode(p_stocklocationid));
3761 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3762
3763 if let Some(ref user_agent) = configuration.user_agent {
3764 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3765 }
3766 if let Some(ref token) = configuration.bearer_access_token {
3767 req_builder = req_builder.bearer_auth(token.to_owned());
3768 };
3769
3770 let req = req_builder.build()?;
3771 let resp = configuration.client.execute(req).await?;
3772
3773 let status = resp.status();
3774
3775 if !status.is_client_error() && !status.is_server_error() {
3776 Ok(())
3777 } else {
3778 let content = resp.text().await?;
3779 let entity: Option<PatchCommerceStocklocationByStocklocationidError> = serde_json::from_str(&content).ok();
3780 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3781 }
3782}
3783
3784pub async fn patch_commerce_store_by_storeid(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PatchCommerceStoreByStoreidError>> {
3786 let p_storeid = storeid;
3788
3789 let uri_str = format!("{}/v1/commerce/store/{storeid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
3790 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3791
3792 if let Some(ref user_agent) = configuration.user_agent {
3793 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3794 }
3795 if let Some(ref token) = configuration.bearer_access_token {
3796 req_builder = req_builder.bearer_auth(token.to_owned());
3797 };
3798
3799 let req = req_builder.build()?;
3800 let resp = configuration.client.execute(req).await?;
3801
3802 let status = resp.status();
3803
3804 if !status.is_client_error() && !status.is_server_error() {
3805 Ok(())
3806 } else {
3807 let content = resp.text().await?;
3808 let entity: Option<PatchCommerceStoreByStoreidError> = serde_json::from_str(&content).ok();
3809 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3810 }
3811}
3812
3813pub async fn patch_commerce_store_by_storeid_listing_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<PatchCommerceStoreByStoreidListingByKeyError>> {
3815 let p_storeid = storeid;
3817 let p_key = key;
3818
3819 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
3820 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3821
3822 if let Some(ref user_agent) = configuration.user_agent {
3823 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3824 }
3825 if let Some(ref token) = configuration.bearer_access_token {
3826 req_builder = req_builder.bearer_auth(token.to_owned());
3827 };
3828
3829 let req = req_builder.build()?;
3830 let resp = configuration.client.execute(req).await?;
3831
3832 let status = resp.status();
3833
3834 if !status.is_client_error() && !status.is_server_error() {
3835 Ok(())
3836 } else {
3837 let content = resp.text().await?;
3838 let entity: Option<PatchCommerceStoreByStoreidListingByKeyError> = serde_json::from_str(&content).ok();
3839 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3840 }
3841}
3842
3843pub async fn patch_commerce_submission_by_submissionid(configuration: &configuration::Configuration, submissionid: &str) -> Result<(), Error<PatchCommerceSubmissionBySubmissionidError>> {
3845 let p_submissionid = submissionid;
3847
3848 let uri_str = format!("{}/v1/commerce/submission/{submissionid}", configuration.base_path, submissionid=crate::apis::urlencode(p_submissionid));
3849 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3850
3851 if let Some(ref user_agent) = configuration.user_agent {
3852 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3853 }
3854 if let Some(ref token) = configuration.bearer_access_token {
3855 req_builder = req_builder.bearer_auth(token.to_owned());
3856 };
3857
3858 let req = req_builder.build()?;
3859 let resp = configuration.client.execute(req).await?;
3860
3861 let status = resp.status();
3862
3863 if !status.is_client_error() && !status.is_server_error() {
3864 Ok(())
3865 } else {
3866 let content = resp.text().await?;
3867 let entity: Option<PatchCommerceSubmissionBySubmissionidError> = serde_json::from_str(&content).ok();
3868 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3869 }
3870}
3871
3872pub async fn patch_commerce_subscriber_by_subscriberid(configuration: &configuration::Configuration, subscriberid: &str) -> Result<(), Error<PatchCommerceSubscriberBySubscriberidError>> {
3874 let p_subscriberid = subscriberid;
3876
3877 let uri_str = format!("{}/v1/commerce/subscriber/{subscriberid}", configuration.base_path, subscriberid=crate::apis::urlencode(p_subscriberid));
3878 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3879
3880 if let Some(ref user_agent) = configuration.user_agent {
3881 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3882 }
3883 if let Some(ref token) = configuration.bearer_access_token {
3884 req_builder = req_builder.bearer_auth(token.to_owned());
3885 };
3886
3887 let req = req_builder.build()?;
3888 let resp = configuration.client.execute(req).await?;
3889
3890 let status = resp.status();
3891
3892 if !status.is_client_error() && !status.is_server_error() {
3893 Ok(())
3894 } else {
3895 let content = resp.text().await?;
3896 let entity: Option<PatchCommerceSubscriberBySubscriberidError> = serde_json::from_str(&content).ok();
3897 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3898 }
3899}
3900
3901pub async fn patch_commerce_tokentransaction_by_tokentransactionid(configuration: &configuration::Configuration, tokentransactionid: &str) -> Result<(), Error<PatchCommerceTokentransactionByTokentransactionidError>> {
3903 let p_tokentransactionid = tokentransactionid;
3905
3906 let uri_str = format!("{}/v1/commerce/tokentransaction/{tokentransactionid}", configuration.base_path, tokentransactionid=crate::apis::urlencode(p_tokentransactionid));
3907 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3908
3909 if let Some(ref user_agent) = configuration.user_agent {
3910 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3911 }
3912 if let Some(ref token) = configuration.bearer_access_token {
3913 req_builder = req_builder.bearer_auth(token.to_owned());
3914 };
3915
3916 let req = req_builder.build()?;
3917 let resp = configuration.client.execute(req).await?;
3918
3919 let status = resp.status();
3920
3921 if !status.is_client_error() && !status.is_server_error() {
3922 Ok(())
3923 } else {
3924 let content = resp.text().await?;
3925 let entity: Option<PatchCommerceTokentransactionByTokentransactionidError> = serde_json::from_str(&content).ok();
3926 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3927 }
3928}
3929
3930pub async fn patch_commerce_transfer_by_transferid(configuration: &configuration::Configuration, transferid: &str) -> Result<(), Error<PatchCommerceTransferByTransferidError>> {
3932 let p_transferid = transferid;
3934
3935 let uri_str = format!("{}/v1/commerce/transfer/{transferid}", configuration.base_path, transferid=crate::apis::urlencode(p_transferid));
3936 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3937
3938 if let Some(ref user_agent) = configuration.user_agent {
3939 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3940 }
3941 if let Some(ref token) = configuration.bearer_access_token {
3942 req_builder = req_builder.bearer_auth(token.to_owned());
3943 };
3944
3945 let req = req_builder.build()?;
3946 let resp = configuration.client.execute(req).await?;
3947
3948 let status = resp.status();
3949
3950 if !status.is_client_error() && !status.is_server_error() {
3951 Ok(())
3952 } else {
3953 let content = resp.text().await?;
3954 let entity: Option<PatchCommerceTransferByTransferidError> = serde_json::from_str(&content).ok();
3955 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3956 }
3957}
3958
3959pub async fn patch_commerce_variant_by_variantid(configuration: &configuration::Configuration, variantid: &str) -> Result<(), Error<PatchCommerceVariantByVariantidError>> {
3961 let p_variantid = variantid;
3963
3964 let uri_str = format!("{}/v1/commerce/variant/{variantid}", configuration.base_path, variantid=crate::apis::urlencode(p_variantid));
3965 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3966
3967 if let Some(ref user_agent) = configuration.user_agent {
3968 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3969 }
3970 if let Some(ref token) = configuration.bearer_access_token {
3971 req_builder = req_builder.bearer_auth(token.to_owned());
3972 };
3973
3974 let req = req_builder.build()?;
3975 let resp = configuration.client.execute(req).await?;
3976
3977 let status = resp.status();
3978
3979 if !status.is_client_error() && !status.is_server_error() {
3980 Ok(())
3981 } else {
3982 let content = resp.text().await?;
3983 let entity: Option<PatchCommerceVariantByVariantidError> = serde_json::from_str(&content).ok();
3984 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3985 }
3986}
3987
3988pub async fn patch_commerce_wallet_by_walletid(configuration: &configuration::Configuration, walletid: &str) -> Result<(), Error<PatchCommerceWalletByWalletidError>> {
3990 let p_walletid = walletid;
3992
3993 let uri_str = format!("{}/v1/commerce/wallet/{walletid}", configuration.base_path, walletid=crate::apis::urlencode(p_walletid));
3994 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3995
3996 if let Some(ref user_agent) = configuration.user_agent {
3997 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3998 }
3999 if let Some(ref token) = configuration.bearer_access_token {
4000 req_builder = req_builder.bearer_auth(token.to_owned());
4001 };
4002
4003 let req = req_builder.build()?;
4004 let resp = configuration.client.execute(req).await?;
4005
4006 let status = resp.status();
4007
4008 if !status.is_client_error() && !status.is_server_error() {
4009 Ok(())
4010 } else {
4011 let content = resp.text().await?;
4012 let entity: Option<PatchCommerceWalletByWalletidError> = serde_json::from_str(&content).ok();
4013 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4014 }
4015}
4016
4017pub async fn patch_commerce_watchlist_by_watchlistid(configuration: &configuration::Configuration, watchlistid: &str) -> Result<(), Error<PatchCommerceWatchlistByWatchlistidError>> {
4019 let p_watchlistid = watchlistid;
4021
4022 let uri_str = format!("{}/v1/commerce/watchlist/{watchlistid}", configuration.base_path, watchlistid=crate::apis::urlencode(p_watchlistid));
4023 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
4024
4025 if let Some(ref user_agent) = configuration.user_agent {
4026 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4027 }
4028 if let Some(ref token) = configuration.bearer_access_token {
4029 req_builder = req_builder.bearer_auth(token.to_owned());
4030 };
4031
4032 let req = req_builder.build()?;
4033 let resp = configuration.client.execute(req).await?;
4034
4035 let status = resp.status();
4036
4037 if !status.is_client_error() && !status.is_server_error() {
4038 Ok(())
4039 } else {
4040 let content = resp.text().await?;
4041 let entity: Option<PatchCommerceWatchlistByWatchlistidError> = serde_json::from_str(&content).ok();
4042 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4043 }
4044}
4045
4046pub async fn patch_commerce_webhook_by_webhookid(configuration: &configuration::Configuration, webhookid: &str) -> Result<(), Error<PatchCommerceWebhookByWebhookidError>> {
4048 let p_webhookid = webhookid;
4050
4051 let uri_str = format!("{}/v1/commerce/webhook/{webhookid}", configuration.base_path, webhookid=crate::apis::urlencode(p_webhookid));
4052 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
4053
4054 if let Some(ref user_agent) = configuration.user_agent {
4055 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4056 }
4057 if let Some(ref token) = configuration.bearer_access_token {
4058 req_builder = req_builder.bearer_auth(token.to_owned());
4059 };
4060
4061 let req = req_builder.build()?;
4062 let resp = configuration.client.execute(req).await?;
4063
4064 let status = resp.status();
4065
4066 if !status.is_client_error() && !status.is_server_error() {
4067 Ok(())
4068 } else {
4069 let content = resp.text().await?;
4070 let entity: Option<PatchCommerceWebhookByWebhookidError> = serde_json::from_str(&content).ok();
4071 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4072 }
4073}
4074
4075pub async fn post_commerce_catalog_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceCatalogEntriesError>> {
4077
4078 let uri_str = format!("{}/v1/commerce/catalog/entries", configuration.base_path);
4079 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4080
4081 if let Some(ref user_agent) = configuration.user_agent {
4082 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4083 }
4084 if let Some(ref token) = configuration.bearer_access_token {
4085 req_builder = req_builder.bearer_auth(token.to_owned());
4086 };
4087
4088 let req = req_builder.build()?;
4089 let resp = configuration.client.execute(req).await?;
4090
4091 let status = resp.status();
4092
4093 if !status.is_client_error() && !status.is_server_error() {
4094 Ok(())
4095 } else {
4096 let content = resp.text().await?;
4097 let entity: Option<PostCommerceCatalogEntriesError> = serde_json::from_str(&content).ok();
4098 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4099 }
4100}
4101
4102pub async fn post_commerce_catalog_models(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceCatalogModelsError>> {
4104
4105 let uri_str = format!("{}/v1/commerce/catalog/models", configuration.base_path);
4106 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4107
4108 if let Some(ref user_agent) = configuration.user_agent {
4109 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4110 }
4111 if let Some(ref token) = configuration.bearer_access_token {
4112 req_builder = req_builder.bearer_auth(token.to_owned());
4113 };
4114
4115 let req = req_builder.build()?;
4116 let resp = configuration.client.execute(req).await?;
4117
4118 let status = resp.status();
4119
4120 if !status.is_client_error() && !status.is_server_error() {
4121 Ok(())
4122 } else {
4123 let content = resp.text().await?;
4124 let entity: Option<PostCommerceCatalogModelsError> = serde_json::from_str(&content).ok();
4125 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4126 }
4127}
4128
4129pub async fn post_commerce_catalog_models_refresh(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceCatalogModelsRefreshError>> {
4131
4132 let uri_str = format!("{}/v1/commerce/catalog/models/refresh", configuration.base_path);
4133 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4134
4135 if let Some(ref user_agent) = configuration.user_agent {
4136 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4137 }
4138 if let Some(ref token) = configuration.bearer_access_token {
4139 req_builder = req_builder.bearer_auth(token.to_owned());
4140 };
4141
4142 let req = req_builder.build()?;
4143 let resp = configuration.client.execute(req).await?;
4144
4145 let status = resp.status();
4146
4147 if !status.is_client_error() && !status.is_server_error() {
4148 Ok(())
4149 } else {
4150 let content = resp.text().await?;
4151 let entity: Option<PostCommerceCatalogModelsRefreshError> = serde_json::from_str(&content).ok();
4152 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4153 }
4154}
4155
4156pub async fn post_commerce_catalog_seed(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceCatalogSeedError>> {
4158
4159 let uri_str = format!("{}/v1/commerce/catalog/seed", configuration.base_path);
4160 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4161
4162 if let Some(ref user_agent) = configuration.user_agent {
4163 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4164 }
4165 if let Some(ref token) = configuration.bearer_access_token {
4166 req_builder = req_builder.bearer_auth(token.to_owned());
4167 };
4168
4169 let req = req_builder.build()?;
4170 let resp = configuration.client.execute(req).await?;
4171
4172 let status = resp.status();
4173
4174 if !status.is_client_error() && !status.is_server_error() {
4175 Ok(())
4176 } else {
4177 let content = resp.text().await?;
4178 let entity: Option<PostCommerceCatalogSeedError> = serde_json::from_str(&content).ok();
4179 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4180 }
4181}
4182
4183pub async fn post_commerce_collection(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceCollectionError>> {
4185
4186 let uri_str = format!("{}/v1/commerce/collection/", configuration.base_path);
4187 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4188
4189 if let Some(ref user_agent) = configuration.user_agent {
4190 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4191 }
4192 if let Some(ref token) = configuration.bearer_access_token {
4193 req_builder = req_builder.bearer_auth(token.to_owned());
4194 };
4195
4196 let req = req_builder.build()?;
4197 let resp = configuration.client.execute(req).await?;
4198
4199 let status = resp.status();
4200
4201 if !status.is_client_error() && !status.is_server_error() {
4202 Ok(())
4203 } else {
4204 let content = resp.text().await?;
4205 let entity: Option<PostCommerceCollectionError> = serde_json::from_str(&content).ok();
4206 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4207 }
4208}
4209
4210pub async fn post_commerce_collection_by_collectionid(configuration: &configuration::Configuration, collectionid: &str) -> Result<(), Error<PostCommerceCollectionByCollectionidError>> {
4212 let p_collectionid = collectionid;
4214
4215 let uri_str = format!("{}/v1/commerce/collection/{collectionid}", configuration.base_path, collectionid=crate::apis::urlencode(p_collectionid));
4216 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4217
4218 if let Some(ref user_agent) = configuration.user_agent {
4219 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4220 }
4221 if let Some(ref token) = configuration.bearer_access_token {
4222 req_builder = req_builder.bearer_auth(token.to_owned());
4223 };
4224
4225 let req = req_builder.build()?;
4226 let resp = configuration.client.execute(req).await?;
4227
4228 let status = resp.status();
4229
4230 if !status.is_client_error() && !status.is_server_error() {
4231 Ok(())
4232 } else {
4233 let content = resp.text().await?;
4234 let entity: Option<PostCommerceCollectionByCollectionidError> = serde_json::from_str(&content).ok();
4235 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4236 }
4237}
4238
4239pub async fn post_commerce_disclosure(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceDisclosureError>> {
4241
4242 let uri_str = format!("{}/v1/commerce/disclosure/", configuration.base_path);
4243 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4244
4245 if let Some(ref user_agent) = configuration.user_agent {
4246 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4247 }
4248 if let Some(ref token) = configuration.bearer_access_token {
4249 req_builder = req_builder.bearer_auth(token.to_owned());
4250 };
4251
4252 let req = req_builder.build()?;
4253 let resp = configuration.client.execute(req).await?;
4254
4255 let status = resp.status();
4256
4257 if !status.is_client_error() && !status.is_server_error() {
4258 Ok(())
4259 } else {
4260 let content = resp.text().await?;
4261 let entity: Option<PostCommerceDisclosureError> = serde_json::from_str(&content).ok();
4262 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4263 }
4264}
4265
4266pub async fn post_commerce_disclosure_by_disclosureid(configuration: &configuration::Configuration, disclosureid: &str) -> Result<(), Error<PostCommerceDisclosureByDisclosureidError>> {
4268 let p_disclosureid = disclosureid;
4270
4271 let uri_str = format!("{}/v1/commerce/disclosure/{disclosureid}", configuration.base_path, disclosureid=crate::apis::urlencode(p_disclosureid));
4272 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4273
4274 if let Some(ref user_agent) = configuration.user_agent {
4275 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4276 }
4277 if let Some(ref token) = configuration.bearer_access_token {
4278 req_builder = req_builder.bearer_auth(token.to_owned());
4279 };
4280
4281 let req = req_builder.build()?;
4282 let resp = configuration.client.execute(req).await?;
4283
4284 let status = resp.status();
4285
4286 if !status.is_client_error() && !status.is_server_error() {
4287 Ok(())
4288 } else {
4289 let content = resp.text().await?;
4290 let entity: Option<PostCommerceDisclosureByDisclosureidError> = serde_json::from_str(&content).ok();
4291 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4292 }
4293}
4294
4295pub async fn post_commerce_discount(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceDiscountError>> {
4297
4298 let uri_str = format!("{}/v1/commerce/discount/", configuration.base_path);
4299 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4300
4301 if let Some(ref user_agent) = configuration.user_agent {
4302 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4303 }
4304 if let Some(ref token) = configuration.bearer_access_token {
4305 req_builder = req_builder.bearer_auth(token.to_owned());
4306 };
4307
4308 let req = req_builder.build()?;
4309 let resp = configuration.client.execute(req).await?;
4310
4311 let status = resp.status();
4312
4313 if !status.is_client_error() && !status.is_server_error() {
4314 Ok(())
4315 } else {
4316 let content = resp.text().await?;
4317 let entity: Option<PostCommerceDiscountError> = serde_json::from_str(&content).ok();
4318 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4319 }
4320}
4321
4322pub async fn post_commerce_discount_by_discountid(configuration: &configuration::Configuration, discountid: &str) -> Result<(), Error<PostCommerceDiscountByDiscountidError>> {
4324 let p_discountid = discountid;
4326
4327 let uri_str = format!("{}/v1/commerce/discount/{discountid}", configuration.base_path, discountid=crate::apis::urlencode(p_discountid));
4328 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4329
4330 if let Some(ref user_agent) = configuration.user_agent {
4331 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4332 }
4333 if let Some(ref token) = configuration.bearer_access_token {
4334 req_builder = req_builder.bearer_auth(token.to_owned());
4335 };
4336
4337 let req = req_builder.build()?;
4338 let resp = configuration.client.execute(req).await?;
4339
4340 let status = resp.status();
4341
4342 if !status.is_client_error() && !status.is_server_error() {
4343 Ok(())
4344 } else {
4345 let content = resp.text().await?;
4346 let entity: Option<PostCommerceDiscountByDiscountidError> = serde_json::from_str(&content).ok();
4347 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4348 }
4349}
4350
4351pub async fn post_commerce_movie(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceMovieError>> {
4353
4354 let uri_str = format!("{}/v1/commerce/movie/", configuration.base_path);
4355 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4356
4357 if let Some(ref user_agent) = configuration.user_agent {
4358 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4359 }
4360 if let Some(ref token) = configuration.bearer_access_token {
4361 req_builder = req_builder.bearer_auth(token.to_owned());
4362 };
4363
4364 let req = req_builder.build()?;
4365 let resp = configuration.client.execute(req).await?;
4366
4367 let status = resp.status();
4368
4369 if !status.is_client_error() && !status.is_server_error() {
4370 Ok(())
4371 } else {
4372 let content = resp.text().await?;
4373 let entity: Option<PostCommerceMovieError> = serde_json::from_str(&content).ok();
4374 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4375 }
4376}
4377
4378pub async fn post_commerce_movie_by_movieid(configuration: &configuration::Configuration, movieid: &str) -> Result<(), Error<PostCommerceMovieByMovieidError>> {
4380 let p_movieid = movieid;
4382
4383 let uri_str = format!("{}/v1/commerce/movie/{movieid}", configuration.base_path, movieid=crate::apis::urlencode(p_movieid));
4384 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4385
4386 if let Some(ref user_agent) = configuration.user_agent {
4387 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4388 }
4389 if let Some(ref token) = configuration.bearer_access_token {
4390 req_builder = req_builder.bearer_auth(token.to_owned());
4391 };
4392
4393 let req = req_builder.build()?;
4394 let resp = configuration.client.execute(req).await?;
4395
4396 let status = resp.status();
4397
4398 if !status.is_client_error() && !status.is_server_error() {
4399 Ok(())
4400 } else {
4401 let content = resp.text().await?;
4402 let entity: Option<PostCommerceMovieByMovieidError> = serde_json::from_str(&content).ok();
4403 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4404 }
4405}
4406
4407pub async fn post_commerce_note(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceNoteError>> {
4409
4410 let uri_str = format!("{}/v1/commerce/note/", configuration.base_path);
4411 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4412
4413 if let Some(ref user_agent) = configuration.user_agent {
4414 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4415 }
4416 if let Some(ref token) = configuration.bearer_access_token {
4417 req_builder = req_builder.bearer_auth(token.to_owned());
4418 };
4419
4420 let req = req_builder.build()?;
4421 let resp = configuration.client.execute(req).await?;
4422
4423 let status = resp.status();
4424
4425 if !status.is_client_error() && !status.is_server_error() {
4426 Ok(())
4427 } else {
4428 let content = resp.text().await?;
4429 let entity: Option<PostCommerceNoteError> = serde_json::from_str(&content).ok();
4430 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4431 }
4432}
4433
4434pub async fn post_commerce_note_by_noteid(configuration: &configuration::Configuration, noteid: &str) -> Result<(), Error<PostCommerceNoteByNoteidError>> {
4436 let p_noteid = noteid;
4438
4439 let uri_str = format!("{}/v1/commerce/note/{noteid}", configuration.base_path, noteid=crate::apis::urlencode(p_noteid));
4440 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4441
4442 if let Some(ref user_agent) = configuration.user_agent {
4443 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4444 }
4445 if let Some(ref token) = configuration.bearer_access_token {
4446 req_builder = req_builder.bearer_auth(token.to_owned());
4447 };
4448
4449 let req = req_builder.build()?;
4450 let resp = configuration.client.execute(req).await?;
4451
4452 let status = resp.status();
4453
4454 if !status.is_client_error() && !status.is_server_error() {
4455 Ok(())
4456 } else {
4457 let content = resp.text().await?;
4458 let entity: Option<PostCommerceNoteByNoteidError> = serde_json::from_str(&content).ok();
4459 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4460 }
4461}
4462
4463pub async fn post_commerce_plans_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommercePlansEntriesError>> {
4465
4466 let uri_str = format!("{}/v1/commerce/plans/entries", configuration.base_path);
4467 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4468
4469 if let Some(ref user_agent) = configuration.user_agent {
4470 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4471 }
4472 if let Some(ref token) = configuration.bearer_access_token {
4473 req_builder = req_builder.bearer_auth(token.to_owned());
4474 };
4475
4476 let req = req_builder.build()?;
4477 let resp = configuration.client.execute(req).await?;
4478
4479 let status = resp.status();
4480
4481 if !status.is_client_error() && !status.is_server_error() {
4482 Ok(())
4483 } else {
4484 let content = resp.text().await?;
4485 let entity: Option<PostCommercePlansEntriesError> = serde_json::from_str(&content).ok();
4486 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4487 }
4488}
4489
4490pub async fn post_commerce_plans_seed(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommercePlansSeedError>> {
4492
4493 let uri_str = format!("{}/v1/commerce/plans/seed", configuration.base_path);
4494 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4495
4496 if let Some(ref user_agent) = configuration.user_agent {
4497 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4498 }
4499 if let Some(ref token) = configuration.bearer_access_token {
4500 req_builder = req_builder.bearer_auth(token.to_owned());
4501 };
4502
4503 let req = req_builder.build()?;
4504 let resp = configuration.client.execute(req).await?;
4505
4506 let status = resp.status();
4507
4508 if !status.is_client_error() && !status.is_server_error() {
4509 Ok(())
4510 } else {
4511 let content = resp.text().await?;
4512 let entity: Option<PostCommercePlansSeedError> = serde_json::from_str(&content).ok();
4513 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4514 }
4515}
4516
4517pub async fn post_commerce_product(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceProductError>> {
4519
4520 let uri_str = format!("{}/v1/commerce/product/", configuration.base_path);
4521 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4522
4523 if let Some(ref user_agent) = configuration.user_agent {
4524 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4525 }
4526 if let Some(ref token) = configuration.bearer_access_token {
4527 req_builder = req_builder.bearer_auth(token.to_owned());
4528 };
4529
4530 let req = req_builder.build()?;
4531 let resp = configuration.client.execute(req).await?;
4532
4533 let status = resp.status();
4534
4535 if !status.is_client_error() && !status.is_server_error() {
4536 Ok(())
4537 } else {
4538 let content = resp.text().await?;
4539 let entity: Option<PostCommerceProductError> = serde_json::from_str(&content).ok();
4540 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4541 }
4542}
4543
4544pub async fn post_commerce_product_by_productid(configuration: &configuration::Configuration, productid: &str) -> Result<(), Error<PostCommerceProductByProductidError>> {
4546 let p_productid = productid;
4548
4549 let uri_str = format!("{}/v1/commerce/product/{productid}", configuration.base_path, productid=crate::apis::urlencode(p_productid));
4550 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4551
4552 if let Some(ref user_agent) = configuration.user_agent {
4553 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4554 }
4555 if let Some(ref token) = configuration.bearer_access_token {
4556 req_builder = req_builder.bearer_auth(token.to_owned());
4557 };
4558
4559 let req = req_builder.build()?;
4560 let resp = configuration.client.execute(req).await?;
4561
4562 let status = resp.status();
4563
4564 if !status.is_client_error() && !status.is_server_error() {
4565 Ok(())
4566 } else {
4567 let content = resp.text().await?;
4568 let entity: Option<PostCommerceProductByProductidError> = serde_json::from_str(&content).ok();
4569 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4570 }
4571}
4572
4573pub async fn post_commerce_rates_entries(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceRatesEntriesError>> {
4575
4576 let uri_str = format!("{}/v1/commerce/rates/entries", configuration.base_path);
4577 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4578
4579 if let Some(ref user_agent) = configuration.user_agent {
4580 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4581 }
4582 if let Some(ref token) = configuration.bearer_access_token {
4583 req_builder = req_builder.bearer_auth(token.to_owned());
4584 };
4585
4586 let req = req_builder.build()?;
4587 let resp = configuration.client.execute(req).await?;
4588
4589 let status = resp.status();
4590
4591 if !status.is_client_error() && !status.is_server_error() {
4592 Ok(())
4593 } else {
4594 let content = resp.text().await?;
4595 let entity: Option<PostCommerceRatesEntriesError> = serde_json::from_str(&content).ok();
4596 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4597 }
4598}
4599
4600pub async fn post_commerce_rates_import(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceRatesImportError>> {
4602
4603 let uri_str = format!("{}/v1/commerce/rates/import", configuration.base_path);
4604 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4605
4606 if let Some(ref user_agent) = configuration.user_agent {
4607 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4608 }
4609 if let Some(ref token) = configuration.bearer_access_token {
4610 req_builder = req_builder.bearer_auth(token.to_owned());
4611 };
4612
4613 let req = req_builder.build()?;
4614 let resp = configuration.client.execute(req).await?;
4615
4616 let status = resp.status();
4617
4618 if !status.is_client_error() && !status.is_server_error() {
4619 Ok(())
4620 } else {
4621 let content = resp.text().await?;
4622 let entity: Option<PostCommerceRatesImportError> = serde_json::from_str(&content).ok();
4623 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4624 }
4625}
4626
4627pub async fn post_commerce_return(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceReturnError>> {
4629
4630 let uri_str = format!("{}/v1/commerce/return/", configuration.base_path);
4631 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4632
4633 if let Some(ref user_agent) = configuration.user_agent {
4634 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4635 }
4636 if let Some(ref token) = configuration.bearer_access_token {
4637 req_builder = req_builder.bearer_auth(token.to_owned());
4638 };
4639
4640 let req = req_builder.build()?;
4641 let resp = configuration.client.execute(req).await?;
4642
4643 let status = resp.status();
4644
4645 if !status.is_client_error() && !status.is_server_error() {
4646 Ok(())
4647 } else {
4648 let content = resp.text().await?;
4649 let entity: Option<PostCommerceReturnError> = serde_json::from_str(&content).ok();
4650 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4651 }
4652}
4653
4654pub async fn post_commerce_return_by_returnid(configuration: &configuration::Configuration, returnid: &str) -> Result<(), Error<PostCommerceReturnByReturnidError>> {
4656 let p_returnid = returnid;
4658
4659 let uri_str = format!("{}/v1/commerce/return/{returnid}", configuration.base_path, returnid=crate::apis::urlencode(p_returnid));
4660 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4661
4662 if let Some(ref user_agent) = configuration.user_agent {
4663 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4664 }
4665 if let Some(ref token) = configuration.bearer_access_token {
4666 req_builder = req_builder.bearer_auth(token.to_owned());
4667 };
4668
4669 let req = req_builder.build()?;
4670 let resp = configuration.client.execute(req).await?;
4671
4672 let status = resp.status();
4673
4674 if !status.is_client_error() && !status.is_server_error() {
4675 Ok(())
4676 } else {
4677 let content = resp.text().await?;
4678 let entity: Option<PostCommerceReturnByReturnidError> = serde_json::from_str(&content).ok();
4679 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4680 }
4681}
4682
4683pub async fn post_commerce_saleschannel(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceSaleschannelError>> {
4685
4686 let uri_str = format!("{}/v1/commerce/saleschannel/", configuration.base_path);
4687 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4688
4689 if let Some(ref user_agent) = configuration.user_agent {
4690 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4691 }
4692 if let Some(ref token) = configuration.bearer_access_token {
4693 req_builder = req_builder.bearer_auth(token.to_owned());
4694 };
4695
4696 let req = req_builder.build()?;
4697 let resp = configuration.client.execute(req).await?;
4698
4699 let status = resp.status();
4700
4701 if !status.is_client_error() && !status.is_server_error() {
4702 Ok(())
4703 } else {
4704 let content = resp.text().await?;
4705 let entity: Option<PostCommerceSaleschannelError> = serde_json::from_str(&content).ok();
4706 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4707 }
4708}
4709
4710pub async fn post_commerce_saleschannel_by_saleschannelid(configuration: &configuration::Configuration, saleschannelid: &str) -> Result<(), Error<PostCommerceSaleschannelBySaleschannelidError>> {
4712 let p_saleschannelid = saleschannelid;
4714
4715 let uri_str = format!("{}/v1/commerce/saleschannel/{saleschannelid}", configuration.base_path, saleschannelid=crate::apis::urlencode(p_saleschannelid));
4716 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4717
4718 if let Some(ref user_agent) = configuration.user_agent {
4719 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4720 }
4721 if let Some(ref token) = configuration.bearer_access_token {
4722 req_builder = req_builder.bearer_auth(token.to_owned());
4723 };
4724
4725 let req = req_builder.build()?;
4726 let resp = configuration.client.execute(req).await?;
4727
4728 let status = resp.status();
4729
4730 if !status.is_client_error() && !status.is_server_error() {
4731 Ok(())
4732 } else {
4733 let content = resp.text().await?;
4734 let entity: Option<PostCommerceSaleschannelBySaleschannelidError> = serde_json::from_str(&content).ok();
4735 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4736 }
4737}
4738
4739pub async fn post_commerce_stocklocation(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceStocklocationError>> {
4741
4742 let uri_str = format!("{}/v1/commerce/stocklocation/", configuration.base_path);
4743 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4744
4745 if let Some(ref user_agent) = configuration.user_agent {
4746 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4747 }
4748 if let Some(ref token) = configuration.bearer_access_token {
4749 req_builder = req_builder.bearer_auth(token.to_owned());
4750 };
4751
4752 let req = req_builder.build()?;
4753 let resp = configuration.client.execute(req).await?;
4754
4755 let status = resp.status();
4756
4757 if !status.is_client_error() && !status.is_server_error() {
4758 Ok(())
4759 } else {
4760 let content = resp.text().await?;
4761 let entity: Option<PostCommerceStocklocationError> = serde_json::from_str(&content).ok();
4762 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4763 }
4764}
4765
4766pub async fn post_commerce_stocklocation_by_stocklocationid(configuration: &configuration::Configuration, stocklocationid: &str) -> Result<(), Error<PostCommerceStocklocationByStocklocationidError>> {
4768 let p_stocklocationid = stocklocationid;
4770
4771 let uri_str = format!("{}/v1/commerce/stocklocation/{stocklocationid}", configuration.base_path, stocklocationid=crate::apis::urlencode(p_stocklocationid));
4772 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4773
4774 if let Some(ref user_agent) = configuration.user_agent {
4775 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4776 }
4777 if let Some(ref token) = configuration.bearer_access_token {
4778 req_builder = req_builder.bearer_auth(token.to_owned());
4779 };
4780
4781 let req = req_builder.build()?;
4782 let resp = configuration.client.execute(req).await?;
4783
4784 let status = resp.status();
4785
4786 if !status.is_client_error() && !status.is_server_error() {
4787 Ok(())
4788 } else {
4789 let content = resp.text().await?;
4790 let entity: Option<PostCommerceStocklocationByStocklocationidError> = serde_json::from_str(&content).ok();
4791 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4792 }
4793}
4794
4795pub async fn post_commerce_store(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceStoreError>> {
4797
4798 let uri_str = format!("{}/v1/commerce/store/", configuration.base_path);
4799 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4800
4801 if let Some(ref user_agent) = configuration.user_agent {
4802 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4803 }
4804 if let Some(ref token) = configuration.bearer_access_token {
4805 req_builder = req_builder.bearer_auth(token.to_owned());
4806 };
4807
4808 let req = req_builder.build()?;
4809 let resp = configuration.client.execute(req).await?;
4810
4811 let status = resp.status();
4812
4813 if !status.is_client_error() && !status.is_server_error() {
4814 Ok(())
4815 } else {
4816 let content = resp.text().await?;
4817 let entity: Option<PostCommerceStoreError> = serde_json::from_str(&content).ok();
4818 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4819 }
4820}
4821
4822pub async fn post_commerce_store_by_storeid(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidError>> {
4824 let p_storeid = storeid;
4826
4827 let uri_str = format!("{}/v1/commerce/store/{storeid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
4828 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4829
4830 if let Some(ref user_agent) = configuration.user_agent {
4831 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4832 }
4833 if let Some(ref token) = configuration.bearer_access_token {
4834 req_builder = req_builder.bearer_auth(token.to_owned());
4835 };
4836
4837 let req = req_builder.build()?;
4838 let resp = configuration.client.execute(req).await?;
4839
4840 let status = resp.status();
4841
4842 if !status.is_client_error() && !status.is_server_error() {
4843 Ok(())
4844 } else {
4845 let content = resp.text().await?;
4846 let entity: Option<PostCommerceStoreByStoreidError> = serde_json::from_str(&content).ok();
4847 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4848 }
4849}
4850
4851pub async fn post_commerce_store_by_storeid_authorize(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidAuthorizeError>> {
4853 let p_storeid = storeid;
4855
4856 let uri_str = format!("{}/v1/commerce/store/{storeid}/authorize", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
4857 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4858
4859 if let Some(ref user_agent) = configuration.user_agent {
4860 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4861 }
4862 if let Some(ref token) = configuration.bearer_access_token {
4863 req_builder = req_builder.bearer_auth(token.to_owned());
4864 };
4865
4866 let req = req_builder.build()?;
4867 let resp = configuration.client.execute(req).await?;
4868
4869 let status = resp.status();
4870
4871 if !status.is_client_error() && !status.is_server_error() {
4872 Ok(())
4873 } else {
4874 let content = resp.text().await?;
4875 let entity: Option<PostCommerceStoreByStoreidAuthorizeError> = serde_json::from_str(&content).ok();
4876 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4877 }
4878}
4879
4880pub async fn post_commerce_store_by_storeid_authorize_by_orderid(configuration: &configuration::Configuration, storeid: &str, orderid: &str) -> Result<(), Error<PostCommerceStoreByStoreidAuthorizeByOrderidError>> {
4882 let p_storeid = storeid;
4884 let p_orderid = orderid;
4885
4886 let uri_str = format!("{}/v1/commerce/store/{storeid}/authorize/{orderid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), orderid=crate::apis::urlencode(p_orderid));
4887 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4888
4889 if let Some(ref user_agent) = configuration.user_agent {
4890 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4891 }
4892 if let Some(ref token) = configuration.bearer_access_token {
4893 req_builder = req_builder.bearer_auth(token.to_owned());
4894 };
4895
4896 let req = req_builder.build()?;
4897 let resp = configuration.client.execute(req).await?;
4898
4899 let status = resp.status();
4900
4901 if !status.is_client_error() && !status.is_server_error() {
4902 Ok(())
4903 } else {
4904 let content = resp.text().await?;
4905 let entity: Option<PostCommerceStoreByStoreidAuthorizeByOrderidError> = serde_json::from_str(&content).ok();
4906 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4907 }
4908}
4909
4910pub async fn post_commerce_store_by_storeid_capture_by_orderid(configuration: &configuration::Configuration, storeid: &str, orderid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCaptureByOrderidError>> {
4912 let p_storeid = storeid;
4914 let p_orderid = orderid;
4915
4916 let uri_str = format!("{}/v1/commerce/store/{storeid}/capture/{orderid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), orderid=crate::apis::urlencode(p_orderid));
4917 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4918
4919 if let Some(ref user_agent) = configuration.user_agent {
4920 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4921 }
4922 if let Some(ref token) = configuration.bearer_access_token {
4923 req_builder = req_builder.bearer_auth(token.to_owned());
4924 };
4925
4926 let req = req_builder.build()?;
4927 let resp = configuration.client.execute(req).await?;
4928
4929 let status = resp.status();
4930
4931 if !status.is_client_error() && !status.is_server_error() {
4932 Ok(())
4933 } else {
4934 let content = resp.text().await?;
4935 let entity: Option<PostCommerceStoreByStoreidCaptureByOrderidError> = serde_json::from_str(&content).ok();
4936 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4937 }
4938}
4939
4940pub async fn post_commerce_store_by_storeid_charge(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidChargeError>> {
4942 let p_storeid = storeid;
4944
4945 let uri_str = format!("{}/v1/commerce/store/{storeid}/charge", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
4946 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4947
4948 if let Some(ref user_agent) = configuration.user_agent {
4949 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4950 }
4951 if let Some(ref token) = configuration.bearer_access_token {
4952 req_builder = req_builder.bearer_auth(token.to_owned());
4953 };
4954
4955 let req = req_builder.build()?;
4956 let resp = configuration.client.execute(req).await?;
4957
4958 let status = resp.status();
4959
4960 if !status.is_client_error() && !status.is_server_error() {
4961 Ok(())
4962 } else {
4963 let content = resp.text().await?;
4964 let entity: Option<PostCommerceStoreByStoreidChargeError> = serde_json::from_str(&content).ok();
4965 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4966 }
4967}
4968
4969pub async fn post_commerce_store_by_storeid_checkout_authorize(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutAuthorizeError>> {
4971 let p_storeid = storeid;
4973
4974 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/authorize", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
4975 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4976
4977 if let Some(ref user_agent) = configuration.user_agent {
4978 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4979 }
4980 if let Some(ref token) = configuration.bearer_access_token {
4981 req_builder = req_builder.bearer_auth(token.to_owned());
4982 };
4983
4984 let req = req_builder.build()?;
4985 let resp = configuration.client.execute(req).await?;
4986
4987 let status = resp.status();
4988
4989 if !status.is_client_error() && !status.is_server_error() {
4990 Ok(())
4991 } else {
4992 let content = resp.text().await?;
4993 let entity: Option<PostCommerceStoreByStoreidCheckoutAuthorizeError> = serde_json::from_str(&content).ok();
4994 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4995 }
4996}
4997
4998pub async fn post_commerce_store_by_storeid_checkout_authorize_by_orderid(configuration: &configuration::Configuration, storeid: &str, orderid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutAuthorizeByOrderidError>> {
5000 let p_storeid = storeid;
5002 let p_orderid = orderid;
5003
5004 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/authorize/{orderid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), orderid=crate::apis::urlencode(p_orderid));
5005 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5006
5007 if let Some(ref user_agent) = configuration.user_agent {
5008 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5009 }
5010 if let Some(ref token) = configuration.bearer_access_token {
5011 req_builder = req_builder.bearer_auth(token.to_owned());
5012 };
5013
5014 let req = req_builder.build()?;
5015 let resp = configuration.client.execute(req).await?;
5016
5017 let status = resp.status();
5018
5019 if !status.is_client_error() && !status.is_server_error() {
5020 Ok(())
5021 } else {
5022 let content = resp.text().await?;
5023 let entity: Option<PostCommerceStoreByStoreidCheckoutAuthorizeByOrderidError> = serde_json::from_str(&content).ok();
5024 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5025 }
5026}
5027
5028pub async fn post_commerce_store_by_storeid_checkout_capture_by_orderid(configuration: &configuration::Configuration, storeid: &str, orderid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutCaptureByOrderidError>> {
5030 let p_storeid = storeid;
5032 let p_orderid = orderid;
5033
5034 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/capture/{orderid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), orderid=crate::apis::urlencode(p_orderid));
5035 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5036
5037 if let Some(ref user_agent) = configuration.user_agent {
5038 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5039 }
5040 if let Some(ref token) = configuration.bearer_access_token {
5041 req_builder = req_builder.bearer_auth(token.to_owned());
5042 };
5043
5044 let req = req_builder.build()?;
5045 let resp = configuration.client.execute(req).await?;
5046
5047 let status = resp.status();
5048
5049 if !status.is_client_error() && !status.is_server_error() {
5050 Ok(())
5051 } else {
5052 let content = resp.text().await?;
5053 let entity: Option<PostCommerceStoreByStoreidCheckoutCaptureByOrderidError> = serde_json::from_str(&content).ok();
5054 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5055 }
5056}
5057
5058pub async fn post_commerce_store_by_storeid_checkout_charge(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutChargeError>> {
5060 let p_storeid = storeid;
5062
5063 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/charge", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
5064 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5065
5066 if let Some(ref user_agent) = configuration.user_agent {
5067 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5068 }
5069 if let Some(ref token) = configuration.bearer_access_token {
5070 req_builder = req_builder.bearer_auth(token.to_owned());
5071 };
5072
5073 let req = req_builder.build()?;
5074 let resp = configuration.client.execute(req).await?;
5075
5076 let status = resp.status();
5077
5078 if !status.is_client_error() && !status.is_server_error() {
5079 Ok(())
5080 } else {
5081 let content = resp.text().await?;
5082 let entity: Option<PostCommerceStoreByStoreidCheckoutChargeError> = serde_json::from_str(&content).ok();
5083 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5084 }
5085}
5086
5087pub async fn post_commerce_store_by_storeid_checkout_paypal_cancel_by_paykey(configuration: &configuration::Configuration, storeid: &str, pay_key: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutPaypalCancelByPaykeyError>> {
5089 let p_storeid = storeid;
5091 let p_pay_key = pay_key;
5092
5093 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/paypal/cancel/{payKey}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), payKey=crate::apis::urlencode(p_pay_key));
5094 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5095
5096 if let Some(ref user_agent) = configuration.user_agent {
5097 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5098 }
5099 if let Some(ref token) = configuration.bearer_access_token {
5100 req_builder = req_builder.bearer_auth(token.to_owned());
5101 };
5102
5103 let req = req_builder.build()?;
5104 let resp = configuration.client.execute(req).await?;
5105
5106 let status = resp.status();
5107
5108 if !status.is_client_error() && !status.is_server_error() {
5109 Ok(())
5110 } else {
5111 let content = resp.text().await?;
5112 let entity: Option<PostCommerceStoreByStoreidCheckoutPaypalCancelByPaykeyError> = serde_json::from_str(&content).ok();
5113 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5114 }
5115}
5116
5117pub async fn post_commerce_store_by_storeid_checkout_paypal_confirm_by_paykey(configuration: &configuration::Configuration, storeid: &str, pay_key: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutPaypalConfirmByPaykeyError>> {
5119 let p_storeid = storeid;
5121 let p_pay_key = pay_key;
5122
5123 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/paypal/confirm/{payKey}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), payKey=crate::apis::urlencode(p_pay_key));
5124 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5125
5126 if let Some(ref user_agent) = configuration.user_agent {
5127 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5128 }
5129 if let Some(ref token) = configuration.bearer_access_token {
5130 req_builder = req_builder.bearer_auth(token.to_owned());
5131 };
5132
5133 let req = req_builder.build()?;
5134 let resp = configuration.client.execute(req).await?;
5135
5136 let status = resp.status();
5137
5138 if !status.is_client_error() && !status.is_server_error() {
5139 Ok(())
5140 } else {
5141 let content = resp.text().await?;
5142 let entity: Option<PostCommerceStoreByStoreidCheckoutPaypalConfirmByPaykeyError> = serde_json::from_str(&content).ok();
5143 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5144 }
5145}
5146
5147pub async fn post_commerce_store_by_storeid_checkout_paypal_pay(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidCheckoutPaypalPayError>> {
5149 let p_storeid = storeid;
5151
5152 let uri_str = format!("{}/v1/commerce/store/{storeid}/checkout/paypal/pay", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
5153 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5154
5155 if let Some(ref user_agent) = configuration.user_agent {
5156 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5157 }
5158 if let Some(ref token) = configuration.bearer_access_token {
5159 req_builder = req_builder.bearer_auth(token.to_owned());
5160 };
5161
5162 let req = req_builder.build()?;
5163 let resp = configuration.client.execute(req).await?;
5164
5165 let status = resp.status();
5166
5167 if !status.is_client_error() && !status.is_server_error() {
5168 Ok(())
5169 } else {
5170 let content = resp.text().await?;
5171 let entity: Option<PostCommerceStoreByStoreidCheckoutPaypalPayError> = serde_json::from_str(&content).ok();
5172 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5173 }
5174}
5175
5176pub async fn post_commerce_store_by_storeid_listing_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<PostCommerceStoreByStoreidListingByKeyError>> {
5178 let p_storeid = storeid;
5180 let p_key = key;
5181
5182 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
5183 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5184
5185 if let Some(ref user_agent) = configuration.user_agent {
5186 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5187 }
5188 if let Some(ref token) = configuration.bearer_access_token {
5189 req_builder = req_builder.bearer_auth(token.to_owned());
5190 };
5191
5192 let req = req_builder.build()?;
5193 let resp = configuration.client.execute(req).await?;
5194
5195 let status = resp.status();
5196
5197 if !status.is_client_error() && !status.is_server_error() {
5198 Ok(())
5199 } else {
5200 let content = resp.text().await?;
5201 let entity: Option<PostCommerceStoreByStoreidListingByKeyError> = serde_json::from_str(&content).ok();
5202 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5203 }
5204}
5205
5206pub async fn post_commerce_store_by_storeid_paypal_cancel_by_paykey(configuration: &configuration::Configuration, storeid: &str, pay_key: &str) -> Result<(), Error<PostCommerceStoreByStoreidPaypalCancelByPaykeyError>> {
5208 let p_storeid = storeid;
5210 let p_pay_key = pay_key;
5211
5212 let uri_str = format!("{}/v1/commerce/store/{storeid}/paypal/cancel/{payKey}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), payKey=crate::apis::urlencode(p_pay_key));
5213 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5214
5215 if let Some(ref user_agent) = configuration.user_agent {
5216 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5217 }
5218 if let Some(ref token) = configuration.bearer_access_token {
5219 req_builder = req_builder.bearer_auth(token.to_owned());
5220 };
5221
5222 let req = req_builder.build()?;
5223 let resp = configuration.client.execute(req).await?;
5224
5225 let status = resp.status();
5226
5227 if !status.is_client_error() && !status.is_server_error() {
5228 Ok(())
5229 } else {
5230 let content = resp.text().await?;
5231 let entity: Option<PostCommerceStoreByStoreidPaypalCancelByPaykeyError> = serde_json::from_str(&content).ok();
5232 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5233 }
5234}
5235
5236pub async fn post_commerce_store_by_storeid_paypal_confirm_by_paykey(configuration: &configuration::Configuration, storeid: &str, pay_key: &str) -> Result<(), Error<PostCommerceStoreByStoreidPaypalConfirmByPaykeyError>> {
5238 let p_storeid = storeid;
5240 let p_pay_key = pay_key;
5241
5242 let uri_str = format!("{}/v1/commerce/store/{storeid}/paypal/confirm/{payKey}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), payKey=crate::apis::urlencode(p_pay_key));
5243 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5244
5245 if let Some(ref user_agent) = configuration.user_agent {
5246 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5247 }
5248 if let Some(ref token) = configuration.bearer_access_token {
5249 req_builder = req_builder.bearer_auth(token.to_owned());
5250 };
5251
5252 let req = req_builder.build()?;
5253 let resp = configuration.client.execute(req).await?;
5254
5255 let status = resp.status();
5256
5257 if !status.is_client_error() && !status.is_server_error() {
5258 Ok(())
5259 } else {
5260 let content = resp.text().await?;
5261 let entity: Option<PostCommerceStoreByStoreidPaypalConfirmByPaykeyError> = serde_json::from_str(&content).ok();
5262 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5263 }
5264}
5265
5266pub async fn post_commerce_store_by_storeid_paypal_pay(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidPaypalPayError>> {
5268 let p_storeid = storeid;
5270
5271 let uri_str = format!("{}/v1/commerce/store/{storeid}/paypal/pay", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
5272 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5273
5274 if let Some(ref user_agent) = configuration.user_agent {
5275 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5276 }
5277 if let Some(ref token) = configuration.bearer_access_token {
5278 req_builder = req_builder.bearer_auth(token.to_owned());
5279 };
5280
5281 let req = req_builder.build()?;
5282 let resp = configuration.client.execute(req).await?;
5283
5284 let status = resp.status();
5285
5286 if !status.is_client_error() && !status.is_server_error() {
5287 Ok(())
5288 } else {
5289 let content = resp.text().await?;
5290 let entity: Option<PostCommerceStoreByStoreidPaypalPayError> = serde_json::from_str(&content).ok();
5291 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5292 }
5293}
5294
5295pub async fn post_commerce_store_by_storeid_trial(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PostCommerceStoreByStoreidTrialError>> {
5297 let p_storeid = storeid;
5299
5300 let uri_str = format!("{}/v1/commerce/store/{storeid}/trial", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
5301 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5302
5303 if let Some(ref user_agent) = configuration.user_agent {
5304 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5305 }
5306 if let Some(ref token) = configuration.bearer_access_token {
5307 req_builder = req_builder.bearer_auth(token.to_owned());
5308 };
5309
5310 let req = req_builder.build()?;
5311 let resp = configuration.client.execute(req).await?;
5312
5313 let status = resp.status();
5314
5315 if !status.is_client_error() && !status.is_server_error() {
5316 Ok(())
5317 } else {
5318 let content = resp.text().await?;
5319 let entity: Option<PostCommerceStoreByStoreidTrialError> = serde_json::from_str(&content).ok();
5320 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5321 }
5322}
5323
5324pub async fn post_commerce_store_token(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceStoreTokenError>> {
5326
5327 let uri_str = format!("{}/v1/commerce/store/token", configuration.base_path);
5328 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5329
5330 if let Some(ref user_agent) = configuration.user_agent {
5331 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5332 }
5333 if let Some(ref token) = configuration.bearer_access_token {
5334 req_builder = req_builder.bearer_auth(token.to_owned());
5335 };
5336
5337 let req = req_builder.build()?;
5338 let resp = configuration.client.execute(req).await?;
5339
5340 let status = resp.status();
5341
5342 if !status.is_client_error() && !status.is_server_error() {
5343 Ok(())
5344 } else {
5345 let content = resp.text().await?;
5346 let entity: Option<PostCommerceStoreTokenError> = serde_json::from_str(&content).ok();
5347 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5348 }
5349}
5350
5351pub async fn post_commerce_submission(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceSubmissionError>> {
5353
5354 let uri_str = format!("{}/v1/commerce/submission/", configuration.base_path);
5355 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5356
5357 if let Some(ref user_agent) = configuration.user_agent {
5358 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5359 }
5360 if let Some(ref token) = configuration.bearer_access_token {
5361 req_builder = req_builder.bearer_auth(token.to_owned());
5362 };
5363
5364 let req = req_builder.build()?;
5365 let resp = configuration.client.execute(req).await?;
5366
5367 let status = resp.status();
5368
5369 if !status.is_client_error() && !status.is_server_error() {
5370 Ok(())
5371 } else {
5372 let content = resp.text().await?;
5373 let entity: Option<PostCommerceSubmissionError> = serde_json::from_str(&content).ok();
5374 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5375 }
5376}
5377
5378pub async fn post_commerce_submission_by_submissionid(configuration: &configuration::Configuration, submissionid: &str) -> Result<(), Error<PostCommerceSubmissionBySubmissionidError>> {
5380 let p_submissionid = submissionid;
5382
5383 let uri_str = format!("{}/v1/commerce/submission/{submissionid}", configuration.base_path, submissionid=crate::apis::urlencode(p_submissionid));
5384 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5385
5386 if let Some(ref user_agent) = configuration.user_agent {
5387 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5388 }
5389 if let Some(ref token) = configuration.bearer_access_token {
5390 req_builder = req_builder.bearer_auth(token.to_owned());
5391 };
5392
5393 let req = req_builder.build()?;
5394 let resp = configuration.client.execute(req).await?;
5395
5396 let status = resp.status();
5397
5398 if !status.is_client_error() && !status.is_server_error() {
5399 Ok(())
5400 } else {
5401 let content = resp.text().await?;
5402 let entity: Option<PostCommerceSubmissionBySubmissionidError> = serde_json::from_str(&content).ok();
5403 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5404 }
5405}
5406
5407pub async fn post_commerce_subscriber(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceSubscriberError>> {
5409
5410 let uri_str = format!("{}/v1/commerce/subscriber/", configuration.base_path);
5411 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5412
5413 if let Some(ref user_agent) = configuration.user_agent {
5414 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5415 }
5416 if let Some(ref token) = configuration.bearer_access_token {
5417 req_builder = req_builder.bearer_auth(token.to_owned());
5418 };
5419
5420 let req = req_builder.build()?;
5421 let resp = configuration.client.execute(req).await?;
5422
5423 let status = resp.status();
5424
5425 if !status.is_client_error() && !status.is_server_error() {
5426 Ok(())
5427 } else {
5428 let content = resp.text().await?;
5429 let entity: Option<PostCommerceSubscriberError> = serde_json::from_str(&content).ok();
5430 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5431 }
5432}
5433
5434pub async fn post_commerce_subscriber_by_subscriberid(configuration: &configuration::Configuration, subscriberid: &str) -> Result<(), Error<PostCommerceSubscriberBySubscriberidError>> {
5436 let p_subscriberid = subscriberid;
5438
5439 let uri_str = format!("{}/v1/commerce/subscriber/{subscriberid}", configuration.base_path, subscriberid=crate::apis::urlencode(p_subscriberid));
5440 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5441
5442 if let Some(ref user_agent) = configuration.user_agent {
5443 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5444 }
5445 if let Some(ref token) = configuration.bearer_access_token {
5446 req_builder = req_builder.bearer_auth(token.to_owned());
5447 };
5448
5449 let req = req_builder.build()?;
5450 let resp = configuration.client.execute(req).await?;
5451
5452 let status = resp.status();
5453
5454 if !status.is_client_error() && !status.is_server_error() {
5455 Ok(())
5456 } else {
5457 let content = resp.text().await?;
5458 let entity: Option<PostCommerceSubscriberBySubscriberidError> = serde_json::from_str(&content).ok();
5459 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5460 }
5461}
5462
5463pub async fn post_commerce_tokentransaction(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceTokentransactionError>> {
5465
5466 let uri_str = format!("{}/v1/commerce/tokentransaction/", configuration.base_path);
5467 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5468
5469 if let Some(ref user_agent) = configuration.user_agent {
5470 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5471 }
5472 if let Some(ref token) = configuration.bearer_access_token {
5473 req_builder = req_builder.bearer_auth(token.to_owned());
5474 };
5475
5476 let req = req_builder.build()?;
5477 let resp = configuration.client.execute(req).await?;
5478
5479 let status = resp.status();
5480
5481 if !status.is_client_error() && !status.is_server_error() {
5482 Ok(())
5483 } else {
5484 let content = resp.text().await?;
5485 let entity: Option<PostCommerceTokentransactionError> = serde_json::from_str(&content).ok();
5486 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5487 }
5488}
5489
5490pub async fn post_commerce_tokentransaction_by_tokentransactionid(configuration: &configuration::Configuration, tokentransactionid: &str) -> Result<(), Error<PostCommerceTokentransactionByTokentransactionidError>> {
5492 let p_tokentransactionid = tokentransactionid;
5494
5495 let uri_str = format!("{}/v1/commerce/tokentransaction/{tokentransactionid}", configuration.base_path, tokentransactionid=crate::apis::urlencode(p_tokentransactionid));
5496 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5497
5498 if let Some(ref user_agent) = configuration.user_agent {
5499 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5500 }
5501 if let Some(ref token) = configuration.bearer_access_token {
5502 req_builder = req_builder.bearer_auth(token.to_owned());
5503 };
5504
5505 let req = req_builder.build()?;
5506 let resp = configuration.client.execute(req).await?;
5507
5508 let status = resp.status();
5509
5510 if !status.is_client_error() && !status.is_server_error() {
5511 Ok(())
5512 } else {
5513 let content = resp.text().await?;
5514 let entity: Option<PostCommerceTokentransactionByTokentransactionidError> = serde_json::from_str(&content).ok();
5515 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5516 }
5517}
5518
5519pub async fn post_commerce_transfer(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceTransferError>> {
5521
5522 let uri_str = format!("{}/v1/commerce/transfer/", configuration.base_path);
5523 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5524
5525 if let Some(ref user_agent) = configuration.user_agent {
5526 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5527 }
5528 if let Some(ref token) = configuration.bearer_access_token {
5529 req_builder = req_builder.bearer_auth(token.to_owned());
5530 };
5531
5532 let req = req_builder.build()?;
5533 let resp = configuration.client.execute(req).await?;
5534
5535 let status = resp.status();
5536
5537 if !status.is_client_error() && !status.is_server_error() {
5538 Ok(())
5539 } else {
5540 let content = resp.text().await?;
5541 let entity: Option<PostCommerceTransferError> = serde_json::from_str(&content).ok();
5542 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5543 }
5544}
5545
5546pub async fn post_commerce_transfer_by_transferid(configuration: &configuration::Configuration, transferid: &str) -> Result<(), Error<PostCommerceTransferByTransferidError>> {
5548 let p_transferid = transferid;
5550
5551 let uri_str = format!("{}/v1/commerce/transfer/{transferid}", configuration.base_path, transferid=crate::apis::urlencode(p_transferid));
5552 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5553
5554 if let Some(ref user_agent) = configuration.user_agent {
5555 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5556 }
5557 if let Some(ref token) = configuration.bearer_access_token {
5558 req_builder = req_builder.bearer_auth(token.to_owned());
5559 };
5560
5561 let req = req_builder.build()?;
5562 let resp = configuration.client.execute(req).await?;
5563
5564 let status = resp.status();
5565
5566 if !status.is_client_error() && !status.is_server_error() {
5567 Ok(())
5568 } else {
5569 let content = resp.text().await?;
5570 let entity: Option<PostCommerceTransferByTransferidError> = serde_json::from_str(&content).ok();
5571 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5572 }
5573}
5574
5575pub async fn post_commerce_variant(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceVariantError>> {
5577
5578 let uri_str = format!("{}/v1/commerce/variant/", configuration.base_path);
5579 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5580
5581 if let Some(ref user_agent) = configuration.user_agent {
5582 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5583 }
5584 if let Some(ref token) = configuration.bearer_access_token {
5585 req_builder = req_builder.bearer_auth(token.to_owned());
5586 };
5587
5588 let req = req_builder.build()?;
5589 let resp = configuration.client.execute(req).await?;
5590
5591 let status = resp.status();
5592
5593 if !status.is_client_error() && !status.is_server_error() {
5594 Ok(())
5595 } else {
5596 let content = resp.text().await?;
5597 let entity: Option<PostCommerceVariantError> = serde_json::from_str(&content).ok();
5598 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5599 }
5600}
5601
5602pub async fn post_commerce_variant_by_variantid(configuration: &configuration::Configuration, variantid: &str) -> Result<(), Error<PostCommerceVariantByVariantidError>> {
5604 let p_variantid = variantid;
5606
5607 let uri_str = format!("{}/v1/commerce/variant/{variantid}", configuration.base_path, variantid=crate::apis::urlencode(p_variantid));
5608 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5609
5610 if let Some(ref user_agent) = configuration.user_agent {
5611 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5612 }
5613 if let Some(ref token) = configuration.bearer_access_token {
5614 req_builder = req_builder.bearer_auth(token.to_owned());
5615 };
5616
5617 let req = req_builder.build()?;
5618 let resp = configuration.client.execute(req).await?;
5619
5620 let status = resp.status();
5621
5622 if !status.is_client_error() && !status.is_server_error() {
5623 Ok(())
5624 } else {
5625 let content = resp.text().await?;
5626 let entity: Option<PostCommerceVariantByVariantidError> = serde_json::from_str(&content).ok();
5627 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5628 }
5629}
5630
5631pub async fn post_commerce_wallet(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceWalletError>> {
5633
5634 let uri_str = format!("{}/v1/commerce/wallet/", configuration.base_path);
5635 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5636
5637 if let Some(ref user_agent) = configuration.user_agent {
5638 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5639 }
5640 if let Some(ref token) = configuration.bearer_access_token {
5641 req_builder = req_builder.bearer_auth(token.to_owned());
5642 };
5643
5644 let req = req_builder.build()?;
5645 let resp = configuration.client.execute(req).await?;
5646
5647 let status = resp.status();
5648
5649 if !status.is_client_error() && !status.is_server_error() {
5650 Ok(())
5651 } else {
5652 let content = resp.text().await?;
5653 let entity: Option<PostCommerceWalletError> = serde_json::from_str(&content).ok();
5654 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5655 }
5656}
5657
5658pub async fn post_commerce_wallet_by_walletid(configuration: &configuration::Configuration, walletid: &str) -> Result<(), Error<PostCommerceWalletByWalletidError>> {
5660 let p_walletid = walletid;
5662
5663 let uri_str = format!("{}/v1/commerce/wallet/{walletid}", configuration.base_path, walletid=crate::apis::urlencode(p_walletid));
5664 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5665
5666 if let Some(ref user_agent) = configuration.user_agent {
5667 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5668 }
5669 if let Some(ref token) = configuration.bearer_access_token {
5670 req_builder = req_builder.bearer_auth(token.to_owned());
5671 };
5672
5673 let req = req_builder.build()?;
5674 let resp = configuration.client.execute(req).await?;
5675
5676 let status = resp.status();
5677
5678 if !status.is_client_error() && !status.is_server_error() {
5679 Ok(())
5680 } else {
5681 let content = resp.text().await?;
5682 let entity: Option<PostCommerceWalletByWalletidError> = serde_json::from_str(&content).ok();
5683 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5684 }
5685}
5686
5687pub async fn post_commerce_watchlist(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceWatchlistError>> {
5689
5690 let uri_str = format!("{}/v1/commerce/watchlist/", configuration.base_path);
5691 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5692
5693 if let Some(ref user_agent) = configuration.user_agent {
5694 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5695 }
5696 if let Some(ref token) = configuration.bearer_access_token {
5697 req_builder = req_builder.bearer_auth(token.to_owned());
5698 };
5699
5700 let req = req_builder.build()?;
5701 let resp = configuration.client.execute(req).await?;
5702
5703 let status = resp.status();
5704
5705 if !status.is_client_error() && !status.is_server_error() {
5706 Ok(())
5707 } else {
5708 let content = resp.text().await?;
5709 let entity: Option<PostCommerceWatchlistError> = serde_json::from_str(&content).ok();
5710 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5711 }
5712}
5713
5714pub async fn post_commerce_watchlist_by_watchlistid(configuration: &configuration::Configuration, watchlistid: &str) -> Result<(), Error<PostCommerceWatchlistByWatchlistidError>> {
5716 let p_watchlistid = watchlistid;
5718
5719 let uri_str = format!("{}/v1/commerce/watchlist/{watchlistid}", configuration.base_path, watchlistid=crate::apis::urlencode(p_watchlistid));
5720 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5721
5722 if let Some(ref user_agent) = configuration.user_agent {
5723 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5724 }
5725 if let Some(ref token) = configuration.bearer_access_token {
5726 req_builder = req_builder.bearer_auth(token.to_owned());
5727 };
5728
5729 let req = req_builder.build()?;
5730 let resp = configuration.client.execute(req).await?;
5731
5732 let status = resp.status();
5733
5734 if !status.is_client_error() && !status.is_server_error() {
5735 Ok(())
5736 } else {
5737 let content = resp.text().await?;
5738 let entity: Option<PostCommerceWatchlistByWatchlistidError> = serde_json::from_str(&content).ok();
5739 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5740 }
5741}
5742
5743pub async fn post_commerce_webhook(configuration: &configuration::Configuration, ) -> Result<(), Error<PostCommerceWebhookError>> {
5745
5746 let uri_str = format!("{}/v1/commerce/webhook/", configuration.base_path);
5747 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5748
5749 if let Some(ref user_agent) = configuration.user_agent {
5750 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5751 }
5752 if let Some(ref token) = configuration.bearer_access_token {
5753 req_builder = req_builder.bearer_auth(token.to_owned());
5754 };
5755
5756 let req = req_builder.build()?;
5757 let resp = configuration.client.execute(req).await?;
5758
5759 let status = resp.status();
5760
5761 if !status.is_client_error() && !status.is_server_error() {
5762 Ok(())
5763 } else {
5764 let content = resp.text().await?;
5765 let entity: Option<PostCommerceWebhookError> = serde_json::from_str(&content).ok();
5766 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5767 }
5768}
5769
5770pub async fn post_commerce_webhook_by_webhookid(configuration: &configuration::Configuration, webhookid: &str) -> Result<(), Error<PostCommerceWebhookByWebhookidError>> {
5772 let p_webhookid = webhookid;
5774
5775 let uri_str = format!("{}/v1/commerce/webhook/{webhookid}", configuration.base_path, webhookid=crate::apis::urlencode(p_webhookid));
5776 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5777
5778 if let Some(ref user_agent) = configuration.user_agent {
5779 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5780 }
5781 if let Some(ref token) = configuration.bearer_access_token {
5782 req_builder = req_builder.bearer_auth(token.to_owned());
5783 };
5784
5785 let req = req_builder.build()?;
5786 let resp = configuration.client.execute(req).await?;
5787
5788 let status = resp.status();
5789
5790 if !status.is_client_error() && !status.is_server_error() {
5791 Ok(())
5792 } else {
5793 let content = resp.text().await?;
5794 let entity: Option<PostCommerceWebhookByWebhookidError> = serde_json::from_str(&content).ok();
5795 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5796 }
5797}
5798
5799pub async fn post_commerce_webhooks_by_provider(configuration: &configuration::Configuration, provider: &str) -> Result<(), Error<PostCommerceWebhooksByProviderError>> {
5801 let p_provider = provider;
5803
5804 let uri_str = format!("{}/v1/commerce/webhooks/{provider}", configuration.base_path, provider=crate::apis::urlencode(p_provider));
5805 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5806
5807 if let Some(ref user_agent) = configuration.user_agent {
5808 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5809 }
5810 if let Some(ref token) = configuration.bearer_access_token {
5811 req_builder = req_builder.bearer_auth(token.to_owned());
5812 };
5813
5814 let req = req_builder.build()?;
5815 let resp = configuration.client.execute(req).await?;
5816
5817 let status = resp.status();
5818
5819 if !status.is_client_error() && !status.is_server_error() {
5820 Ok(())
5821 } else {
5822 let content = resp.text().await?;
5823 let entity: Option<PostCommerceWebhooksByProviderError> = serde_json::from_str(&content).ok();
5824 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5825 }
5826}
5827
5828pub async fn put_commerce_collection_by_collectionid(configuration: &configuration::Configuration, collectionid: &str) -> Result<(), Error<PutCommerceCollectionByCollectionidError>> {
5830 let p_collectionid = collectionid;
5832
5833 let uri_str = format!("{}/v1/commerce/collection/{collectionid}", configuration.base_path, collectionid=crate::apis::urlencode(p_collectionid));
5834 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5835
5836 if let Some(ref user_agent) = configuration.user_agent {
5837 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5838 }
5839 if let Some(ref token) = configuration.bearer_access_token {
5840 req_builder = req_builder.bearer_auth(token.to_owned());
5841 };
5842
5843 let req = req_builder.build()?;
5844 let resp = configuration.client.execute(req).await?;
5845
5846 let status = resp.status();
5847
5848 if !status.is_client_error() && !status.is_server_error() {
5849 Ok(())
5850 } else {
5851 let content = resp.text().await?;
5852 let entity: Option<PutCommerceCollectionByCollectionidError> = serde_json::from_str(&content).ok();
5853 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5854 }
5855}
5856
5857pub async fn put_commerce_disclosure_by_disclosureid(configuration: &configuration::Configuration, disclosureid: &str) -> Result<(), Error<PutCommerceDisclosureByDisclosureidError>> {
5859 let p_disclosureid = disclosureid;
5861
5862 let uri_str = format!("{}/v1/commerce/disclosure/{disclosureid}", configuration.base_path, disclosureid=crate::apis::urlencode(p_disclosureid));
5863 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5864
5865 if let Some(ref user_agent) = configuration.user_agent {
5866 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5867 }
5868 if let Some(ref token) = configuration.bearer_access_token {
5869 req_builder = req_builder.bearer_auth(token.to_owned());
5870 };
5871
5872 let req = req_builder.build()?;
5873 let resp = configuration.client.execute(req).await?;
5874
5875 let status = resp.status();
5876
5877 if !status.is_client_error() && !status.is_server_error() {
5878 Ok(())
5879 } else {
5880 let content = resp.text().await?;
5881 let entity: Option<PutCommerceDisclosureByDisclosureidError> = serde_json::from_str(&content).ok();
5882 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5883 }
5884}
5885
5886pub async fn put_commerce_discount_by_discountid(configuration: &configuration::Configuration, discountid: &str) -> Result<(), Error<PutCommerceDiscountByDiscountidError>> {
5888 let p_discountid = discountid;
5890
5891 let uri_str = format!("{}/v1/commerce/discount/{discountid}", configuration.base_path, discountid=crate::apis::urlencode(p_discountid));
5892 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5893
5894 if let Some(ref user_agent) = configuration.user_agent {
5895 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5896 }
5897 if let Some(ref token) = configuration.bearer_access_token {
5898 req_builder = req_builder.bearer_auth(token.to_owned());
5899 };
5900
5901 let req = req_builder.build()?;
5902 let resp = configuration.client.execute(req).await?;
5903
5904 let status = resp.status();
5905
5906 if !status.is_client_error() && !status.is_server_error() {
5907 Ok(())
5908 } else {
5909 let content = resp.text().await?;
5910 let entity: Option<PutCommerceDiscountByDiscountidError> = serde_json::from_str(&content).ok();
5911 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5912 }
5913}
5914
5915pub async fn put_commerce_movie_by_movieid(configuration: &configuration::Configuration, movieid: &str) -> Result<(), Error<PutCommerceMovieByMovieidError>> {
5917 let p_movieid = movieid;
5919
5920 let uri_str = format!("{}/v1/commerce/movie/{movieid}", configuration.base_path, movieid=crate::apis::urlencode(p_movieid));
5921 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5922
5923 if let Some(ref user_agent) = configuration.user_agent {
5924 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5925 }
5926 if let Some(ref token) = configuration.bearer_access_token {
5927 req_builder = req_builder.bearer_auth(token.to_owned());
5928 };
5929
5930 let req = req_builder.build()?;
5931 let resp = configuration.client.execute(req).await?;
5932
5933 let status = resp.status();
5934
5935 if !status.is_client_error() && !status.is_server_error() {
5936 Ok(())
5937 } else {
5938 let content = resp.text().await?;
5939 let entity: Option<PutCommerceMovieByMovieidError> = serde_json::from_str(&content).ok();
5940 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5941 }
5942}
5943
5944pub async fn put_commerce_note_by_noteid(configuration: &configuration::Configuration, noteid: &str) -> Result<(), Error<PutCommerceNoteByNoteidError>> {
5946 let p_noteid = noteid;
5948
5949 let uri_str = format!("{}/v1/commerce/note/{noteid}", configuration.base_path, noteid=crate::apis::urlencode(p_noteid));
5950 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5951
5952 if let Some(ref user_agent) = configuration.user_agent {
5953 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5954 }
5955 if let Some(ref token) = configuration.bearer_access_token {
5956 req_builder = req_builder.bearer_auth(token.to_owned());
5957 };
5958
5959 let req = req_builder.build()?;
5960 let resp = configuration.client.execute(req).await?;
5961
5962 let status = resp.status();
5963
5964 if !status.is_client_error() && !status.is_server_error() {
5965 Ok(())
5966 } else {
5967 let content = resp.text().await?;
5968 let entity: Option<PutCommerceNoteByNoteidError> = serde_json::from_str(&content).ok();
5969 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5970 }
5971}
5972
5973pub async fn put_commerce_plans_entries_by_slug(configuration: &configuration::Configuration, slug: &str) -> Result<(), Error<PutCommercePlansEntriesBySlugError>> {
5975 let p_slug = slug;
5977
5978 let uri_str = format!("{}/v1/commerce/plans/entries/{slug}", configuration.base_path, slug=crate::apis::urlencode(p_slug));
5979 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5980
5981 if let Some(ref user_agent) = configuration.user_agent {
5982 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5983 }
5984 if let Some(ref token) = configuration.bearer_access_token {
5985 req_builder = req_builder.bearer_auth(token.to_owned());
5986 };
5987
5988 let req = req_builder.build()?;
5989 let resp = configuration.client.execute(req).await?;
5990
5991 let status = resp.status();
5992
5993 if !status.is_client_error() && !status.is_server_error() {
5994 Ok(())
5995 } else {
5996 let content = resp.text().await?;
5997 let entity: Option<PutCommercePlansEntriesBySlugError> = serde_json::from_str(&content).ok();
5998 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5999 }
6000}
6001
6002pub async fn put_commerce_product_by_productid(configuration: &configuration::Configuration, productid: &str) -> Result<(), Error<PutCommerceProductByProductidError>> {
6004 let p_productid = productid;
6006
6007 let uri_str = format!("{}/v1/commerce/product/{productid}", configuration.base_path, productid=crate::apis::urlencode(p_productid));
6008 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6009
6010 if let Some(ref user_agent) = configuration.user_agent {
6011 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6012 }
6013 if let Some(ref token) = configuration.bearer_access_token {
6014 req_builder = req_builder.bearer_auth(token.to_owned());
6015 };
6016
6017 let req = req_builder.build()?;
6018 let resp = configuration.client.execute(req).await?;
6019
6020 let status = resp.status();
6021
6022 if !status.is_client_error() && !status.is_server_error() {
6023 Ok(())
6024 } else {
6025 let content = resp.text().await?;
6026 let entity: Option<PutCommerceProductByProductidError> = serde_json::from_str(&content).ok();
6027 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6028 }
6029}
6030
6031pub async fn put_commerce_rates_entries_by_product_by_meter(configuration: &configuration::Configuration, product: &str, meter: &str) -> Result<(), Error<PutCommerceRatesEntriesByProductByMeterError>> {
6033 let p_product = product;
6035 let p_meter = meter;
6036
6037 let uri_str = format!("{}/v1/commerce/rates/entries/{product}/{meter}", configuration.base_path, product=crate::apis::urlencode(p_product), meter=crate::apis::urlencode(p_meter));
6038 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6039
6040 if let Some(ref user_agent) = configuration.user_agent {
6041 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6042 }
6043 if let Some(ref token) = configuration.bearer_access_token {
6044 req_builder = req_builder.bearer_auth(token.to_owned());
6045 };
6046
6047 let req = req_builder.build()?;
6048 let resp = configuration.client.execute(req).await?;
6049
6050 let status = resp.status();
6051
6052 if !status.is_client_error() && !status.is_server_error() {
6053 Ok(())
6054 } else {
6055 let content = resp.text().await?;
6056 let entity: Option<PutCommerceRatesEntriesByProductByMeterError> = serde_json::from_str(&content).ok();
6057 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6058 }
6059}
6060
6061pub async fn put_commerce_return_by_returnid(configuration: &configuration::Configuration, returnid: &str) -> Result<(), Error<PutCommerceReturnByReturnidError>> {
6063 let p_returnid = returnid;
6065
6066 let uri_str = format!("{}/v1/commerce/return/{returnid}", configuration.base_path, returnid=crate::apis::urlencode(p_returnid));
6067 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6068
6069 if let Some(ref user_agent) = configuration.user_agent {
6070 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6071 }
6072 if let Some(ref token) = configuration.bearer_access_token {
6073 req_builder = req_builder.bearer_auth(token.to_owned());
6074 };
6075
6076 let req = req_builder.build()?;
6077 let resp = configuration.client.execute(req).await?;
6078
6079 let status = resp.status();
6080
6081 if !status.is_client_error() && !status.is_server_error() {
6082 Ok(())
6083 } else {
6084 let content = resp.text().await?;
6085 let entity: Option<PutCommerceReturnByReturnidError> = serde_json::from_str(&content).ok();
6086 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6087 }
6088}
6089
6090pub async fn put_commerce_saleschannel_by_saleschannelid(configuration: &configuration::Configuration, saleschannelid: &str) -> Result<(), Error<PutCommerceSaleschannelBySaleschannelidError>> {
6092 let p_saleschannelid = saleschannelid;
6094
6095 let uri_str = format!("{}/v1/commerce/saleschannel/{saleschannelid}", configuration.base_path, saleschannelid=crate::apis::urlencode(p_saleschannelid));
6096 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6097
6098 if let Some(ref user_agent) = configuration.user_agent {
6099 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6100 }
6101 if let Some(ref token) = configuration.bearer_access_token {
6102 req_builder = req_builder.bearer_auth(token.to_owned());
6103 };
6104
6105 let req = req_builder.build()?;
6106 let resp = configuration.client.execute(req).await?;
6107
6108 let status = resp.status();
6109
6110 if !status.is_client_error() && !status.is_server_error() {
6111 Ok(())
6112 } else {
6113 let content = resp.text().await?;
6114 let entity: Option<PutCommerceSaleschannelBySaleschannelidError> = serde_json::from_str(&content).ok();
6115 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6116 }
6117}
6118
6119pub async fn put_commerce_stocklocation_by_stocklocationid(configuration: &configuration::Configuration, stocklocationid: &str) -> Result<(), Error<PutCommerceStocklocationByStocklocationidError>> {
6121 let p_stocklocationid = stocklocationid;
6123
6124 let uri_str = format!("{}/v1/commerce/stocklocation/{stocklocationid}", configuration.base_path, stocklocationid=crate::apis::urlencode(p_stocklocationid));
6125 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6126
6127 if let Some(ref user_agent) = configuration.user_agent {
6128 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6129 }
6130 if let Some(ref token) = configuration.bearer_access_token {
6131 req_builder = req_builder.bearer_auth(token.to_owned());
6132 };
6133
6134 let req = req_builder.build()?;
6135 let resp = configuration.client.execute(req).await?;
6136
6137 let status = resp.status();
6138
6139 if !status.is_client_error() && !status.is_server_error() {
6140 Ok(())
6141 } else {
6142 let content = resp.text().await?;
6143 let entity: Option<PutCommerceStocklocationByStocklocationidError> = serde_json::from_str(&content).ok();
6144 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6145 }
6146}
6147
6148pub async fn put_commerce_store_by_storeid(configuration: &configuration::Configuration, storeid: &str) -> Result<(), Error<PutCommerceStoreByStoreidError>> {
6150 let p_storeid = storeid;
6152
6153 let uri_str = format!("{}/v1/commerce/store/{storeid}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid));
6154 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6155
6156 if let Some(ref user_agent) = configuration.user_agent {
6157 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6158 }
6159 if let Some(ref token) = configuration.bearer_access_token {
6160 req_builder = req_builder.bearer_auth(token.to_owned());
6161 };
6162
6163 let req = req_builder.build()?;
6164 let resp = configuration.client.execute(req).await?;
6165
6166 let status = resp.status();
6167
6168 if !status.is_client_error() && !status.is_server_error() {
6169 Ok(())
6170 } else {
6171 let content = resp.text().await?;
6172 let entity: Option<PutCommerceStoreByStoreidError> = serde_json::from_str(&content).ok();
6173 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6174 }
6175}
6176
6177pub async fn put_commerce_store_by_storeid_listing_by_key(configuration: &configuration::Configuration, storeid: &str, key: &str) -> Result<(), Error<PutCommerceStoreByStoreidListingByKeyError>> {
6179 let p_storeid = storeid;
6181 let p_key = key;
6182
6183 let uri_str = format!("{}/v1/commerce/store/{storeid}/listing/{key}", configuration.base_path, storeid=crate::apis::urlencode(p_storeid), key=crate::apis::urlencode(p_key));
6184 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6185
6186 if let Some(ref user_agent) = configuration.user_agent {
6187 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6188 }
6189 if let Some(ref token) = configuration.bearer_access_token {
6190 req_builder = req_builder.bearer_auth(token.to_owned());
6191 };
6192
6193 let req = req_builder.build()?;
6194 let resp = configuration.client.execute(req).await?;
6195
6196 let status = resp.status();
6197
6198 if !status.is_client_error() && !status.is_server_error() {
6199 Ok(())
6200 } else {
6201 let content = resp.text().await?;
6202 let entity: Option<PutCommerceStoreByStoreidListingByKeyError> = serde_json::from_str(&content).ok();
6203 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6204 }
6205}
6206
6207pub async fn put_commerce_submission_by_submissionid(configuration: &configuration::Configuration, submissionid: &str) -> Result<(), Error<PutCommerceSubmissionBySubmissionidError>> {
6209 let p_submissionid = submissionid;
6211
6212 let uri_str = format!("{}/v1/commerce/submission/{submissionid}", configuration.base_path, submissionid=crate::apis::urlencode(p_submissionid));
6213 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6214
6215 if let Some(ref user_agent) = configuration.user_agent {
6216 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6217 }
6218 if let Some(ref token) = configuration.bearer_access_token {
6219 req_builder = req_builder.bearer_auth(token.to_owned());
6220 };
6221
6222 let req = req_builder.build()?;
6223 let resp = configuration.client.execute(req).await?;
6224
6225 let status = resp.status();
6226
6227 if !status.is_client_error() && !status.is_server_error() {
6228 Ok(())
6229 } else {
6230 let content = resp.text().await?;
6231 let entity: Option<PutCommerceSubmissionBySubmissionidError> = serde_json::from_str(&content).ok();
6232 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6233 }
6234}
6235
6236pub async fn put_commerce_subscriber_by_subscriberid(configuration: &configuration::Configuration, subscriberid: &str) -> Result<(), Error<PutCommerceSubscriberBySubscriberidError>> {
6238 let p_subscriberid = subscriberid;
6240
6241 let uri_str = format!("{}/v1/commerce/subscriber/{subscriberid}", configuration.base_path, subscriberid=crate::apis::urlencode(p_subscriberid));
6242 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6243
6244 if let Some(ref user_agent) = configuration.user_agent {
6245 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6246 }
6247 if let Some(ref token) = configuration.bearer_access_token {
6248 req_builder = req_builder.bearer_auth(token.to_owned());
6249 };
6250
6251 let req = req_builder.build()?;
6252 let resp = configuration.client.execute(req).await?;
6253
6254 let status = resp.status();
6255
6256 if !status.is_client_error() && !status.is_server_error() {
6257 Ok(())
6258 } else {
6259 let content = resp.text().await?;
6260 let entity: Option<PutCommerceSubscriberBySubscriberidError> = serde_json::from_str(&content).ok();
6261 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6262 }
6263}
6264
6265pub async fn put_commerce_tokentransaction_by_tokentransactionid(configuration: &configuration::Configuration, tokentransactionid: &str) -> Result<(), Error<PutCommerceTokentransactionByTokentransactionidError>> {
6267 let p_tokentransactionid = tokentransactionid;
6269
6270 let uri_str = format!("{}/v1/commerce/tokentransaction/{tokentransactionid}", configuration.base_path, tokentransactionid=crate::apis::urlencode(p_tokentransactionid));
6271 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6272
6273 if let Some(ref user_agent) = configuration.user_agent {
6274 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6275 }
6276 if let Some(ref token) = configuration.bearer_access_token {
6277 req_builder = req_builder.bearer_auth(token.to_owned());
6278 };
6279
6280 let req = req_builder.build()?;
6281 let resp = configuration.client.execute(req).await?;
6282
6283 let status = resp.status();
6284
6285 if !status.is_client_error() && !status.is_server_error() {
6286 Ok(())
6287 } else {
6288 let content = resp.text().await?;
6289 let entity: Option<PutCommerceTokentransactionByTokentransactionidError> = serde_json::from_str(&content).ok();
6290 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6291 }
6292}
6293
6294pub async fn put_commerce_transfer_by_transferid(configuration: &configuration::Configuration, transferid: &str) -> Result<(), Error<PutCommerceTransferByTransferidError>> {
6296 let p_transferid = transferid;
6298
6299 let uri_str = format!("{}/v1/commerce/transfer/{transferid}", configuration.base_path, transferid=crate::apis::urlencode(p_transferid));
6300 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6301
6302 if let Some(ref user_agent) = configuration.user_agent {
6303 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6304 }
6305 if let Some(ref token) = configuration.bearer_access_token {
6306 req_builder = req_builder.bearer_auth(token.to_owned());
6307 };
6308
6309 let req = req_builder.build()?;
6310 let resp = configuration.client.execute(req).await?;
6311
6312 let status = resp.status();
6313
6314 if !status.is_client_error() && !status.is_server_error() {
6315 Ok(())
6316 } else {
6317 let content = resp.text().await?;
6318 let entity: Option<PutCommerceTransferByTransferidError> = serde_json::from_str(&content).ok();
6319 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6320 }
6321}
6322
6323pub async fn put_commerce_variant_by_variantid(configuration: &configuration::Configuration, variantid: &str) -> Result<(), Error<PutCommerceVariantByVariantidError>> {
6325 let p_variantid = variantid;
6327
6328 let uri_str = format!("{}/v1/commerce/variant/{variantid}", configuration.base_path, variantid=crate::apis::urlencode(p_variantid));
6329 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6330
6331 if let Some(ref user_agent) = configuration.user_agent {
6332 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6333 }
6334 if let Some(ref token) = configuration.bearer_access_token {
6335 req_builder = req_builder.bearer_auth(token.to_owned());
6336 };
6337
6338 let req = req_builder.build()?;
6339 let resp = configuration.client.execute(req).await?;
6340
6341 let status = resp.status();
6342
6343 if !status.is_client_error() && !status.is_server_error() {
6344 Ok(())
6345 } else {
6346 let content = resp.text().await?;
6347 let entity: Option<PutCommerceVariantByVariantidError> = serde_json::from_str(&content).ok();
6348 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6349 }
6350}
6351
6352pub async fn put_commerce_wallet_by_walletid(configuration: &configuration::Configuration, walletid: &str) -> Result<(), Error<PutCommerceWalletByWalletidError>> {
6354 let p_walletid = walletid;
6356
6357 let uri_str = format!("{}/v1/commerce/wallet/{walletid}", configuration.base_path, walletid=crate::apis::urlencode(p_walletid));
6358 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6359
6360 if let Some(ref user_agent) = configuration.user_agent {
6361 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6362 }
6363 if let Some(ref token) = configuration.bearer_access_token {
6364 req_builder = req_builder.bearer_auth(token.to_owned());
6365 };
6366
6367 let req = req_builder.build()?;
6368 let resp = configuration.client.execute(req).await?;
6369
6370 let status = resp.status();
6371
6372 if !status.is_client_error() && !status.is_server_error() {
6373 Ok(())
6374 } else {
6375 let content = resp.text().await?;
6376 let entity: Option<PutCommerceWalletByWalletidError> = serde_json::from_str(&content).ok();
6377 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6378 }
6379}
6380
6381pub async fn put_commerce_watchlist_by_watchlistid(configuration: &configuration::Configuration, watchlistid: &str) -> Result<(), Error<PutCommerceWatchlistByWatchlistidError>> {
6383 let p_watchlistid = watchlistid;
6385
6386 let uri_str = format!("{}/v1/commerce/watchlist/{watchlistid}", configuration.base_path, watchlistid=crate::apis::urlencode(p_watchlistid));
6387 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6388
6389 if let Some(ref user_agent) = configuration.user_agent {
6390 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6391 }
6392 if let Some(ref token) = configuration.bearer_access_token {
6393 req_builder = req_builder.bearer_auth(token.to_owned());
6394 };
6395
6396 let req = req_builder.build()?;
6397 let resp = configuration.client.execute(req).await?;
6398
6399 let status = resp.status();
6400
6401 if !status.is_client_error() && !status.is_server_error() {
6402 Ok(())
6403 } else {
6404 let content = resp.text().await?;
6405 let entity: Option<PutCommerceWatchlistByWatchlistidError> = serde_json::from_str(&content).ok();
6406 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6407 }
6408}
6409
6410pub async fn put_commerce_webhook_by_webhookid(configuration: &configuration::Configuration, webhookid: &str) -> Result<(), Error<PutCommerceWebhookByWebhookidError>> {
6412 let p_webhookid = webhookid;
6414
6415 let uri_str = format!("{}/v1/commerce/webhook/{webhookid}", configuration.base_path, webhookid=crate::apis::urlencode(p_webhookid));
6416 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6417
6418 if let Some(ref user_agent) = configuration.user_agent {
6419 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6420 }
6421 if let Some(ref token) = configuration.bearer_access_token {
6422 req_builder = req_builder.bearer_auth(token.to_owned());
6423 };
6424
6425 let req = req_builder.build()?;
6426 let resp = configuration.client.execute(req).await?;
6427
6428 let status = resp.status();
6429
6430 if !status.is_client_error() && !status.is_server_error() {
6431 Ok(())
6432 } else {
6433 let content = resp.text().await?;
6434 let entity: Option<PutCommerceWebhookByWebhookidError> = serde_json::from_str(&content).ok();
6435 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6436 }
6437}
6438
6439pub async fn set_cart_item(configuration: &configuration::Configuration, id: &str, cart_item_set: models::CartItemSet) -> Result<models::Cart, Error<SetCartItemError>> {
6441 let p_id = id;
6443 let p_cart_item_set = cart_item_set;
6444
6445 let uri_str = format!("{}/v1/commerce/cart/{id}/item", configuration.base_path, id=crate::apis::urlencode(p_id));
6446 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6447
6448 if let Some(ref user_agent) = configuration.user_agent {
6449 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6450 }
6451 if let Some(ref token) = configuration.bearer_access_token {
6452 req_builder = req_builder.bearer_auth(token.to_owned());
6453 };
6454 req_builder = req_builder.json(&p_cart_item_set);
6455
6456 let req = req_builder.build()?;
6457 let resp = configuration.client.execute(req).await?;
6458
6459 let status = resp.status();
6460 let content_type = resp
6461 .headers()
6462 .get("content-type")
6463 .and_then(|v| v.to_str().ok())
6464 .unwrap_or("application/octet-stream");
6465 let content_type = super::ContentType::from(content_type);
6466
6467 if !status.is_client_error() && !status.is_server_error() {
6468 let content = resp.text().await?;
6469 match content_type {
6470 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6471 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Cart`"))),
6472 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Cart`")))),
6473 }
6474 } else {
6475 let content = resp.text().await?;
6476 let entity: Option<SetCartItemError> = serde_json::from_str(&content).ok();
6477 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6478 }
6479}
6480
6481pub async fn take_payment(configuration: &configuration::Configuration, payment_in: models::PaymentIn) -> Result<models::PaymentOut, Error<TakePaymentError>> {
6483 let p_payment_in = payment_in;
6485
6486 let uri_str = format!("{}/v1/commerce/payments", configuration.base_path);
6487 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6488
6489 if let Some(ref user_agent) = configuration.user_agent {
6490 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6491 }
6492 if let Some(ref token) = configuration.bearer_access_token {
6493 req_builder = req_builder.bearer_auth(token.to_owned());
6494 };
6495 req_builder = req_builder.json(&p_payment_in);
6496
6497 let req = req_builder.build()?;
6498 let resp = configuration.client.execute(req).await?;
6499
6500 let status = resp.status();
6501 let content_type = resp
6502 .headers()
6503 .get("content-type")
6504 .and_then(|v| v.to_str().ok())
6505 .unwrap_or("application/octet-stream");
6506 let content_type = super::ContentType::from(content_type);
6507
6508 if !status.is_client_error() && !status.is_server_error() {
6509 let content = resp.text().await?;
6510 match content_type {
6511 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6512 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaymentOut`"))),
6513 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaymentOut`")))),
6514 }
6515 } else {
6516 let content = resp.text().await?;
6517 let entity: Option<TakePaymentError> = serde_json::from_str(&content).ok();
6518 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6519 }
6520}
6521