dub 0.27.0__py3-none-any.whl → 0.27.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dub/_version.py +3 -3
- dub/analytics.py +21 -36
- dub/commissions.py +41 -72
- dub/customers.py +101 -180
- dub/domains.py +121 -224
- dub/embed_tokens.py +21 -36
- dub/events.py +21 -36
- dub/folders.py +81 -152
- dub/links.py +201 -376
- dub/models/operations/tracklead.py +2 -2
- dub/models/operations/tracksale.py +2 -2
- dub/partners.py +101 -192
- dub/qr_codes.py +19 -34
- dub/tags.py +81 -152
- dub/track.py +41 -72
- dub/utils/__init__.py +0 -3
- dub/utils/serializers.py +1 -18
- dub/utils/unmarshal_json_response.py +24 -0
- dub/workspaces.py +41 -72
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/METADATA +1 -1
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/RECORD +23 -22
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/LICENSE +0 -0
- {dub-0.27.0.dist-info → dub-0.27.1.dist-info}/WHEEL +0 -0
dub/customers.py
CHANGED
|
@@ -5,6 +5,7 @@ from dub import utils
|
|
|
5
5
|
from dub._hooks import HookContext
|
|
6
6
|
from dub.models import errors, operations
|
|
7
7
|
from dub.types import BaseModel, OptionalNullable, UNSET
|
|
8
|
+
from dub.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
9
|
from typing import Any, List, Mapping, Optional, Union, cast
|
|
9
10
|
from typing_extensions import deprecated
|
|
10
11
|
|
|
@@ -96,47 +97,39 @@ class Customers(BaseSDK):
|
|
|
96
97
|
|
|
97
98
|
response_data: Any = None
|
|
98
99
|
if utils.match_response(http_res, "200", "application/json"):
|
|
99
|
-
return
|
|
100
|
+
return unmarshal_json_response(
|
|
100
101
|
Optional[List[operations.GetCustomersResponseBody]], http_res
|
|
101
102
|
)
|
|
102
103
|
if utils.match_response(http_res, "400", "application/json"):
|
|
103
|
-
response_data =
|
|
104
|
-
errors.BadRequestData, http_res
|
|
105
|
-
)
|
|
104
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
106
105
|
raise errors.BadRequest(response_data, http_res)
|
|
107
106
|
if utils.match_response(http_res, "401", "application/json"):
|
|
108
|
-
response_data =
|
|
109
|
-
errors.UnauthorizedData, http_res
|
|
110
|
-
)
|
|
107
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
111
108
|
raise errors.Unauthorized(response_data, http_res)
|
|
112
109
|
if utils.match_response(http_res, "403", "application/json"):
|
|
113
|
-
response_data =
|
|
114
|
-
errors.ForbiddenData, http_res
|
|
115
|
-
)
|
|
110
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
116
111
|
raise errors.Forbidden(response_data, http_res)
|
|
117
112
|
if utils.match_response(http_res, "404", "application/json"):
|
|
118
|
-
response_data =
|
|
113
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
119
114
|
raise errors.NotFound(response_data, http_res)
|
|
120
115
|
if utils.match_response(http_res, "409", "application/json"):
|
|
121
|
-
response_data =
|
|
116
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
122
117
|
raise errors.Conflict(response_data, http_res)
|
|
123
118
|
if utils.match_response(http_res, "410", "application/json"):
|
|
124
|
-
response_data =
|
|
125
|
-
errors.InviteExpiredData, http_res
|
|
126
|
-
)
|
|
119
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
127
120
|
raise errors.InviteExpired(response_data, http_res)
|
|
128
121
|
if utils.match_response(http_res, "422", "application/json"):
|
|
129
|
-
response_data =
|
|
122
|
+
response_data = unmarshal_json_response(
|
|
130
123
|
errors.UnprocessableEntityData, http_res
|
|
131
124
|
)
|
|
132
125
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
133
126
|
if utils.match_response(http_res, "429", "application/json"):
|
|
134
|
-
response_data =
|
|
127
|
+
response_data = unmarshal_json_response(
|
|
135
128
|
errors.RateLimitExceededData, http_res
|
|
136
129
|
)
|
|
137
130
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
138
131
|
if utils.match_response(http_res, "500", "application/json"):
|
|
139
|
-
response_data =
|
|
132
|
+
response_data = unmarshal_json_response(
|
|
140
133
|
errors.InternalServerErrorData, http_res
|
|
141
134
|
)
|
|
142
135
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -235,47 +228,39 @@ class Customers(BaseSDK):
|
|
|
235
228
|
|
|
236
229
|
response_data: Any = None
|
|
237
230
|
if utils.match_response(http_res, "200", "application/json"):
|
|
238
|
-
return
|
|
231
|
+
return unmarshal_json_response(
|
|
239
232
|
Optional[List[operations.GetCustomersResponseBody]], http_res
|
|
240
233
|
)
|
|
241
234
|
if utils.match_response(http_res, "400", "application/json"):
|
|
242
|
-
response_data =
|
|
243
|
-
errors.BadRequestData, http_res
|
|
244
|
-
)
|
|
235
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
245
236
|
raise errors.BadRequest(response_data, http_res)
|
|
246
237
|
if utils.match_response(http_res, "401", "application/json"):
|
|
247
|
-
response_data =
|
|
248
|
-
errors.UnauthorizedData, http_res
|
|
249
|
-
)
|
|
238
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
250
239
|
raise errors.Unauthorized(response_data, http_res)
|
|
251
240
|
if utils.match_response(http_res, "403", "application/json"):
|
|
252
|
-
response_data =
|
|
253
|
-
errors.ForbiddenData, http_res
|
|
254
|
-
)
|
|
241
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
255
242
|
raise errors.Forbidden(response_data, http_res)
|
|
256
243
|
if utils.match_response(http_res, "404", "application/json"):
|
|
257
|
-
response_data =
|
|
244
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
258
245
|
raise errors.NotFound(response_data, http_res)
|
|
259
246
|
if utils.match_response(http_res, "409", "application/json"):
|
|
260
|
-
response_data =
|
|
247
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
261
248
|
raise errors.Conflict(response_data, http_res)
|
|
262
249
|
if utils.match_response(http_res, "410", "application/json"):
|
|
263
|
-
response_data =
|
|
264
|
-
errors.InviteExpiredData, http_res
|
|
265
|
-
)
|
|
250
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
266
251
|
raise errors.InviteExpired(response_data, http_res)
|
|
267
252
|
if utils.match_response(http_res, "422", "application/json"):
|
|
268
|
-
response_data =
|
|
253
|
+
response_data = unmarshal_json_response(
|
|
269
254
|
errors.UnprocessableEntityData, http_res
|
|
270
255
|
)
|
|
271
256
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
272
257
|
if utils.match_response(http_res, "429", "application/json"):
|
|
273
|
-
response_data =
|
|
258
|
+
response_data = unmarshal_json_response(
|
|
274
259
|
errors.RateLimitExceededData, http_res
|
|
275
260
|
)
|
|
276
261
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
277
262
|
if utils.match_response(http_res, "500", "application/json"):
|
|
278
|
-
response_data =
|
|
263
|
+
response_data = unmarshal_json_response(
|
|
279
264
|
errors.InternalServerErrorData, http_res
|
|
280
265
|
)
|
|
281
266
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -389,47 +374,39 @@ class Customers(BaseSDK):
|
|
|
389
374
|
|
|
390
375
|
response_data: Any = None
|
|
391
376
|
if utils.match_response(http_res, "201", "application/json"):
|
|
392
|
-
return
|
|
377
|
+
return unmarshal_json_response(
|
|
393
378
|
Optional[operations.CreateCustomerResponseBody], http_res
|
|
394
379
|
)
|
|
395
380
|
if utils.match_response(http_res, "400", "application/json"):
|
|
396
|
-
response_data =
|
|
397
|
-
errors.BadRequestData, http_res
|
|
398
|
-
)
|
|
381
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
399
382
|
raise errors.BadRequest(response_data, http_res)
|
|
400
383
|
if utils.match_response(http_res, "401", "application/json"):
|
|
401
|
-
response_data =
|
|
402
|
-
errors.UnauthorizedData, http_res
|
|
403
|
-
)
|
|
384
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
404
385
|
raise errors.Unauthorized(response_data, http_res)
|
|
405
386
|
if utils.match_response(http_res, "403", "application/json"):
|
|
406
|
-
response_data =
|
|
407
|
-
errors.ForbiddenData, http_res
|
|
408
|
-
)
|
|
387
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
409
388
|
raise errors.Forbidden(response_data, http_res)
|
|
410
389
|
if utils.match_response(http_res, "404", "application/json"):
|
|
411
|
-
response_data =
|
|
390
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
412
391
|
raise errors.NotFound(response_data, http_res)
|
|
413
392
|
if utils.match_response(http_res, "409", "application/json"):
|
|
414
|
-
response_data =
|
|
393
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
415
394
|
raise errors.Conflict(response_data, http_res)
|
|
416
395
|
if utils.match_response(http_res, "410", "application/json"):
|
|
417
|
-
response_data =
|
|
418
|
-
errors.InviteExpiredData, http_res
|
|
419
|
-
)
|
|
396
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
420
397
|
raise errors.InviteExpired(response_data, http_res)
|
|
421
398
|
if utils.match_response(http_res, "422", "application/json"):
|
|
422
|
-
response_data =
|
|
399
|
+
response_data = unmarshal_json_response(
|
|
423
400
|
errors.UnprocessableEntityData, http_res
|
|
424
401
|
)
|
|
425
402
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
426
403
|
if utils.match_response(http_res, "429", "application/json"):
|
|
427
|
-
response_data =
|
|
404
|
+
response_data = unmarshal_json_response(
|
|
428
405
|
errors.RateLimitExceededData, http_res
|
|
429
406
|
)
|
|
430
407
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
431
408
|
if utils.match_response(http_res, "500", "application/json"):
|
|
432
|
-
response_data =
|
|
409
|
+
response_data = unmarshal_json_response(
|
|
433
410
|
errors.InternalServerErrorData, http_res
|
|
434
411
|
)
|
|
435
412
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -543,47 +520,39 @@ class Customers(BaseSDK):
|
|
|
543
520
|
|
|
544
521
|
response_data: Any = None
|
|
545
522
|
if utils.match_response(http_res, "201", "application/json"):
|
|
546
|
-
return
|
|
523
|
+
return unmarshal_json_response(
|
|
547
524
|
Optional[operations.CreateCustomerResponseBody], http_res
|
|
548
525
|
)
|
|
549
526
|
if utils.match_response(http_res, "400", "application/json"):
|
|
550
|
-
response_data =
|
|
551
|
-
errors.BadRequestData, http_res
|
|
552
|
-
)
|
|
527
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
553
528
|
raise errors.BadRequest(response_data, http_res)
|
|
554
529
|
if utils.match_response(http_res, "401", "application/json"):
|
|
555
|
-
response_data =
|
|
556
|
-
errors.UnauthorizedData, http_res
|
|
557
|
-
)
|
|
530
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
558
531
|
raise errors.Unauthorized(response_data, http_res)
|
|
559
532
|
if utils.match_response(http_res, "403", "application/json"):
|
|
560
|
-
response_data =
|
|
561
|
-
errors.ForbiddenData, http_res
|
|
562
|
-
)
|
|
533
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
563
534
|
raise errors.Forbidden(response_data, http_res)
|
|
564
535
|
if utils.match_response(http_res, "404", "application/json"):
|
|
565
|
-
response_data =
|
|
536
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
566
537
|
raise errors.NotFound(response_data, http_res)
|
|
567
538
|
if utils.match_response(http_res, "409", "application/json"):
|
|
568
|
-
response_data =
|
|
539
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
569
540
|
raise errors.Conflict(response_data, http_res)
|
|
570
541
|
if utils.match_response(http_res, "410", "application/json"):
|
|
571
|
-
response_data =
|
|
572
|
-
errors.InviteExpiredData, http_res
|
|
573
|
-
)
|
|
542
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
574
543
|
raise errors.InviteExpired(response_data, http_res)
|
|
575
544
|
if utils.match_response(http_res, "422", "application/json"):
|
|
576
|
-
response_data =
|
|
545
|
+
response_data = unmarshal_json_response(
|
|
577
546
|
errors.UnprocessableEntityData, http_res
|
|
578
547
|
)
|
|
579
548
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
580
549
|
if utils.match_response(http_res, "429", "application/json"):
|
|
581
|
-
response_data =
|
|
550
|
+
response_data = unmarshal_json_response(
|
|
582
551
|
errors.RateLimitExceededData, http_res
|
|
583
552
|
)
|
|
584
553
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
585
554
|
if utils.match_response(http_res, "500", "application/json"):
|
|
586
|
-
response_data =
|
|
555
|
+
response_data = unmarshal_json_response(
|
|
587
556
|
errors.InternalServerErrorData, http_res
|
|
588
557
|
)
|
|
589
558
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -682,47 +651,39 @@ class Customers(BaseSDK):
|
|
|
682
651
|
|
|
683
652
|
response_data: Any = None
|
|
684
653
|
if utils.match_response(http_res, "200", "application/json"):
|
|
685
|
-
return
|
|
654
|
+
return unmarshal_json_response(
|
|
686
655
|
Optional[operations.GetCustomerResponseBody], http_res
|
|
687
656
|
)
|
|
688
657
|
if utils.match_response(http_res, "400", "application/json"):
|
|
689
|
-
response_data =
|
|
690
|
-
errors.BadRequestData, http_res
|
|
691
|
-
)
|
|
658
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
692
659
|
raise errors.BadRequest(response_data, http_res)
|
|
693
660
|
if utils.match_response(http_res, "401", "application/json"):
|
|
694
|
-
response_data =
|
|
695
|
-
errors.UnauthorizedData, http_res
|
|
696
|
-
)
|
|
661
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
697
662
|
raise errors.Unauthorized(response_data, http_res)
|
|
698
663
|
if utils.match_response(http_res, "403", "application/json"):
|
|
699
|
-
response_data =
|
|
700
|
-
errors.ForbiddenData, http_res
|
|
701
|
-
)
|
|
664
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
702
665
|
raise errors.Forbidden(response_data, http_res)
|
|
703
666
|
if utils.match_response(http_res, "404", "application/json"):
|
|
704
|
-
response_data =
|
|
667
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
705
668
|
raise errors.NotFound(response_data, http_res)
|
|
706
669
|
if utils.match_response(http_res, "409", "application/json"):
|
|
707
|
-
response_data =
|
|
670
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
708
671
|
raise errors.Conflict(response_data, http_res)
|
|
709
672
|
if utils.match_response(http_res, "410", "application/json"):
|
|
710
|
-
response_data =
|
|
711
|
-
errors.InviteExpiredData, http_res
|
|
712
|
-
)
|
|
673
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
713
674
|
raise errors.InviteExpired(response_data, http_res)
|
|
714
675
|
if utils.match_response(http_res, "422", "application/json"):
|
|
715
|
-
response_data =
|
|
676
|
+
response_data = unmarshal_json_response(
|
|
716
677
|
errors.UnprocessableEntityData, http_res
|
|
717
678
|
)
|
|
718
679
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
719
680
|
if utils.match_response(http_res, "429", "application/json"):
|
|
720
|
-
response_data =
|
|
681
|
+
response_data = unmarshal_json_response(
|
|
721
682
|
errors.RateLimitExceededData, http_res
|
|
722
683
|
)
|
|
723
684
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
724
685
|
if utils.match_response(http_res, "500", "application/json"):
|
|
725
|
-
response_data =
|
|
686
|
+
response_data = unmarshal_json_response(
|
|
726
687
|
errors.InternalServerErrorData, http_res
|
|
727
688
|
)
|
|
728
689
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -821,47 +782,39 @@ class Customers(BaseSDK):
|
|
|
821
782
|
|
|
822
783
|
response_data: Any = None
|
|
823
784
|
if utils.match_response(http_res, "200", "application/json"):
|
|
824
|
-
return
|
|
785
|
+
return unmarshal_json_response(
|
|
825
786
|
Optional[operations.GetCustomerResponseBody], http_res
|
|
826
787
|
)
|
|
827
788
|
if utils.match_response(http_res, "400", "application/json"):
|
|
828
|
-
response_data =
|
|
829
|
-
errors.BadRequestData, http_res
|
|
830
|
-
)
|
|
789
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
831
790
|
raise errors.BadRequest(response_data, http_res)
|
|
832
791
|
if utils.match_response(http_res, "401", "application/json"):
|
|
833
|
-
response_data =
|
|
834
|
-
errors.UnauthorizedData, http_res
|
|
835
|
-
)
|
|
792
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
836
793
|
raise errors.Unauthorized(response_data, http_res)
|
|
837
794
|
if utils.match_response(http_res, "403", "application/json"):
|
|
838
|
-
response_data =
|
|
839
|
-
errors.ForbiddenData, http_res
|
|
840
|
-
)
|
|
795
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
841
796
|
raise errors.Forbidden(response_data, http_res)
|
|
842
797
|
if utils.match_response(http_res, "404", "application/json"):
|
|
843
|
-
response_data =
|
|
798
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
844
799
|
raise errors.NotFound(response_data, http_res)
|
|
845
800
|
if utils.match_response(http_res, "409", "application/json"):
|
|
846
|
-
response_data =
|
|
801
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
847
802
|
raise errors.Conflict(response_data, http_res)
|
|
848
803
|
if utils.match_response(http_res, "410", "application/json"):
|
|
849
|
-
response_data =
|
|
850
|
-
errors.InviteExpiredData, http_res
|
|
851
|
-
)
|
|
804
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
852
805
|
raise errors.InviteExpired(response_data, http_res)
|
|
853
806
|
if utils.match_response(http_res, "422", "application/json"):
|
|
854
|
-
response_data =
|
|
807
|
+
response_data = unmarshal_json_response(
|
|
855
808
|
errors.UnprocessableEntityData, http_res
|
|
856
809
|
)
|
|
857
810
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
858
811
|
if utils.match_response(http_res, "429", "application/json"):
|
|
859
|
-
response_data =
|
|
812
|
+
response_data = unmarshal_json_response(
|
|
860
813
|
errors.RateLimitExceededData, http_res
|
|
861
814
|
)
|
|
862
815
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
863
816
|
if utils.match_response(http_res, "500", "application/json"):
|
|
864
|
-
response_data =
|
|
817
|
+
response_data = unmarshal_json_response(
|
|
865
818
|
errors.InternalServerErrorData, http_res
|
|
866
819
|
)
|
|
867
820
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -967,47 +920,39 @@ class Customers(BaseSDK):
|
|
|
967
920
|
|
|
968
921
|
response_data: Any = None
|
|
969
922
|
if utils.match_response(http_res, "200", "application/json"):
|
|
970
|
-
return
|
|
923
|
+
return unmarshal_json_response(
|
|
971
924
|
Optional[operations.UpdateCustomerResponseBody], http_res
|
|
972
925
|
)
|
|
973
926
|
if utils.match_response(http_res, "400", "application/json"):
|
|
974
|
-
response_data =
|
|
975
|
-
errors.BadRequestData, http_res
|
|
976
|
-
)
|
|
927
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
977
928
|
raise errors.BadRequest(response_data, http_res)
|
|
978
929
|
if utils.match_response(http_res, "401", "application/json"):
|
|
979
|
-
response_data =
|
|
980
|
-
errors.UnauthorizedData, http_res
|
|
981
|
-
)
|
|
930
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
982
931
|
raise errors.Unauthorized(response_data, http_res)
|
|
983
932
|
if utils.match_response(http_res, "403", "application/json"):
|
|
984
|
-
response_data =
|
|
985
|
-
errors.ForbiddenData, http_res
|
|
986
|
-
)
|
|
933
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
987
934
|
raise errors.Forbidden(response_data, http_res)
|
|
988
935
|
if utils.match_response(http_res, "404", "application/json"):
|
|
989
|
-
response_data =
|
|
936
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
990
937
|
raise errors.NotFound(response_data, http_res)
|
|
991
938
|
if utils.match_response(http_res, "409", "application/json"):
|
|
992
|
-
response_data =
|
|
939
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
993
940
|
raise errors.Conflict(response_data, http_res)
|
|
994
941
|
if utils.match_response(http_res, "410", "application/json"):
|
|
995
|
-
response_data =
|
|
996
|
-
errors.InviteExpiredData, http_res
|
|
997
|
-
)
|
|
942
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
998
943
|
raise errors.InviteExpired(response_data, http_res)
|
|
999
944
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1000
|
-
response_data =
|
|
945
|
+
response_data = unmarshal_json_response(
|
|
1001
946
|
errors.UnprocessableEntityData, http_res
|
|
1002
947
|
)
|
|
1003
948
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1004
949
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1005
|
-
response_data =
|
|
950
|
+
response_data = unmarshal_json_response(
|
|
1006
951
|
errors.RateLimitExceededData, http_res
|
|
1007
952
|
)
|
|
1008
953
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1009
954
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1010
|
-
response_data =
|
|
955
|
+
response_data = unmarshal_json_response(
|
|
1011
956
|
errors.InternalServerErrorData, http_res
|
|
1012
957
|
)
|
|
1013
958
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1113,47 +1058,39 @@ class Customers(BaseSDK):
|
|
|
1113
1058
|
|
|
1114
1059
|
response_data: Any = None
|
|
1115
1060
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1116
|
-
return
|
|
1061
|
+
return unmarshal_json_response(
|
|
1117
1062
|
Optional[operations.UpdateCustomerResponseBody], http_res
|
|
1118
1063
|
)
|
|
1119
1064
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1120
|
-
response_data =
|
|
1121
|
-
errors.BadRequestData, http_res
|
|
1122
|
-
)
|
|
1065
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1123
1066
|
raise errors.BadRequest(response_data, http_res)
|
|
1124
1067
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1125
|
-
response_data =
|
|
1126
|
-
errors.UnauthorizedData, http_res
|
|
1127
|
-
)
|
|
1068
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1128
1069
|
raise errors.Unauthorized(response_data, http_res)
|
|
1129
1070
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1130
|
-
response_data =
|
|
1131
|
-
errors.ForbiddenData, http_res
|
|
1132
|
-
)
|
|
1071
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1133
1072
|
raise errors.Forbidden(response_data, http_res)
|
|
1134
1073
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1135
|
-
response_data =
|
|
1074
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1136
1075
|
raise errors.NotFound(response_data, http_res)
|
|
1137
1076
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1138
|
-
response_data =
|
|
1077
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1139
1078
|
raise errors.Conflict(response_data, http_res)
|
|
1140
1079
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1141
|
-
response_data =
|
|
1142
|
-
errors.InviteExpiredData, http_res
|
|
1143
|
-
)
|
|
1080
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1144
1081
|
raise errors.InviteExpired(response_data, http_res)
|
|
1145
1082
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1146
|
-
response_data =
|
|
1083
|
+
response_data = unmarshal_json_response(
|
|
1147
1084
|
errors.UnprocessableEntityData, http_res
|
|
1148
1085
|
)
|
|
1149
1086
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1150
1087
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1151
|
-
response_data =
|
|
1088
|
+
response_data = unmarshal_json_response(
|
|
1152
1089
|
errors.RateLimitExceededData, http_res
|
|
1153
1090
|
)
|
|
1154
1091
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1155
1092
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1156
|
-
response_data =
|
|
1093
|
+
response_data = unmarshal_json_response(
|
|
1157
1094
|
errors.InternalServerErrorData, http_res
|
|
1158
1095
|
)
|
|
1159
1096
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1250,47 +1187,39 @@ class Customers(BaseSDK):
|
|
|
1250
1187
|
|
|
1251
1188
|
response_data: Any = None
|
|
1252
1189
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1253
|
-
return
|
|
1190
|
+
return unmarshal_json_response(
|
|
1254
1191
|
Optional[operations.DeleteCustomerResponseBody], http_res
|
|
1255
1192
|
)
|
|
1256
1193
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1257
|
-
response_data =
|
|
1258
|
-
errors.BadRequestData, http_res
|
|
1259
|
-
)
|
|
1194
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1260
1195
|
raise errors.BadRequest(response_data, http_res)
|
|
1261
1196
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1262
|
-
response_data =
|
|
1263
|
-
errors.UnauthorizedData, http_res
|
|
1264
|
-
)
|
|
1197
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1265
1198
|
raise errors.Unauthorized(response_data, http_res)
|
|
1266
1199
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1267
|
-
response_data =
|
|
1268
|
-
errors.ForbiddenData, http_res
|
|
1269
|
-
)
|
|
1200
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1270
1201
|
raise errors.Forbidden(response_data, http_res)
|
|
1271
1202
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1272
|
-
response_data =
|
|
1203
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1273
1204
|
raise errors.NotFound(response_data, http_res)
|
|
1274
1205
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1275
|
-
response_data =
|
|
1206
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1276
1207
|
raise errors.Conflict(response_data, http_res)
|
|
1277
1208
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1278
|
-
response_data =
|
|
1279
|
-
errors.InviteExpiredData, http_res
|
|
1280
|
-
)
|
|
1209
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1281
1210
|
raise errors.InviteExpired(response_data, http_res)
|
|
1282
1211
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1283
|
-
response_data =
|
|
1212
|
+
response_data = unmarshal_json_response(
|
|
1284
1213
|
errors.UnprocessableEntityData, http_res
|
|
1285
1214
|
)
|
|
1286
1215
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1287
1216
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1288
|
-
response_data =
|
|
1217
|
+
response_data = unmarshal_json_response(
|
|
1289
1218
|
errors.RateLimitExceededData, http_res
|
|
1290
1219
|
)
|
|
1291
1220
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1292
1221
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1293
|
-
response_data =
|
|
1222
|
+
response_data = unmarshal_json_response(
|
|
1294
1223
|
errors.InternalServerErrorData, http_res
|
|
1295
1224
|
)
|
|
1296
1225
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1387,47 +1316,39 @@ class Customers(BaseSDK):
|
|
|
1387
1316
|
|
|
1388
1317
|
response_data: Any = None
|
|
1389
1318
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1390
|
-
return
|
|
1319
|
+
return unmarshal_json_response(
|
|
1391
1320
|
Optional[operations.DeleteCustomerResponseBody], http_res
|
|
1392
1321
|
)
|
|
1393
1322
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1394
|
-
response_data =
|
|
1395
|
-
errors.BadRequestData, http_res
|
|
1396
|
-
)
|
|
1323
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1397
1324
|
raise errors.BadRequest(response_data, http_res)
|
|
1398
1325
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1399
|
-
response_data =
|
|
1400
|
-
errors.UnauthorizedData, http_res
|
|
1401
|
-
)
|
|
1326
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1402
1327
|
raise errors.Unauthorized(response_data, http_res)
|
|
1403
1328
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1404
|
-
response_data =
|
|
1405
|
-
errors.ForbiddenData, http_res
|
|
1406
|
-
)
|
|
1329
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1407
1330
|
raise errors.Forbidden(response_data, http_res)
|
|
1408
1331
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1409
|
-
response_data =
|
|
1332
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1410
1333
|
raise errors.NotFound(response_data, http_res)
|
|
1411
1334
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1412
|
-
response_data =
|
|
1335
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1413
1336
|
raise errors.Conflict(response_data, http_res)
|
|
1414
1337
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1415
|
-
response_data =
|
|
1416
|
-
errors.InviteExpiredData, http_res
|
|
1417
|
-
)
|
|
1338
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1418
1339
|
raise errors.InviteExpired(response_data, http_res)
|
|
1419
1340
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1420
|
-
response_data =
|
|
1341
|
+
response_data = unmarshal_json_response(
|
|
1421
1342
|
errors.UnprocessableEntityData, http_res
|
|
1422
1343
|
)
|
|
1423
1344
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1424
1345
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1425
|
-
response_data =
|
|
1346
|
+
response_data = unmarshal_json_response(
|
|
1426
1347
|
errors.RateLimitExceededData, http_res
|
|
1427
1348
|
)
|
|
1428
1349
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1429
1350
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1430
|
-
response_data =
|
|
1351
|
+
response_data = unmarshal_json_response(
|
|
1431
1352
|
errors.InternalServerErrorData, http_res
|
|
1432
1353
|
)
|
|
1433
1354
|
raise errors.InternalServerError(response_data, http_res)
|