moovio_sdk 0.12.0__py3-none-any.whl → 0.13.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.
- moovio_sdk/_version.py +3 -3
- moovio_sdk/account_terminal_applications.py +70 -186
- moovio_sdk/accounts.py +168 -408
- moovio_sdk/adjustments.py +28 -84
- moovio_sdk/apple_pay.py +102 -236
- moovio_sdk/authentication.py +50 -102
- moovio_sdk/avatars.py +10 -38
- moovio_sdk/bank_accounts.py +174 -420
- moovio_sdk/basesdk.py +4 -4
- moovio_sdk/branding.py +106 -198
- moovio_sdk/capabilities.py +76 -180
- moovio_sdk/card_issuing.py +94 -228
- moovio_sdk/cards.py +94 -232
- moovio_sdk/disputes.py +204 -500
- moovio_sdk/end_to_end_encryption.py +28 -80
- moovio_sdk/enriched_address.py +14 -44
- moovio_sdk/enriched_profile.py +14 -44
- moovio_sdk/fee_plans.py +116 -314
- moovio_sdk/files.py +52 -138
- moovio_sdk/industries.py +14 -44
- moovio_sdk/institutions.py +36 -92
- moovio_sdk/issuing_transactions.py +70 -220
- moovio_sdk/models/components/__init__.py +39 -0
- moovio_sdk/models/components/createticket.py +24 -0
- moovio_sdk/models/components/createticketcontacterror.py +17 -0
- moovio_sdk/models/components/ticket.py +44 -0
- moovio_sdk/models/components/ticketcontact.py +17 -0
- moovio_sdk/models/components/ticketmessage.py +21 -0
- moovio_sdk/models/components/ticketstatus.py +11 -0
- moovio_sdk/models/components/updateticket.py +19 -0
- moovio_sdk/models/components/updateticketstatus.py +8 -0
- moovio_sdk/models/errors/__init__.py +19 -0
- moovio_sdk/models/errors/accountterminalapplicationerror.py +11 -6
- moovio_sdk/models/errors/addcapabilitieserror.py +11 -6
- moovio_sdk/models/errors/apierror.py +30 -14
- moovio_sdk/models/errors/assigncountrieserror.py +12 -6
- moovio_sdk/models/errors/authtokenrequesterror.py +11 -6
- moovio_sdk/models/errors/bankaccountvalidationerror.py +11 -6
- moovio_sdk/models/errors/brandvalidationerror.py +11 -6
- moovio_sdk/models/errors/cardacquiringrefund.py +11 -6
- moovio_sdk/models/errors/createaccount.py +12 -6
- moovio_sdk/models/errors/createpaymentlinkerror.py +11 -6
- moovio_sdk/models/errors/createsweepconfigerror.py +11 -6
- moovio_sdk/models/errors/createticketerror.py +34 -0
- moovio_sdk/models/errors/feeplanagreementerror.py +11 -6
- moovio_sdk/models/errors/fileuploadvalidationerror.py +11 -6
- moovio_sdk/models/errors/filevalidationerror.py +11 -6
- moovio_sdk/models/errors/genericerror.py +12 -6
- moovio_sdk/models/errors/linkapplepayerror.py +11 -6
- moovio_sdk/models/errors/linkcarderror.py +11 -6
- moovio_sdk/models/errors/microdepositvalidationerror.py +11 -6
- moovio_sdk/models/errors/mooverror.py +26 -0
- moovio_sdk/models/errors/no_response_error.py +13 -0
- moovio_sdk/models/errors/onboardinginviteerror.py +11 -6
- moovio_sdk/models/errors/patchsweepconfigerror.py +11 -6
- moovio_sdk/models/errors/refundvalidationerror.py +11 -6
- moovio_sdk/models/errors/representativevalidationerror.py +11 -6
- moovio_sdk/models/errors/requestcarderror.py +11 -6
- moovio_sdk/models/errors/responsevalidationerror.py +25 -0
- moovio_sdk/models/errors/reversalvalidationerror.py +11 -6
- moovio_sdk/models/errors/revoketokenrequesterror.py +11 -6
- moovio_sdk/models/errors/schedulevalidationerror.py +11 -6
- moovio_sdk/models/errors/terminalapplicationerror.py +11 -6
- moovio_sdk/models/errors/transfer.py +11 -6
- moovio_sdk/models/errors/transferoptionsvalidationerror.py +11 -6
- moovio_sdk/models/errors/transfervalidationerror.py +11 -6
- moovio_sdk/models/errors/updateaccount.py +12 -6
- moovio_sdk/models/errors/updatecarderror.py +11 -6
- moovio_sdk/models/errors/updateissuedcarderror.py +11 -6
- moovio_sdk/models/errors/updatepaymentlinkerror.py +11 -6
- moovio_sdk/models/errors/updateticketerror.py +25 -0
- moovio_sdk/models/errors/updateunderwritingerror.py +11 -6
- moovio_sdk/models/errors/upsertunderwritingerror.py +11 -6
- moovio_sdk/models/operations/__init__.py +100 -0
- moovio_sdk/models/operations/createticket.py +78 -0
- moovio_sdk/models/operations/getticket.py +71 -0
- moovio_sdk/models/operations/listticketmessages.py +88 -0
- moovio_sdk/models/operations/listtickets.py +81 -0
- moovio_sdk/models/operations/updateticket.py +85 -0
- moovio_sdk/onboarding.py +66 -166
- moovio_sdk/payment_links.py +106 -272
- moovio_sdk/payment_methods.py +30 -86
- moovio_sdk/ping.py +10 -40
- moovio_sdk/receipts.py +36 -92
- moovio_sdk/representatives.py +102 -228
- moovio_sdk/scheduling.py +122 -278
- moovio_sdk/sdk.py +3 -0
- moovio_sdk/support.py +1153 -0
- moovio_sdk/sweeps.py +102 -274
- moovio_sdk/terminal_applications.py +74 -186
- moovio_sdk/transfers.py +266 -582
- moovio_sdk/underwriting.py +64 -146
- moovio_sdk/utils/__init__.py +3 -0
- moovio_sdk/utils/serializers.py +21 -3
- moovio_sdk/wallet_transactions.py +28 -88
- moovio_sdk/wallets.py +24 -84
- {moovio_sdk-0.12.0.dist-info → moovio_sdk-0.13.1.dist-info}/METADATA +103 -28
- {moovio_sdk-0.12.0.dist-info → moovio_sdk-0.13.1.dist-info}/RECORD +99 -80
- {moovio_sdk-0.12.0.dist-info → moovio_sdk-0.13.1.dist-info}/WHEEL +0 -0
moovio_sdk/fee_plans.py
CHANGED
@@ -100,40 +100,25 @@ class FeePlans(BaseSDK):
|
|
100
100
|
|
101
101
|
if utils.match_response(http_res, "200", "application/json"):
|
102
102
|
return operations.ListFeePlanAgreementsResponse(
|
103
|
-
result=utils.
|
104
|
-
|
103
|
+
result=utils.unmarshal_json_response(
|
104
|
+
List[components.FeePlanAgreement], http_res
|
105
105
|
),
|
106
106
|
headers=utils.get_response_headers(http_res.headers),
|
107
107
|
)
|
108
108
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
109
109
|
http_res_text = utils.stream_to_text(http_res)
|
110
|
-
raise errors.APIError(
|
111
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
112
|
-
)
|
110
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
113
111
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
114
112
|
http_res_text = utils.stream_to_text(http_res)
|
115
|
-
raise errors.APIError(
|
116
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
117
|
-
)
|
113
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
118
114
|
if utils.match_response(http_res, "4XX", "*"):
|
119
115
|
http_res_text = utils.stream_to_text(http_res)
|
120
|
-
raise errors.APIError(
|
121
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
122
|
-
)
|
116
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
123
117
|
if utils.match_response(http_res, "5XX", "*"):
|
124
118
|
http_res_text = utils.stream_to_text(http_res)
|
125
|
-
raise errors.APIError(
|
126
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
127
|
-
)
|
119
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
128
120
|
|
129
|
-
|
130
|
-
http_res_text = utils.stream_to_text(http_res)
|
131
|
-
raise errors.APIError(
|
132
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
133
|
-
http_res.status_code,
|
134
|
-
http_res_text,
|
135
|
-
http_res,
|
136
|
-
)
|
121
|
+
raise errors.APIError("Unexpected response received", http_res)
|
137
122
|
|
138
123
|
async def list_fee_plan_agreements_async(
|
139
124
|
self,
|
@@ -225,40 +210,25 @@ class FeePlans(BaseSDK):
|
|
225
210
|
|
226
211
|
if utils.match_response(http_res, "200", "application/json"):
|
227
212
|
return operations.ListFeePlanAgreementsResponse(
|
228
|
-
result=utils.
|
229
|
-
|
213
|
+
result=utils.unmarshal_json_response(
|
214
|
+
List[components.FeePlanAgreement], http_res
|
230
215
|
),
|
231
216
|
headers=utils.get_response_headers(http_res.headers),
|
232
217
|
)
|
233
218
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
234
219
|
http_res_text = await utils.stream_to_text_async(http_res)
|
235
|
-
raise errors.APIError(
|
236
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
237
|
-
)
|
220
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
238
221
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
239
222
|
http_res_text = await utils.stream_to_text_async(http_res)
|
240
|
-
raise errors.APIError(
|
241
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
242
|
-
)
|
223
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
243
224
|
if utils.match_response(http_res, "4XX", "*"):
|
244
225
|
http_res_text = await utils.stream_to_text_async(http_res)
|
245
|
-
raise errors.APIError(
|
246
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
247
|
-
)
|
226
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
248
227
|
if utils.match_response(http_res, "5XX", "*"):
|
249
228
|
http_res_text = await utils.stream_to_text_async(http_res)
|
250
|
-
raise errors.APIError(
|
251
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
252
|
-
)
|
229
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
253
230
|
|
254
|
-
|
255
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
256
|
-
raise errors.APIError(
|
257
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
258
|
-
http_res.status_code,
|
259
|
-
http_res_text,
|
260
|
-
http_res,
|
261
|
-
)
|
231
|
+
raise errors.APIError("Unexpected response received", http_res)
|
262
232
|
|
263
233
|
def create_fee_plan_agreements(
|
264
234
|
self,
|
@@ -363,46 +333,35 @@ class FeePlans(BaseSDK):
|
|
363
333
|
response_data: Any = None
|
364
334
|
if utils.match_response(http_res, "201", "application/json"):
|
365
335
|
return operations.CreateFeePlanAgreementsResponse(
|
366
|
-
result=utils.
|
336
|
+
result=utils.unmarshal_json_response(
|
337
|
+
components.FeePlanAgreement, http_res
|
338
|
+
),
|
367
339
|
headers=utils.get_response_headers(http_res.headers),
|
368
340
|
)
|
369
341
|
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
370
|
-
response_data = utils.
|
371
|
-
|
342
|
+
response_data = utils.unmarshal_json_response(
|
343
|
+
errors.GenericErrorData, http_res
|
344
|
+
)
|
345
|
+
raise errors.GenericError(response_data, http_res)
|
372
346
|
if utils.match_response(http_res, "422", "application/json"):
|
373
|
-
response_data = utils.
|
374
|
-
|
347
|
+
response_data = utils.unmarshal_json_response(
|
348
|
+
errors.FeePlanAgreementErrorData, http_res
|
375
349
|
)
|
376
|
-
raise errors.FeePlanAgreementError(
|
350
|
+
raise errors.FeePlanAgreementError(response_data, http_res)
|
377
351
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
378
352
|
http_res_text = utils.stream_to_text(http_res)
|
379
|
-
raise errors.APIError(
|
380
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
381
|
-
)
|
353
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
382
354
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
383
355
|
http_res_text = utils.stream_to_text(http_res)
|
384
|
-
raise errors.APIError(
|
385
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
386
|
-
)
|
356
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
387
357
|
if utils.match_response(http_res, "4XX", "*"):
|
388
358
|
http_res_text = utils.stream_to_text(http_res)
|
389
|
-
raise errors.APIError(
|
390
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
391
|
-
)
|
359
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
392
360
|
if utils.match_response(http_res, "5XX", "*"):
|
393
361
|
http_res_text = utils.stream_to_text(http_res)
|
394
|
-
raise errors.APIError(
|
395
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
396
|
-
)
|
362
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
397
363
|
|
398
|
-
|
399
|
-
http_res_text = utils.stream_to_text(http_res)
|
400
|
-
raise errors.APIError(
|
401
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
402
|
-
http_res.status_code,
|
403
|
-
http_res_text,
|
404
|
-
http_res,
|
405
|
-
)
|
364
|
+
raise errors.APIError("Unexpected response received", http_res)
|
406
365
|
|
407
366
|
async def create_fee_plan_agreements_async(
|
408
367
|
self,
|
@@ -507,46 +466,35 @@ class FeePlans(BaseSDK):
|
|
507
466
|
response_data: Any = None
|
508
467
|
if utils.match_response(http_res, "201", "application/json"):
|
509
468
|
return operations.CreateFeePlanAgreementsResponse(
|
510
|
-
result=utils.
|
469
|
+
result=utils.unmarshal_json_response(
|
470
|
+
components.FeePlanAgreement, http_res
|
471
|
+
),
|
511
472
|
headers=utils.get_response_headers(http_res.headers),
|
512
473
|
)
|
513
474
|
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
514
|
-
response_data = utils.
|
515
|
-
|
475
|
+
response_data = utils.unmarshal_json_response(
|
476
|
+
errors.GenericErrorData, http_res
|
477
|
+
)
|
478
|
+
raise errors.GenericError(response_data, http_res)
|
516
479
|
if utils.match_response(http_res, "422", "application/json"):
|
517
|
-
response_data = utils.
|
518
|
-
|
480
|
+
response_data = utils.unmarshal_json_response(
|
481
|
+
errors.FeePlanAgreementErrorData, http_res
|
519
482
|
)
|
520
|
-
raise errors.FeePlanAgreementError(
|
483
|
+
raise errors.FeePlanAgreementError(response_data, http_res)
|
521
484
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
522
485
|
http_res_text = await utils.stream_to_text_async(http_res)
|
523
|
-
raise errors.APIError(
|
524
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
525
|
-
)
|
486
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
526
487
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
527
488
|
http_res_text = await utils.stream_to_text_async(http_res)
|
528
|
-
raise errors.APIError(
|
529
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
530
|
-
)
|
489
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
531
490
|
if utils.match_response(http_res, "4XX", "*"):
|
532
491
|
http_res_text = await utils.stream_to_text_async(http_res)
|
533
|
-
raise errors.APIError(
|
534
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
535
|
-
)
|
492
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
536
493
|
if utils.match_response(http_res, "5XX", "*"):
|
537
494
|
http_res_text = await utils.stream_to_text_async(http_res)
|
538
|
-
raise errors.APIError(
|
539
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
540
|
-
)
|
495
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
541
496
|
|
542
|
-
|
543
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
544
|
-
raise errors.APIError(
|
545
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
546
|
-
http_res.status_code,
|
547
|
-
http_res_text,
|
548
|
-
http_res,
|
549
|
-
)
|
497
|
+
raise errors.APIError("Unexpected response received", http_res)
|
550
498
|
|
551
499
|
def list_fee_plans(
|
552
500
|
self,
|
@@ -630,38 +578,25 @@ class FeePlans(BaseSDK):
|
|
630
578
|
|
631
579
|
if utils.match_response(http_res, "200", "application/json"):
|
632
580
|
return operations.ListFeePlansResponse(
|
633
|
-
result=utils.
|
581
|
+
result=utils.unmarshal_json_response(
|
582
|
+
List[components.FeePlan], http_res
|
583
|
+
),
|
634
584
|
headers=utils.get_response_headers(http_res.headers),
|
635
585
|
)
|
636
586
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
637
587
|
http_res_text = utils.stream_to_text(http_res)
|
638
|
-
raise errors.APIError(
|
639
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
640
|
-
)
|
588
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
641
589
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
642
590
|
http_res_text = utils.stream_to_text(http_res)
|
643
|
-
raise errors.APIError(
|
644
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
645
|
-
)
|
591
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
646
592
|
if utils.match_response(http_res, "4XX", "*"):
|
647
593
|
http_res_text = utils.stream_to_text(http_res)
|
648
|
-
raise errors.APIError(
|
649
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
650
|
-
)
|
594
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
651
595
|
if utils.match_response(http_res, "5XX", "*"):
|
652
596
|
http_res_text = utils.stream_to_text(http_res)
|
653
|
-
raise errors.APIError(
|
654
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
655
|
-
)
|
597
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
656
598
|
|
657
|
-
|
658
|
-
http_res_text = utils.stream_to_text(http_res)
|
659
|
-
raise errors.APIError(
|
660
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
661
|
-
http_res.status_code,
|
662
|
-
http_res_text,
|
663
|
-
http_res,
|
664
|
-
)
|
599
|
+
raise errors.APIError("Unexpected response received", http_res)
|
665
600
|
|
666
601
|
async def list_fee_plans_async(
|
667
602
|
self,
|
@@ -745,38 +680,25 @@ class FeePlans(BaseSDK):
|
|
745
680
|
|
746
681
|
if utils.match_response(http_res, "200", "application/json"):
|
747
682
|
return operations.ListFeePlansResponse(
|
748
|
-
result=utils.
|
683
|
+
result=utils.unmarshal_json_response(
|
684
|
+
List[components.FeePlan], http_res
|
685
|
+
),
|
749
686
|
headers=utils.get_response_headers(http_res.headers),
|
750
687
|
)
|
751
688
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
752
689
|
http_res_text = await utils.stream_to_text_async(http_res)
|
753
|
-
raise errors.APIError(
|
754
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
755
|
-
)
|
690
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
756
691
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
757
692
|
http_res_text = await utils.stream_to_text_async(http_res)
|
758
|
-
raise errors.APIError(
|
759
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
760
|
-
)
|
693
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
761
694
|
if utils.match_response(http_res, "4XX", "*"):
|
762
695
|
http_res_text = await utils.stream_to_text_async(http_res)
|
763
|
-
raise errors.APIError(
|
764
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
765
|
-
)
|
696
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
766
697
|
if utils.match_response(http_res, "5XX", "*"):
|
767
698
|
http_res_text = await utils.stream_to_text_async(http_res)
|
768
|
-
raise errors.APIError(
|
769
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
770
|
-
)
|
699
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
771
700
|
|
772
|
-
|
773
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
774
|
-
raise errors.APIError(
|
775
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
776
|
-
http_res.status_code,
|
777
|
-
http_res_text,
|
778
|
-
http_res,
|
779
|
-
)
|
701
|
+
raise errors.APIError("Unexpected response received", http_res)
|
780
702
|
|
781
703
|
def retrieve_fees(
|
782
704
|
self,
|
@@ -874,40 +796,25 @@ class FeePlans(BaseSDK):
|
|
874
796
|
|
875
797
|
if utils.match_response(http_res, "200", "application/json"):
|
876
798
|
return operations.RetrieveFeesResponse(
|
877
|
-
result=utils.
|
878
|
-
|
799
|
+
result=utils.unmarshal_json_response(
|
800
|
+
List[components.IncurredFee], http_res
|
879
801
|
),
|
880
802
|
headers=utils.get_response_headers(http_res.headers),
|
881
803
|
)
|
882
804
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
883
805
|
http_res_text = utils.stream_to_text(http_res)
|
884
|
-
raise errors.APIError(
|
885
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
886
|
-
)
|
806
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
887
807
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
888
808
|
http_res_text = utils.stream_to_text(http_res)
|
889
|
-
raise errors.APIError(
|
890
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
891
|
-
)
|
809
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
892
810
|
if utils.match_response(http_res, "4XX", "*"):
|
893
811
|
http_res_text = utils.stream_to_text(http_res)
|
894
|
-
raise errors.APIError(
|
895
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
896
|
-
)
|
812
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
897
813
|
if utils.match_response(http_res, "5XX", "*"):
|
898
814
|
http_res_text = utils.stream_to_text(http_res)
|
899
|
-
raise errors.APIError(
|
900
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
901
|
-
)
|
815
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
902
816
|
|
903
|
-
|
904
|
-
http_res_text = utils.stream_to_text(http_res)
|
905
|
-
raise errors.APIError(
|
906
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
907
|
-
http_res.status_code,
|
908
|
-
http_res_text,
|
909
|
-
http_res,
|
910
|
-
)
|
817
|
+
raise errors.APIError("Unexpected response received", http_res)
|
911
818
|
|
912
819
|
async def retrieve_fees_async(
|
913
820
|
self,
|
@@ -1005,40 +912,25 @@ class FeePlans(BaseSDK):
|
|
1005
912
|
|
1006
913
|
if utils.match_response(http_res, "200", "application/json"):
|
1007
914
|
return operations.RetrieveFeesResponse(
|
1008
|
-
result=utils.
|
1009
|
-
|
915
|
+
result=utils.unmarshal_json_response(
|
916
|
+
List[components.IncurredFee], http_res
|
1010
917
|
),
|
1011
918
|
headers=utils.get_response_headers(http_res.headers),
|
1012
919
|
)
|
1013
920
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1014
921
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1015
|
-
raise errors.APIError(
|
1016
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1017
|
-
)
|
922
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1018
923
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1019
924
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1020
|
-
raise errors.APIError(
|
1021
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1022
|
-
)
|
925
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1023
926
|
if utils.match_response(http_res, "4XX", "*"):
|
1024
927
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1025
|
-
raise errors.APIError(
|
1026
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1027
|
-
)
|
928
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1028
929
|
if utils.match_response(http_res, "5XX", "*"):
|
1029
930
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1030
|
-
raise errors.APIError(
|
1031
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1032
|
-
)
|
931
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1033
932
|
|
1034
|
-
|
1035
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1036
|
-
raise errors.APIError(
|
1037
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1038
|
-
http_res.status_code,
|
1039
|
-
http_res_text,
|
1040
|
-
http_res,
|
1041
|
-
)
|
933
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1042
934
|
|
1043
935
|
def list_fees_fetch(
|
1044
936
|
self,
|
@@ -1130,40 +1022,25 @@ class FeePlans(BaseSDK):
|
|
1130
1022
|
|
1131
1023
|
if utils.match_response(http_res, "200", "application/json"):
|
1132
1024
|
return operations.ListFeesFetchResponse(
|
1133
|
-
result=utils.
|
1134
|
-
|
1025
|
+
result=utils.unmarshal_json_response(
|
1026
|
+
List[components.IncurredFee], http_res
|
1135
1027
|
),
|
1136
1028
|
headers=utils.get_response_headers(http_res.headers),
|
1137
1029
|
)
|
1138
1030
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1139
1031
|
http_res_text = utils.stream_to_text(http_res)
|
1140
|
-
raise errors.APIError(
|
1141
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1142
|
-
)
|
1032
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1143
1033
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1144
1034
|
http_res_text = utils.stream_to_text(http_res)
|
1145
|
-
raise errors.APIError(
|
1146
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1147
|
-
)
|
1035
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1148
1036
|
if utils.match_response(http_res, "4XX", "*"):
|
1149
1037
|
http_res_text = utils.stream_to_text(http_res)
|
1150
|
-
raise errors.APIError(
|
1151
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1152
|
-
)
|
1038
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1153
1039
|
if utils.match_response(http_res, "5XX", "*"):
|
1154
1040
|
http_res_text = utils.stream_to_text(http_res)
|
1155
|
-
raise errors.APIError(
|
1156
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1157
|
-
)
|
1041
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1158
1042
|
|
1159
|
-
|
1160
|
-
http_res_text = utils.stream_to_text(http_res)
|
1161
|
-
raise errors.APIError(
|
1162
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1163
|
-
http_res.status_code,
|
1164
|
-
http_res_text,
|
1165
|
-
http_res,
|
1166
|
-
)
|
1043
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1167
1044
|
|
1168
1045
|
async def list_fees_fetch_async(
|
1169
1046
|
self,
|
@@ -1255,40 +1132,25 @@ class FeePlans(BaseSDK):
|
|
1255
1132
|
|
1256
1133
|
if utils.match_response(http_res, "200", "application/json"):
|
1257
1134
|
return operations.ListFeesFetchResponse(
|
1258
|
-
result=utils.
|
1259
|
-
|
1135
|
+
result=utils.unmarshal_json_response(
|
1136
|
+
List[components.IncurredFee], http_res
|
1260
1137
|
),
|
1261
1138
|
headers=utils.get_response_headers(http_res.headers),
|
1262
1139
|
)
|
1263
1140
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1264
1141
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1265
|
-
raise errors.APIError(
|
1266
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1267
|
-
)
|
1142
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1268
1143
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1269
1144
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1270
|
-
raise errors.APIError(
|
1271
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1272
|
-
)
|
1145
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1273
1146
|
if utils.match_response(http_res, "4XX", "*"):
|
1274
1147
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1275
|
-
raise errors.APIError(
|
1276
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1277
|
-
)
|
1148
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1278
1149
|
if utils.match_response(http_res, "5XX", "*"):
|
1279
1150
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1280
|
-
raise errors.APIError(
|
1281
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1282
|
-
)
|
1151
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1283
1152
|
|
1284
|
-
|
1285
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1286
|
-
raise errors.APIError(
|
1287
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1288
|
-
http_res.status_code,
|
1289
|
-
http_res_text,
|
1290
|
-
http_res,
|
1291
|
-
)
|
1153
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1292
1154
|
|
1293
1155
|
def list_partner_pricing(
|
1294
1156
|
self,
|
@@ -1371,40 +1233,25 @@ class FeePlans(BaseSDK):
|
|
1371
1233
|
|
1372
1234
|
if utils.match_response(http_res, "200", "application/json"):
|
1373
1235
|
return operations.ListPartnerPricingResponse(
|
1374
|
-
result=utils.
|
1375
|
-
|
1236
|
+
result=utils.unmarshal_json_response(
|
1237
|
+
List[components.PartnerPricing], http_res
|
1376
1238
|
),
|
1377
1239
|
headers=utils.get_response_headers(http_res.headers),
|
1378
1240
|
)
|
1379
1241
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1380
1242
|
http_res_text = utils.stream_to_text(http_res)
|
1381
|
-
raise errors.APIError(
|
1382
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1383
|
-
)
|
1243
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1384
1244
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1385
1245
|
http_res_text = utils.stream_to_text(http_res)
|
1386
|
-
raise errors.APIError(
|
1387
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1388
|
-
)
|
1246
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1389
1247
|
if utils.match_response(http_res, "4XX", "*"):
|
1390
1248
|
http_res_text = utils.stream_to_text(http_res)
|
1391
|
-
raise errors.APIError(
|
1392
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1393
|
-
)
|
1249
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1394
1250
|
if utils.match_response(http_res, "5XX", "*"):
|
1395
1251
|
http_res_text = utils.stream_to_text(http_res)
|
1396
|
-
raise errors.APIError(
|
1397
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1398
|
-
)
|
1252
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1399
1253
|
|
1400
|
-
|
1401
|
-
http_res_text = utils.stream_to_text(http_res)
|
1402
|
-
raise errors.APIError(
|
1403
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1404
|
-
http_res.status_code,
|
1405
|
-
http_res_text,
|
1406
|
-
http_res,
|
1407
|
-
)
|
1254
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1408
1255
|
|
1409
1256
|
async def list_partner_pricing_async(
|
1410
1257
|
self,
|
@@ -1487,40 +1334,25 @@ class FeePlans(BaseSDK):
|
|
1487
1334
|
|
1488
1335
|
if utils.match_response(http_res, "200", "application/json"):
|
1489
1336
|
return operations.ListPartnerPricingResponse(
|
1490
|
-
result=utils.
|
1491
|
-
|
1337
|
+
result=utils.unmarshal_json_response(
|
1338
|
+
List[components.PartnerPricing], http_res
|
1492
1339
|
),
|
1493
1340
|
headers=utils.get_response_headers(http_res.headers),
|
1494
1341
|
)
|
1495
1342
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1496
1343
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1497
|
-
raise errors.APIError(
|
1498
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1499
|
-
)
|
1344
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1500
1345
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1501
1346
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1502
|
-
raise errors.APIError(
|
1503
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1504
|
-
)
|
1347
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1505
1348
|
if utils.match_response(http_res, "4XX", "*"):
|
1506
1349
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1507
|
-
raise errors.APIError(
|
1508
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1509
|
-
)
|
1350
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1510
1351
|
if utils.match_response(http_res, "5XX", "*"):
|
1511
1352
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1512
|
-
raise errors.APIError(
|
1513
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1514
|
-
)
|
1353
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1515
1354
|
|
1516
|
-
|
1517
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1518
|
-
raise errors.APIError(
|
1519
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1520
|
-
http_res.status_code,
|
1521
|
-
http_res_text,
|
1522
|
-
http_res,
|
1523
|
-
)
|
1355
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1524
1356
|
|
1525
1357
|
def list_partner_pricing_agreements(
|
1526
1358
|
self,
|
@@ -1612,40 +1444,25 @@ class FeePlans(BaseSDK):
|
|
1612
1444
|
|
1613
1445
|
if utils.match_response(http_res, "200", "application/json"):
|
1614
1446
|
return operations.ListPartnerPricingAgreementsResponse(
|
1615
|
-
result=utils.
|
1616
|
-
|
1447
|
+
result=utils.unmarshal_json_response(
|
1448
|
+
List[components.PartnerPricingAgreement], http_res
|
1617
1449
|
),
|
1618
1450
|
headers=utils.get_response_headers(http_res.headers),
|
1619
1451
|
)
|
1620
1452
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1621
1453
|
http_res_text = utils.stream_to_text(http_res)
|
1622
|
-
raise errors.APIError(
|
1623
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1624
|
-
)
|
1454
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1625
1455
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1626
1456
|
http_res_text = utils.stream_to_text(http_res)
|
1627
|
-
raise errors.APIError(
|
1628
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1629
|
-
)
|
1457
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1630
1458
|
if utils.match_response(http_res, "4XX", "*"):
|
1631
1459
|
http_res_text = utils.stream_to_text(http_res)
|
1632
|
-
raise errors.APIError(
|
1633
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1634
|
-
)
|
1460
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1635
1461
|
if utils.match_response(http_res, "5XX", "*"):
|
1636
1462
|
http_res_text = utils.stream_to_text(http_res)
|
1637
|
-
raise errors.APIError(
|
1638
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1639
|
-
)
|
1463
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1640
1464
|
|
1641
|
-
|
1642
|
-
http_res_text = utils.stream_to_text(http_res)
|
1643
|
-
raise errors.APIError(
|
1644
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1645
|
-
http_res.status_code,
|
1646
|
-
http_res_text,
|
1647
|
-
http_res,
|
1648
|
-
)
|
1465
|
+
raise errors.APIError("Unexpected response received", http_res)
|
1649
1466
|
|
1650
1467
|
async def list_partner_pricing_agreements_async(
|
1651
1468
|
self,
|
@@ -1737,37 +1554,22 @@ class FeePlans(BaseSDK):
|
|
1737
1554
|
|
1738
1555
|
if utils.match_response(http_res, "200", "application/json"):
|
1739
1556
|
return operations.ListPartnerPricingAgreementsResponse(
|
1740
|
-
result=utils.
|
1741
|
-
|
1557
|
+
result=utils.unmarshal_json_response(
|
1558
|
+
List[components.PartnerPricingAgreement], http_res
|
1742
1559
|
),
|
1743
1560
|
headers=utils.get_response_headers(http_res.headers),
|
1744
1561
|
)
|
1745
1562
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
1746
1563
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1747
|
-
raise errors.APIError(
|
1748
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1749
|
-
)
|
1564
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1750
1565
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
1751
1566
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1752
|
-
raise errors.APIError(
|
1753
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1754
|
-
)
|
1567
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1755
1568
|
if utils.match_response(http_res, "4XX", "*"):
|
1756
1569
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1757
|
-
raise errors.APIError(
|
1758
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1759
|
-
)
|
1570
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1760
1571
|
if utils.match_response(http_res, "5XX", "*"):
|
1761
1572
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1762
|
-
raise errors.APIError(
|
1763
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1764
|
-
)
|
1573
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
1765
1574
|
|
1766
|
-
|
1767
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1768
|
-
raise errors.APIError(
|
1769
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1770
|
-
http_res.status_code,
|
1771
|
-
http_res_text,
|
1772
|
-
http_res,
|
1773
|
-
)
|
1575
|
+
raise errors.APIError("Unexpected response received", http_res)
|