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
|
@@ -21,7 +21,7 @@ class TrackLeadRequestBodyTypedDict(TypedDict):
|
|
|
21
21
|
r"""The unique ID of the click that the lead conversion event is attributed to. You can read this value from `dub_id` cookie."""
|
|
22
22
|
event_name: str
|
|
23
23
|
r"""The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`)."""
|
|
24
|
-
|
|
24
|
+
customer_external_id: str
|
|
25
25
|
r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
|
|
26
26
|
customer_name: NotRequired[Nullable[str]]
|
|
27
27
|
r"""The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”)."""
|
|
@@ -44,7 +44,7 @@ class TrackLeadRequestBody(BaseModel):
|
|
|
44
44
|
event_name: Annotated[str, pydantic.Field(alias="eventName")]
|
|
45
45
|
r"""The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`)."""
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
customer_external_id: Annotated[str, pydantic.Field(alias="customerExternalId")]
|
|
48
48
|
r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
|
|
49
49
|
|
|
50
50
|
customer_name: Annotated[
|
|
@@ -20,7 +20,7 @@ class PaymentProcessor(str, Enum):
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class TrackSaleRequestBodyTypedDict(TypedDict):
|
|
23
|
-
|
|
23
|
+
customer_external_id: str
|
|
24
24
|
r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
|
|
25
25
|
amount: int
|
|
26
26
|
r"""The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"""
|
|
@@ -39,7 +39,7 @@ class TrackSaleRequestBodyTypedDict(TypedDict):
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class TrackSaleRequestBody(BaseModel):
|
|
42
|
-
|
|
42
|
+
customer_external_id: Annotated[str, pydantic.Field(alias="customerExternalId")]
|
|
43
43
|
r"""The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."""
|
|
44
44
|
|
|
45
45
|
amount: int
|
dub/partners.py
CHANGED
|
@@ -5,6 +5,7 @@ from dub import utils
|
|
|
5
5
|
from dub._hooks import HookContext
|
|
6
6
|
from dub.models import components, 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
|
|
|
10
11
|
|
|
@@ -107,47 +108,39 @@ class Partners(BaseSDK):
|
|
|
107
108
|
|
|
108
109
|
response_data: Any = None
|
|
109
110
|
if utils.match_response(http_res, "201", "application/json"):
|
|
110
|
-
return
|
|
111
|
+
return unmarshal_json_response(
|
|
111
112
|
Optional[operations.CreatePartnerResponseBody], http_res
|
|
112
113
|
)
|
|
113
114
|
if utils.match_response(http_res, "400", "application/json"):
|
|
114
|
-
response_data =
|
|
115
|
-
errors.BadRequestData, http_res
|
|
116
|
-
)
|
|
115
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
117
116
|
raise errors.BadRequest(response_data, http_res)
|
|
118
117
|
if utils.match_response(http_res, "401", "application/json"):
|
|
119
|
-
response_data =
|
|
120
|
-
errors.UnauthorizedData, http_res
|
|
121
|
-
)
|
|
118
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
122
119
|
raise errors.Unauthorized(response_data, http_res)
|
|
123
120
|
if utils.match_response(http_res, "403", "application/json"):
|
|
124
|
-
response_data =
|
|
125
|
-
errors.ForbiddenData, http_res
|
|
126
|
-
)
|
|
121
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
127
122
|
raise errors.Forbidden(response_data, http_res)
|
|
128
123
|
if utils.match_response(http_res, "404", "application/json"):
|
|
129
|
-
response_data =
|
|
124
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
130
125
|
raise errors.NotFound(response_data, http_res)
|
|
131
126
|
if utils.match_response(http_res, "409", "application/json"):
|
|
132
|
-
response_data =
|
|
127
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
133
128
|
raise errors.Conflict(response_data, http_res)
|
|
134
129
|
if utils.match_response(http_res, "410", "application/json"):
|
|
135
|
-
response_data =
|
|
136
|
-
errors.InviteExpiredData, http_res
|
|
137
|
-
)
|
|
130
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
138
131
|
raise errors.InviteExpired(response_data, http_res)
|
|
139
132
|
if utils.match_response(http_res, "422", "application/json"):
|
|
140
|
-
response_data =
|
|
133
|
+
response_data = unmarshal_json_response(
|
|
141
134
|
errors.UnprocessableEntityData, http_res
|
|
142
135
|
)
|
|
143
136
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
144
137
|
if utils.match_response(http_res, "429", "application/json"):
|
|
145
|
-
response_data =
|
|
138
|
+
response_data = unmarshal_json_response(
|
|
146
139
|
errors.RateLimitExceededData, http_res
|
|
147
140
|
)
|
|
148
141
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
149
142
|
if utils.match_response(http_res, "500", "application/json"):
|
|
150
|
-
response_data =
|
|
143
|
+
response_data = unmarshal_json_response(
|
|
151
144
|
errors.InternalServerErrorData, http_res
|
|
152
145
|
)
|
|
153
146
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -258,47 +251,39 @@ class Partners(BaseSDK):
|
|
|
258
251
|
|
|
259
252
|
response_data: Any = None
|
|
260
253
|
if utils.match_response(http_res, "201", "application/json"):
|
|
261
|
-
return
|
|
254
|
+
return unmarshal_json_response(
|
|
262
255
|
Optional[operations.CreatePartnerResponseBody], http_res
|
|
263
256
|
)
|
|
264
257
|
if utils.match_response(http_res, "400", "application/json"):
|
|
265
|
-
response_data =
|
|
266
|
-
errors.BadRequestData, http_res
|
|
267
|
-
)
|
|
258
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
268
259
|
raise errors.BadRequest(response_data, http_res)
|
|
269
260
|
if utils.match_response(http_res, "401", "application/json"):
|
|
270
|
-
response_data =
|
|
271
|
-
errors.UnauthorizedData, http_res
|
|
272
|
-
)
|
|
261
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
273
262
|
raise errors.Unauthorized(response_data, http_res)
|
|
274
263
|
if utils.match_response(http_res, "403", "application/json"):
|
|
275
|
-
response_data =
|
|
276
|
-
errors.ForbiddenData, http_res
|
|
277
|
-
)
|
|
264
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
278
265
|
raise errors.Forbidden(response_data, http_res)
|
|
279
266
|
if utils.match_response(http_res, "404", "application/json"):
|
|
280
|
-
response_data =
|
|
267
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
281
268
|
raise errors.NotFound(response_data, http_res)
|
|
282
269
|
if utils.match_response(http_res, "409", "application/json"):
|
|
283
|
-
response_data =
|
|
270
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
284
271
|
raise errors.Conflict(response_data, http_res)
|
|
285
272
|
if utils.match_response(http_res, "410", "application/json"):
|
|
286
|
-
response_data =
|
|
287
|
-
errors.InviteExpiredData, http_res
|
|
288
|
-
)
|
|
273
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
289
274
|
raise errors.InviteExpired(response_data, http_res)
|
|
290
275
|
if utils.match_response(http_res, "422", "application/json"):
|
|
291
|
-
response_data =
|
|
276
|
+
response_data = unmarshal_json_response(
|
|
292
277
|
errors.UnprocessableEntityData, http_res
|
|
293
278
|
)
|
|
294
279
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
295
280
|
if utils.match_response(http_res, "429", "application/json"):
|
|
296
|
-
response_data =
|
|
281
|
+
response_data = unmarshal_json_response(
|
|
297
282
|
errors.RateLimitExceededData, http_res
|
|
298
283
|
)
|
|
299
284
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
300
285
|
if utils.match_response(http_res, "500", "application/json"):
|
|
301
|
-
response_data =
|
|
286
|
+
response_data = unmarshal_json_response(
|
|
302
287
|
errors.InternalServerErrorData, http_res
|
|
303
288
|
)
|
|
304
289
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -409,47 +394,37 @@ class Partners(BaseSDK):
|
|
|
409
394
|
|
|
410
395
|
response_data: Any = None
|
|
411
396
|
if utils.match_response(http_res, "201", "application/json"):
|
|
412
|
-
return
|
|
413
|
-
Optional[components.LinkSchema], http_res
|
|
414
|
-
)
|
|
397
|
+
return unmarshal_json_response(Optional[components.LinkSchema], http_res)
|
|
415
398
|
if utils.match_response(http_res, "400", "application/json"):
|
|
416
|
-
response_data =
|
|
417
|
-
errors.BadRequestData, http_res
|
|
418
|
-
)
|
|
399
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
419
400
|
raise errors.BadRequest(response_data, http_res)
|
|
420
401
|
if utils.match_response(http_res, "401", "application/json"):
|
|
421
|
-
response_data =
|
|
422
|
-
errors.UnauthorizedData, http_res
|
|
423
|
-
)
|
|
402
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
424
403
|
raise errors.Unauthorized(response_data, http_res)
|
|
425
404
|
if utils.match_response(http_res, "403", "application/json"):
|
|
426
|
-
response_data =
|
|
427
|
-
errors.ForbiddenData, http_res
|
|
428
|
-
)
|
|
405
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
429
406
|
raise errors.Forbidden(response_data, http_res)
|
|
430
407
|
if utils.match_response(http_res, "404", "application/json"):
|
|
431
|
-
response_data =
|
|
408
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
432
409
|
raise errors.NotFound(response_data, http_res)
|
|
433
410
|
if utils.match_response(http_res, "409", "application/json"):
|
|
434
|
-
response_data =
|
|
411
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
435
412
|
raise errors.Conflict(response_data, http_res)
|
|
436
413
|
if utils.match_response(http_res, "410", "application/json"):
|
|
437
|
-
response_data =
|
|
438
|
-
errors.InviteExpiredData, http_res
|
|
439
|
-
)
|
|
414
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
440
415
|
raise errors.InviteExpired(response_data, http_res)
|
|
441
416
|
if utils.match_response(http_res, "422", "application/json"):
|
|
442
|
-
response_data =
|
|
417
|
+
response_data = unmarshal_json_response(
|
|
443
418
|
errors.UnprocessableEntityData, http_res
|
|
444
419
|
)
|
|
445
420
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
446
421
|
if utils.match_response(http_res, "429", "application/json"):
|
|
447
|
-
response_data =
|
|
422
|
+
response_data = unmarshal_json_response(
|
|
448
423
|
errors.RateLimitExceededData, http_res
|
|
449
424
|
)
|
|
450
425
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
451
426
|
if utils.match_response(http_res, "500", "application/json"):
|
|
452
|
-
response_data =
|
|
427
|
+
response_data = unmarshal_json_response(
|
|
453
428
|
errors.InternalServerErrorData, http_res
|
|
454
429
|
)
|
|
455
430
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -560,47 +535,37 @@ class Partners(BaseSDK):
|
|
|
560
535
|
|
|
561
536
|
response_data: Any = None
|
|
562
537
|
if utils.match_response(http_res, "201", "application/json"):
|
|
563
|
-
return
|
|
564
|
-
Optional[components.LinkSchema], http_res
|
|
565
|
-
)
|
|
538
|
+
return unmarshal_json_response(Optional[components.LinkSchema], http_res)
|
|
566
539
|
if utils.match_response(http_res, "400", "application/json"):
|
|
567
|
-
response_data =
|
|
568
|
-
errors.BadRequestData, http_res
|
|
569
|
-
)
|
|
540
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
570
541
|
raise errors.BadRequest(response_data, http_res)
|
|
571
542
|
if utils.match_response(http_res, "401", "application/json"):
|
|
572
|
-
response_data =
|
|
573
|
-
errors.UnauthorizedData, http_res
|
|
574
|
-
)
|
|
543
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
575
544
|
raise errors.Unauthorized(response_data, http_res)
|
|
576
545
|
if utils.match_response(http_res, "403", "application/json"):
|
|
577
|
-
response_data =
|
|
578
|
-
errors.ForbiddenData, http_res
|
|
579
|
-
)
|
|
546
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
580
547
|
raise errors.Forbidden(response_data, http_res)
|
|
581
548
|
if utils.match_response(http_res, "404", "application/json"):
|
|
582
|
-
response_data =
|
|
549
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
583
550
|
raise errors.NotFound(response_data, http_res)
|
|
584
551
|
if utils.match_response(http_res, "409", "application/json"):
|
|
585
|
-
response_data =
|
|
552
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
586
553
|
raise errors.Conflict(response_data, http_res)
|
|
587
554
|
if utils.match_response(http_res, "410", "application/json"):
|
|
588
|
-
response_data =
|
|
589
|
-
errors.InviteExpiredData, http_res
|
|
590
|
-
)
|
|
555
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
591
556
|
raise errors.InviteExpired(response_data, http_res)
|
|
592
557
|
if utils.match_response(http_res, "422", "application/json"):
|
|
593
|
-
response_data =
|
|
558
|
+
response_data = unmarshal_json_response(
|
|
594
559
|
errors.UnprocessableEntityData, http_res
|
|
595
560
|
)
|
|
596
561
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
597
562
|
if utils.match_response(http_res, "429", "application/json"):
|
|
598
|
-
response_data =
|
|
563
|
+
response_data = unmarshal_json_response(
|
|
599
564
|
errors.RateLimitExceededData, http_res
|
|
600
565
|
)
|
|
601
566
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
602
567
|
if utils.match_response(http_res, "500", "application/json"):
|
|
603
|
-
response_data =
|
|
568
|
+
response_data = unmarshal_json_response(
|
|
604
569
|
errors.InternalServerErrorData, http_res
|
|
605
570
|
)
|
|
606
571
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -699,47 +664,37 @@ class Partners(BaseSDK):
|
|
|
699
664
|
|
|
700
665
|
response_data: Any = None
|
|
701
666
|
if utils.match_response(http_res, "200", "application/json"):
|
|
702
|
-
return
|
|
703
|
-
Optional[List[operations.Link]], http_res
|
|
704
|
-
)
|
|
667
|
+
return unmarshal_json_response(Optional[List[operations.Link]], http_res)
|
|
705
668
|
if utils.match_response(http_res, "400", "application/json"):
|
|
706
|
-
response_data =
|
|
707
|
-
errors.BadRequestData, http_res
|
|
708
|
-
)
|
|
669
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
709
670
|
raise errors.BadRequest(response_data, http_res)
|
|
710
671
|
if utils.match_response(http_res, "401", "application/json"):
|
|
711
|
-
response_data =
|
|
712
|
-
errors.UnauthorizedData, http_res
|
|
713
|
-
)
|
|
672
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
714
673
|
raise errors.Unauthorized(response_data, http_res)
|
|
715
674
|
if utils.match_response(http_res, "403", "application/json"):
|
|
716
|
-
response_data =
|
|
717
|
-
errors.ForbiddenData, http_res
|
|
718
|
-
)
|
|
675
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
719
676
|
raise errors.Forbidden(response_data, http_res)
|
|
720
677
|
if utils.match_response(http_res, "404", "application/json"):
|
|
721
|
-
response_data =
|
|
678
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
722
679
|
raise errors.NotFound(response_data, http_res)
|
|
723
680
|
if utils.match_response(http_res, "409", "application/json"):
|
|
724
|
-
response_data =
|
|
681
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
725
682
|
raise errors.Conflict(response_data, http_res)
|
|
726
683
|
if utils.match_response(http_res, "410", "application/json"):
|
|
727
|
-
response_data =
|
|
728
|
-
errors.InviteExpiredData, http_res
|
|
729
|
-
)
|
|
684
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
730
685
|
raise errors.InviteExpired(response_data, http_res)
|
|
731
686
|
if utils.match_response(http_res, "422", "application/json"):
|
|
732
|
-
response_data =
|
|
687
|
+
response_data = unmarshal_json_response(
|
|
733
688
|
errors.UnprocessableEntityData, http_res
|
|
734
689
|
)
|
|
735
690
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
736
691
|
if utils.match_response(http_res, "429", "application/json"):
|
|
737
|
-
response_data =
|
|
692
|
+
response_data = unmarshal_json_response(
|
|
738
693
|
errors.RateLimitExceededData, http_res
|
|
739
694
|
)
|
|
740
695
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
741
696
|
if utils.match_response(http_res, "500", "application/json"):
|
|
742
|
-
response_data =
|
|
697
|
+
response_data = unmarshal_json_response(
|
|
743
698
|
errors.InternalServerErrorData, http_res
|
|
744
699
|
)
|
|
745
700
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -838,47 +793,37 @@ class Partners(BaseSDK):
|
|
|
838
793
|
|
|
839
794
|
response_data: Any = None
|
|
840
795
|
if utils.match_response(http_res, "200", "application/json"):
|
|
841
|
-
return
|
|
842
|
-
Optional[List[operations.Link]], http_res
|
|
843
|
-
)
|
|
796
|
+
return unmarshal_json_response(Optional[List[operations.Link]], http_res)
|
|
844
797
|
if utils.match_response(http_res, "400", "application/json"):
|
|
845
|
-
response_data =
|
|
846
|
-
errors.BadRequestData, http_res
|
|
847
|
-
)
|
|
798
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
848
799
|
raise errors.BadRequest(response_data, http_res)
|
|
849
800
|
if utils.match_response(http_res, "401", "application/json"):
|
|
850
|
-
response_data =
|
|
851
|
-
errors.UnauthorizedData, http_res
|
|
852
|
-
)
|
|
801
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
853
802
|
raise errors.Unauthorized(response_data, http_res)
|
|
854
803
|
if utils.match_response(http_res, "403", "application/json"):
|
|
855
|
-
response_data =
|
|
856
|
-
errors.ForbiddenData, http_res
|
|
857
|
-
)
|
|
804
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
858
805
|
raise errors.Forbidden(response_data, http_res)
|
|
859
806
|
if utils.match_response(http_res, "404", "application/json"):
|
|
860
|
-
response_data =
|
|
807
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
861
808
|
raise errors.NotFound(response_data, http_res)
|
|
862
809
|
if utils.match_response(http_res, "409", "application/json"):
|
|
863
|
-
response_data =
|
|
810
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
864
811
|
raise errors.Conflict(response_data, http_res)
|
|
865
812
|
if utils.match_response(http_res, "410", "application/json"):
|
|
866
|
-
response_data =
|
|
867
|
-
errors.InviteExpiredData, http_res
|
|
868
|
-
)
|
|
813
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
869
814
|
raise errors.InviteExpired(response_data, http_res)
|
|
870
815
|
if utils.match_response(http_res, "422", "application/json"):
|
|
871
|
-
response_data =
|
|
816
|
+
response_data = unmarshal_json_response(
|
|
872
817
|
errors.UnprocessableEntityData, http_res
|
|
873
818
|
)
|
|
874
819
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
875
820
|
if utils.match_response(http_res, "429", "application/json"):
|
|
876
|
-
response_data =
|
|
821
|
+
response_data = unmarshal_json_response(
|
|
877
822
|
errors.RateLimitExceededData, http_res
|
|
878
823
|
)
|
|
879
824
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
880
825
|
if utils.match_response(http_res, "500", "application/json"):
|
|
881
|
-
response_data =
|
|
826
|
+
response_data = unmarshal_json_response(
|
|
882
827
|
errors.InternalServerErrorData, http_res
|
|
883
828
|
)
|
|
884
829
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -989,47 +934,37 @@ class Partners(BaseSDK):
|
|
|
989
934
|
|
|
990
935
|
response_data: Any = None
|
|
991
936
|
if utils.match_response(http_res, "200", "application/json"):
|
|
992
|
-
return
|
|
993
|
-
Optional[components.LinkSchema], http_res
|
|
994
|
-
)
|
|
937
|
+
return unmarshal_json_response(Optional[components.LinkSchema], http_res)
|
|
995
938
|
if utils.match_response(http_res, "400", "application/json"):
|
|
996
|
-
response_data =
|
|
997
|
-
errors.BadRequestData, http_res
|
|
998
|
-
)
|
|
939
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
999
940
|
raise errors.BadRequest(response_data, http_res)
|
|
1000
941
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1001
|
-
response_data =
|
|
1002
|
-
errors.UnauthorizedData, http_res
|
|
1003
|
-
)
|
|
942
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1004
943
|
raise errors.Unauthorized(response_data, http_res)
|
|
1005
944
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1006
|
-
response_data =
|
|
1007
|
-
errors.ForbiddenData, http_res
|
|
1008
|
-
)
|
|
945
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1009
946
|
raise errors.Forbidden(response_data, http_res)
|
|
1010
947
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1011
|
-
response_data =
|
|
948
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1012
949
|
raise errors.NotFound(response_data, http_res)
|
|
1013
950
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1014
|
-
response_data =
|
|
951
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1015
952
|
raise errors.Conflict(response_data, http_res)
|
|
1016
953
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1017
|
-
response_data =
|
|
1018
|
-
errors.InviteExpiredData, http_res
|
|
1019
|
-
)
|
|
954
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1020
955
|
raise errors.InviteExpired(response_data, http_res)
|
|
1021
956
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1022
|
-
response_data =
|
|
957
|
+
response_data = unmarshal_json_response(
|
|
1023
958
|
errors.UnprocessableEntityData, http_res
|
|
1024
959
|
)
|
|
1025
960
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1026
961
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1027
|
-
response_data =
|
|
962
|
+
response_data = unmarshal_json_response(
|
|
1028
963
|
errors.RateLimitExceededData, http_res
|
|
1029
964
|
)
|
|
1030
965
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1031
966
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1032
|
-
response_data =
|
|
967
|
+
response_data = unmarshal_json_response(
|
|
1033
968
|
errors.InternalServerErrorData, http_res
|
|
1034
969
|
)
|
|
1035
970
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1140,47 +1075,37 @@ class Partners(BaseSDK):
|
|
|
1140
1075
|
|
|
1141
1076
|
response_data: Any = None
|
|
1142
1077
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1143
|
-
return
|
|
1144
|
-
Optional[components.LinkSchema], http_res
|
|
1145
|
-
)
|
|
1078
|
+
return unmarshal_json_response(Optional[components.LinkSchema], http_res)
|
|
1146
1079
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1147
|
-
response_data =
|
|
1148
|
-
errors.BadRequestData, http_res
|
|
1149
|
-
)
|
|
1080
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1150
1081
|
raise errors.BadRequest(response_data, http_res)
|
|
1151
1082
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1152
|
-
response_data =
|
|
1153
|
-
errors.UnauthorizedData, http_res
|
|
1154
|
-
)
|
|
1083
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1155
1084
|
raise errors.Unauthorized(response_data, http_res)
|
|
1156
1085
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1157
|
-
response_data =
|
|
1158
|
-
errors.ForbiddenData, http_res
|
|
1159
|
-
)
|
|
1086
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1160
1087
|
raise errors.Forbidden(response_data, http_res)
|
|
1161
1088
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1162
|
-
response_data =
|
|
1089
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1163
1090
|
raise errors.NotFound(response_data, http_res)
|
|
1164
1091
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1165
|
-
response_data =
|
|
1092
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1166
1093
|
raise errors.Conflict(response_data, http_res)
|
|
1167
1094
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1168
|
-
response_data =
|
|
1169
|
-
errors.InviteExpiredData, http_res
|
|
1170
|
-
)
|
|
1095
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1171
1096
|
raise errors.InviteExpired(response_data, http_res)
|
|
1172
1097
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1173
|
-
response_data =
|
|
1098
|
+
response_data = unmarshal_json_response(
|
|
1174
1099
|
errors.UnprocessableEntityData, http_res
|
|
1175
1100
|
)
|
|
1176
1101
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1177
1102
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1178
|
-
response_data =
|
|
1103
|
+
response_data = unmarshal_json_response(
|
|
1179
1104
|
errors.RateLimitExceededData, http_res
|
|
1180
1105
|
)
|
|
1181
1106
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1182
1107
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1183
|
-
response_data =
|
|
1108
|
+
response_data = unmarshal_json_response(
|
|
1184
1109
|
errors.InternalServerErrorData, http_res
|
|
1185
1110
|
)
|
|
1186
1111
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1282,47 +1207,39 @@ class Partners(BaseSDK):
|
|
|
1282
1207
|
|
|
1283
1208
|
response_data: Any = None
|
|
1284
1209
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1285
|
-
return
|
|
1210
|
+
return unmarshal_json_response(
|
|
1286
1211
|
Optional[operations.RetrievePartnerAnalyticsResponseBody], http_res
|
|
1287
1212
|
)
|
|
1288
1213
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1289
|
-
response_data =
|
|
1290
|
-
errors.BadRequestData, http_res
|
|
1291
|
-
)
|
|
1214
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1292
1215
|
raise errors.BadRequest(response_data, http_res)
|
|
1293
1216
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1294
|
-
response_data =
|
|
1295
|
-
errors.UnauthorizedData, http_res
|
|
1296
|
-
)
|
|
1217
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1297
1218
|
raise errors.Unauthorized(response_data, http_res)
|
|
1298
1219
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1299
|
-
response_data =
|
|
1300
|
-
errors.ForbiddenData, http_res
|
|
1301
|
-
)
|
|
1220
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1302
1221
|
raise errors.Forbidden(response_data, http_res)
|
|
1303
1222
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1304
|
-
response_data =
|
|
1223
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1305
1224
|
raise errors.NotFound(response_data, http_res)
|
|
1306
1225
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1307
|
-
response_data =
|
|
1226
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1308
1227
|
raise errors.Conflict(response_data, http_res)
|
|
1309
1228
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1310
|
-
response_data =
|
|
1311
|
-
errors.InviteExpiredData, http_res
|
|
1312
|
-
)
|
|
1229
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1313
1230
|
raise errors.InviteExpired(response_data, http_res)
|
|
1314
1231
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1315
|
-
response_data =
|
|
1232
|
+
response_data = unmarshal_json_response(
|
|
1316
1233
|
errors.UnprocessableEntityData, http_res
|
|
1317
1234
|
)
|
|
1318
1235
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1319
1236
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1320
|
-
response_data =
|
|
1237
|
+
response_data = unmarshal_json_response(
|
|
1321
1238
|
errors.RateLimitExceededData, http_res
|
|
1322
1239
|
)
|
|
1323
1240
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1324
1241
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1325
|
-
response_data =
|
|
1242
|
+
response_data = unmarshal_json_response(
|
|
1326
1243
|
errors.InternalServerErrorData, http_res
|
|
1327
1244
|
)
|
|
1328
1245
|
raise errors.InternalServerError(response_data, http_res)
|
|
@@ -1424,47 +1341,39 @@ class Partners(BaseSDK):
|
|
|
1424
1341
|
|
|
1425
1342
|
response_data: Any = None
|
|
1426
1343
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1427
|
-
return
|
|
1344
|
+
return unmarshal_json_response(
|
|
1428
1345
|
Optional[operations.RetrievePartnerAnalyticsResponseBody], http_res
|
|
1429
1346
|
)
|
|
1430
1347
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1431
|
-
response_data =
|
|
1432
|
-
errors.BadRequestData, http_res
|
|
1433
|
-
)
|
|
1348
|
+
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
1434
1349
|
raise errors.BadRequest(response_data, http_res)
|
|
1435
1350
|
if utils.match_response(http_res, "401", "application/json"):
|
|
1436
|
-
response_data =
|
|
1437
|
-
errors.UnauthorizedData, http_res
|
|
1438
|
-
)
|
|
1351
|
+
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
1439
1352
|
raise errors.Unauthorized(response_data, http_res)
|
|
1440
1353
|
if utils.match_response(http_res, "403", "application/json"):
|
|
1441
|
-
response_data =
|
|
1442
|
-
errors.ForbiddenData, http_res
|
|
1443
|
-
)
|
|
1354
|
+
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
1444
1355
|
raise errors.Forbidden(response_data, http_res)
|
|
1445
1356
|
if utils.match_response(http_res, "404", "application/json"):
|
|
1446
|
-
response_data =
|
|
1357
|
+
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
1447
1358
|
raise errors.NotFound(response_data, http_res)
|
|
1448
1359
|
if utils.match_response(http_res, "409", "application/json"):
|
|
1449
|
-
response_data =
|
|
1360
|
+
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
1450
1361
|
raise errors.Conflict(response_data, http_res)
|
|
1451
1362
|
if utils.match_response(http_res, "410", "application/json"):
|
|
1452
|
-
response_data =
|
|
1453
|
-
errors.InviteExpiredData, http_res
|
|
1454
|
-
)
|
|
1363
|
+
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
1455
1364
|
raise errors.InviteExpired(response_data, http_res)
|
|
1456
1365
|
if utils.match_response(http_res, "422", "application/json"):
|
|
1457
|
-
response_data =
|
|
1366
|
+
response_data = unmarshal_json_response(
|
|
1458
1367
|
errors.UnprocessableEntityData, http_res
|
|
1459
1368
|
)
|
|
1460
1369
|
raise errors.UnprocessableEntity(response_data, http_res)
|
|
1461
1370
|
if utils.match_response(http_res, "429", "application/json"):
|
|
1462
|
-
response_data =
|
|
1371
|
+
response_data = unmarshal_json_response(
|
|
1463
1372
|
errors.RateLimitExceededData, http_res
|
|
1464
1373
|
)
|
|
1465
1374
|
raise errors.RateLimitExceeded(response_data, http_res)
|
|
1466
1375
|
if utils.match_response(http_res, "500", "application/json"):
|
|
1467
|
-
response_data =
|
|
1376
|
+
response_data = unmarshal_json_response(
|
|
1468
1377
|
errors.InternalServerErrorData, http_res
|
|
1469
1378
|
)
|
|
1470
1379
|
raise errors.InternalServerError(response_data, http_res)
|