moovio_sdk 0.13.0__py3-none-any.whl → 0.13.2__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.
Files changed (40) hide show
  1. moovio_sdk/_version.py +3 -3
  2. moovio_sdk/account_terminal_applications.py +13 -16
  3. moovio_sdk/accounts.py +29 -56
  4. moovio_sdk/adjustments.py +5 -8
  5. moovio_sdk/apple_pay.py +19 -34
  6. moovio_sdk/authentication.py +11 -18
  7. moovio_sdk/bank_accounts.py +31 -58
  8. moovio_sdk/branding.py +21 -48
  9. moovio_sdk/capabilities.py +13 -28
  10. moovio_sdk/card_issuing.py +17 -32
  11. moovio_sdk/cards.py +19 -34
  12. moovio_sdk/disputes.py +35 -66
  13. moovio_sdk/end_to_end_encryption.py +5 -8
  14. moovio_sdk/enriched_address.py +3 -2
  15. moovio_sdk/enriched_profile.py +3 -2
  16. moovio_sdk/fee_plans.py +19 -38
  17. moovio_sdk/files.py +11 -18
  18. moovio_sdk/industries.py +3 -6
  19. moovio_sdk/institutions.py +7 -10
  20. moovio_sdk/issuing_transactions.py +11 -10
  21. moovio_sdk/models/components/patchtransfer.py +9 -3
  22. moovio_sdk/onboarding.py +11 -22
  23. moovio_sdk/payment_links.py +19 -30
  24. moovio_sdk/payment_methods.py +5 -8
  25. moovio_sdk/receipts.py +7 -10
  26. moovio_sdk/representatives.py +17 -40
  27. moovio_sdk/scheduling.py +21 -44
  28. moovio_sdk/support.py +19 -26
  29. moovio_sdk/sweeps.py +21 -32
  30. moovio_sdk/terminal_applications.py +13 -20
  31. moovio_sdk/transfers.py +63 -100
  32. moovio_sdk/underwriting.py +15 -22
  33. moovio_sdk/utils/__init__.py +0 -3
  34. moovio_sdk/utils/serializers.py +1 -18
  35. moovio_sdk/utils/unmarshal_json_response.py +24 -0
  36. moovio_sdk/wallet_transactions.py +5 -8
  37. moovio_sdk/wallets.py +5 -4
  38. {moovio_sdk-0.13.0.dist-info → moovio_sdk-0.13.2.dist-info}/METADATA +1 -1
  39. {moovio_sdk-0.13.0.dist-info → moovio_sdk-0.13.2.dist-info}/RECORD +40 -39
  40. {moovio_sdk-0.13.0.dist-info → moovio_sdk-0.13.2.dist-info}/WHEEL +0 -0
@@ -6,6 +6,7 @@ from moovio_sdk._hooks import HookContext
6
6
  from moovio_sdk.models import components, errors, operations
7
7
  from moovio_sdk.types import OptionalNullable, UNSET
8
8
  from moovio_sdk.utils import get_security_from_env
9
+ from moovio_sdk.utils.unmarshal_json_response import unmarshal_json_response
9
10
  from typing import Any, List, Mapping, Optional, Union
10
11
 
11
12
 
@@ -123,16 +124,14 @@ class BankAccounts(BaseSDK):
123
124
  response_data: Any = None
124
125
  if utils.match_response(http_res, "200", "application/json"):
125
126
  return operations.LinkBankAccountResponse(
126
- result=utils.unmarshal_json_response(components.BankAccount, http_res),
127
+ result=unmarshal_json_response(components.BankAccount, http_res),
127
128
  headers=utils.get_response_headers(http_res.headers),
128
129
  )
129
130
  if utils.match_response(http_res, ["400", "409"], "application/json"):
130
- response_data = utils.unmarshal_json_response(
131
- errors.GenericErrorData, http_res
132
- )
131
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
133
132
  raise errors.GenericError(response_data, http_res)
134
133
  if utils.match_response(http_res, "422", "application/json"):
135
- response_data = utils.unmarshal_json_response(
134
+ response_data = unmarshal_json_response(
136
135
  errors.BankAccountValidationErrorData, http_res
137
136
  )
138
137
  raise errors.BankAccountValidationError(response_data, http_res)
@@ -264,16 +263,14 @@ class BankAccounts(BaseSDK):
264
263
  response_data: Any = None
265
264
  if utils.match_response(http_res, "200", "application/json"):
266
265
  return operations.LinkBankAccountResponse(
267
- result=utils.unmarshal_json_response(components.BankAccount, http_res),
266
+ result=unmarshal_json_response(components.BankAccount, http_res),
268
267
  headers=utils.get_response_headers(http_res.headers),
269
268
  )
270
269
  if utils.match_response(http_res, ["400", "409"], "application/json"):
271
- response_data = utils.unmarshal_json_response(
272
- errors.GenericErrorData, http_res
273
- )
270
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
274
271
  raise errors.GenericError(response_data, http_res)
275
272
  if utils.match_response(http_res, "422", "application/json"):
276
- response_data = utils.unmarshal_json_response(
273
+ response_data = unmarshal_json_response(
277
274
  errors.BankAccountValidationErrorData, http_res
278
275
  )
279
276
  raise errors.BankAccountValidationError(response_data, http_res)
@@ -372,9 +369,7 @@ class BankAccounts(BaseSDK):
372
369
 
373
370
  if utils.match_response(http_res, "200", "application/json"):
374
371
  return operations.ListBankAccountsResponse(
375
- result=utils.unmarshal_json_response(
376
- List[components.BankAccount], http_res
377
- ),
372
+ result=unmarshal_json_response(List[components.BankAccount], http_res),
378
373
  headers=utils.get_response_headers(http_res.headers),
379
374
  )
380
375
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -472,9 +467,7 @@ class BankAccounts(BaseSDK):
472
467
 
473
468
  if utils.match_response(http_res, "200", "application/json"):
474
469
  return operations.ListBankAccountsResponse(
475
- result=utils.unmarshal_json_response(
476
- List[components.BankAccount], http_res
477
- ),
470
+ result=unmarshal_json_response(List[components.BankAccount], http_res),
478
471
  headers=utils.get_response_headers(http_res.headers),
479
472
  )
480
473
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -575,7 +568,7 @@ class BankAccounts(BaseSDK):
575
568
 
576
569
  if utils.match_response(http_res, "200", "application/json"):
577
570
  return operations.GetBankAccountResponse(
578
- result=utils.unmarshal_json_response(components.BankAccount, http_res),
571
+ result=unmarshal_json_response(components.BankAccount, http_res),
579
572
  headers=utils.get_response_headers(http_res.headers),
580
573
  )
581
574
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -676,7 +669,7 @@ class BankAccounts(BaseSDK):
676
669
 
677
670
  if utils.match_response(http_res, "200", "application/json"):
678
671
  return operations.GetBankAccountResponse(
679
- result=utils.unmarshal_json_response(components.BankAccount, http_res),
672
+ result=unmarshal_json_response(components.BankAccount, http_res),
680
673
  headers=utils.get_response_headers(http_res.headers),
681
674
  )
682
675
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -790,9 +783,7 @@ class BankAccounts(BaseSDK):
790
783
  headers=utils.get_response_headers(http_res.headers)
791
784
  )
792
785
  if utils.match_response(http_res, ["400", "409"], "application/json"):
793
- response_data = utils.unmarshal_json_response(
794
- errors.GenericErrorData, http_res
795
- )
786
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
796
787
  raise errors.GenericError(response_data, http_res)
797
788
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
798
789
  http_res_text = utils.stream_to_text(http_res)
@@ -905,9 +896,7 @@ class BankAccounts(BaseSDK):
905
896
  headers=utils.get_response_headers(http_res.headers)
906
897
  )
907
898
  if utils.match_response(http_res, ["400", "409"], "application/json"):
908
- response_data = utils.unmarshal_json_response(
909
- errors.GenericErrorData, http_res
910
- )
899
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
911
900
  raise errors.GenericError(response_data, http_res)
912
901
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
913
902
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -1031,9 +1020,7 @@ class BankAccounts(BaseSDK):
1031
1020
  headers=utils.get_response_headers(http_res.headers)
1032
1021
  )
1033
1022
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1034
- response_data = utils.unmarshal_json_response(
1035
- errors.GenericErrorData, http_res
1036
- )
1023
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1037
1024
  raise errors.GenericError(response_data, http_res)
1038
1025
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1039
1026
  http_res_text = utils.stream_to_text(http_res)
@@ -1157,9 +1144,7 @@ class BankAccounts(BaseSDK):
1157
1144
  headers=utils.get_response_headers(http_res.headers)
1158
1145
  )
1159
1146
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1160
- response_data = utils.unmarshal_json_response(
1161
- errors.GenericErrorData, http_res
1162
- )
1147
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1163
1148
  raise errors.GenericError(response_data, http_res)
1164
1149
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1165
1150
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -1282,18 +1267,16 @@ class BankAccounts(BaseSDK):
1282
1267
  response_data: Any = None
1283
1268
  if utils.match_response(http_res, "200", "application/json"):
1284
1269
  return operations.CompleteMicroDepositsResponse(
1285
- result=utils.unmarshal_json_response(
1270
+ result=unmarshal_json_response(
1286
1271
  components.CompletedMicroDeposits, http_res
1287
1272
  ),
1288
1273
  headers=utils.get_response_headers(http_res.headers),
1289
1274
  )
1290
1275
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1291
- response_data = utils.unmarshal_json_response(
1292
- errors.GenericErrorData, http_res
1293
- )
1276
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1294
1277
  raise errors.GenericError(response_data, http_res)
1295
1278
  if utils.match_response(http_res, "422", "application/json"):
1296
- response_data = utils.unmarshal_json_response(
1279
+ response_data = unmarshal_json_response(
1297
1280
  errors.MicroDepositValidationErrorData, http_res
1298
1281
  )
1299
1282
  raise errors.MicroDepositValidationError(response_data, http_res)
@@ -1418,18 +1401,16 @@ class BankAccounts(BaseSDK):
1418
1401
  response_data: Any = None
1419
1402
  if utils.match_response(http_res, "200", "application/json"):
1420
1403
  return operations.CompleteMicroDepositsResponse(
1421
- result=utils.unmarshal_json_response(
1404
+ result=unmarshal_json_response(
1422
1405
  components.CompletedMicroDeposits, http_res
1423
1406
  ),
1424
1407
  headers=utils.get_response_headers(http_res.headers),
1425
1408
  )
1426
1409
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1427
- response_data = utils.unmarshal_json_response(
1428
- errors.GenericErrorData, http_res
1429
- )
1410
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1430
1411
  raise errors.GenericError(response_data, http_res)
1431
1412
  if utils.match_response(http_res, "422", "application/json"):
1432
- response_data = utils.unmarshal_json_response(
1413
+ response_data = unmarshal_json_response(
1433
1414
  errors.MicroDepositValidationErrorData, http_res
1434
1415
  )
1435
1416
  raise errors.MicroDepositValidationError(response_data, http_res)
@@ -1538,7 +1519,7 @@ class BankAccounts(BaseSDK):
1538
1519
 
1539
1520
  if utils.match_response(http_res, "200", "application/json"):
1540
1521
  return operations.GetBankAccountVerificationResponse(
1541
- result=utils.unmarshal_json_response(
1522
+ result=unmarshal_json_response(
1542
1523
  components.BankAccountVerification, http_res
1543
1524
  ),
1544
1525
  headers=utils.get_response_headers(http_res.headers),
@@ -1648,7 +1629,7 @@ class BankAccounts(BaseSDK):
1648
1629
 
1649
1630
  if utils.match_response(http_res, "200", "application/json"):
1650
1631
  return operations.GetBankAccountVerificationResponse(
1651
- result=utils.unmarshal_json_response(
1632
+ result=unmarshal_json_response(
1652
1633
  components.BankAccountVerification, http_res
1653
1634
  ),
1654
1635
  headers=utils.get_response_headers(http_res.headers),
@@ -1779,15 +1760,13 @@ class BankAccounts(BaseSDK):
1779
1760
  response_data: Any = None
1780
1761
  if utils.match_response(http_res, "200", "application/json"):
1781
1762
  return operations.InitiateBankAccountVerificationResponse(
1782
- result=utils.unmarshal_json_response(
1763
+ result=unmarshal_json_response(
1783
1764
  components.BankAccountVerificationCreated, http_res
1784
1765
  ),
1785
1766
  headers=utils.get_response_headers(http_res.headers),
1786
1767
  )
1787
1768
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1788
- response_data = utils.unmarshal_json_response(
1789
- errors.GenericErrorData, http_res
1790
- )
1769
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1791
1770
  raise errors.GenericError(response_data, http_res)
1792
1771
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1793
1772
  http_res_text = utils.stream_to_text(http_res)
@@ -1915,15 +1894,13 @@ class BankAccounts(BaseSDK):
1915
1894
  response_data: Any = None
1916
1895
  if utils.match_response(http_res, "200", "application/json"):
1917
1896
  return operations.InitiateBankAccountVerificationResponse(
1918
- result=utils.unmarshal_json_response(
1897
+ result=unmarshal_json_response(
1919
1898
  components.BankAccountVerificationCreated, http_res
1920
1899
  ),
1921
1900
  headers=utils.get_response_headers(http_res.headers),
1922
1901
  )
1923
1902
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1924
- response_data = utils.unmarshal_json_response(
1925
- errors.GenericErrorData, http_res
1926
- )
1903
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1927
1904
  raise errors.GenericError(response_data, http_res)
1928
1905
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1929
1906
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -2053,15 +2030,13 @@ class BankAccounts(BaseSDK):
2053
2030
  response_data: Any = None
2054
2031
  if utils.match_response(http_res, "200", "application/json"):
2055
2032
  return operations.CompleteBankAccountVerificationResponse(
2056
- result=utils.unmarshal_json_response(
2033
+ result=unmarshal_json_response(
2057
2034
  components.BankAccountVerification, http_res
2058
2035
  ),
2059
2036
  headers=utils.get_response_headers(http_res.headers),
2060
2037
  )
2061
2038
  if utils.match_response(http_res, ["400", "409", "422"], "application/json"):
2062
- response_data = utils.unmarshal_json_response(
2063
- errors.GenericErrorData, http_res
2064
- )
2039
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2065
2040
  raise errors.GenericError(response_data, http_res)
2066
2041
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2067
2042
  http_res_text = utils.stream_to_text(http_res)
@@ -2191,15 +2166,13 @@ class BankAccounts(BaseSDK):
2191
2166
  response_data: Any = None
2192
2167
  if utils.match_response(http_res, "200", "application/json"):
2193
2168
  return operations.CompleteBankAccountVerificationResponse(
2194
- result=utils.unmarshal_json_response(
2169
+ result=unmarshal_json_response(
2195
2170
  components.BankAccountVerification, http_res
2196
2171
  ),
2197
2172
  headers=utils.get_response_headers(http_res.headers),
2198
2173
  )
2199
2174
  if utils.match_response(http_res, ["400", "409", "422"], "application/json"):
2200
- response_data = utils.unmarshal_json_response(
2201
- errors.GenericErrorData, http_res
2202
- )
2175
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2203
2176
  raise errors.GenericError(response_data, http_res)
2204
2177
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2205
2178
  http_res_text = await utils.stream_to_text_async(http_res)
moovio_sdk/branding.py CHANGED
@@ -6,6 +6,7 @@ from moovio_sdk._hooks import HookContext
6
6
  from moovio_sdk.models import components, errors, operations
7
7
  from moovio_sdk.types import OptionalNullable, UNSET
8
8
  from moovio_sdk.utils import get_security_from_env
9
+ from moovio_sdk.utils.unmarshal_json_response import unmarshal_json_response
9
10
  from typing import Any, Mapping, Optional, Union
10
11
 
11
12
 
@@ -113,18 +114,14 @@ class Branding(BaseSDK):
113
114
  response_data: Any = None
114
115
  if utils.match_response(http_res, "200", "application/json"):
115
116
  return operations.CreateBrandResponse(
116
- result=utils.unmarshal_json_response(
117
- components.BrandProperties, http_res
118
- ),
117
+ result=unmarshal_json_response(components.BrandProperties, http_res),
119
118
  headers=utils.get_response_headers(http_res.headers),
120
119
  )
121
120
  if utils.match_response(http_res, ["400", "409"], "application/json"):
122
- response_data = utils.unmarshal_json_response(
123
- errors.GenericErrorData, http_res
124
- )
121
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
125
122
  raise errors.GenericError(response_data, http_res)
126
123
  if utils.match_response(http_res, "422", "application/json"):
127
- response_data = utils.unmarshal_json_response(
124
+ response_data = unmarshal_json_response(
128
125
  errors.BrandValidationErrorData, http_res
129
126
  )
130
127
  raise errors.BrandValidationError(response_data, http_res)
@@ -246,18 +243,14 @@ class Branding(BaseSDK):
246
243
  response_data: Any = None
247
244
  if utils.match_response(http_res, "200", "application/json"):
248
245
  return operations.CreateBrandResponse(
249
- result=utils.unmarshal_json_response(
250
- components.BrandProperties, http_res
251
- ),
246
+ result=unmarshal_json_response(components.BrandProperties, http_res),
252
247
  headers=utils.get_response_headers(http_res.headers),
253
248
  )
254
249
  if utils.match_response(http_res, ["400", "409"], "application/json"):
255
- response_data = utils.unmarshal_json_response(
256
- errors.GenericErrorData, http_res
257
- )
250
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
258
251
  raise errors.GenericError(response_data, http_res)
259
252
  if utils.match_response(http_res, "422", "application/json"):
260
- response_data = utils.unmarshal_json_response(
253
+ response_data = unmarshal_json_response(
261
254
  errors.BrandValidationErrorData, http_res
262
255
  )
263
256
  raise errors.BrandValidationError(response_data, http_res)
@@ -379,18 +372,14 @@ class Branding(BaseSDK):
379
372
  response_data: Any = None
380
373
  if utils.match_response(http_res, "200", "application/json"):
381
374
  return operations.UpsertBrandResponse(
382
- result=utils.unmarshal_json_response(
383
- components.BrandProperties, http_res
384
- ),
375
+ result=unmarshal_json_response(components.BrandProperties, http_res),
385
376
  headers=utils.get_response_headers(http_res.headers),
386
377
  )
387
378
  if utils.match_response(http_res, ["400", "409"], "application/json"):
388
- response_data = utils.unmarshal_json_response(
389
- errors.GenericErrorData, http_res
390
- )
379
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
391
380
  raise errors.GenericError(response_data, http_res)
392
381
  if utils.match_response(http_res, "422", "application/json"):
393
- response_data = utils.unmarshal_json_response(
382
+ response_data = unmarshal_json_response(
394
383
  errors.BrandValidationErrorData, http_res
395
384
  )
396
385
  raise errors.BrandValidationError(response_data, http_res)
@@ -512,18 +501,14 @@ class Branding(BaseSDK):
512
501
  response_data: Any = None
513
502
  if utils.match_response(http_res, "200", "application/json"):
514
503
  return operations.UpsertBrandResponse(
515
- result=utils.unmarshal_json_response(
516
- components.BrandProperties, http_res
517
- ),
504
+ result=unmarshal_json_response(components.BrandProperties, http_res),
518
505
  headers=utils.get_response_headers(http_res.headers),
519
506
  )
520
507
  if utils.match_response(http_res, ["400", "409"], "application/json"):
521
- response_data = utils.unmarshal_json_response(
522
- errors.GenericErrorData, http_res
523
- )
508
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
524
509
  raise errors.GenericError(response_data, http_res)
525
510
  if utils.match_response(http_res, "422", "application/json"):
526
- response_data = utils.unmarshal_json_response(
511
+ response_data = unmarshal_json_response(
527
512
  errors.BrandValidationErrorData, http_res
528
513
  )
529
514
  raise errors.BrandValidationError(response_data, http_res)
@@ -620,9 +605,7 @@ class Branding(BaseSDK):
620
605
 
621
606
  if utils.match_response(http_res, "200", "application/json"):
622
607
  return operations.GetBrandResponse(
623
- result=utils.unmarshal_json_response(
624
- components.BrandProperties, http_res
625
- ),
608
+ result=unmarshal_json_response(components.BrandProperties, http_res),
626
609
  headers=utils.get_response_headers(http_res.headers),
627
610
  )
628
611
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -718,9 +701,7 @@ class Branding(BaseSDK):
718
701
 
719
702
  if utils.match_response(http_res, "200", "application/json"):
720
703
  return operations.GetBrandResponse(
721
- result=utils.unmarshal_json_response(
722
- components.BrandProperties, http_res
723
- ),
704
+ result=unmarshal_json_response(components.BrandProperties, http_res),
724
705
  headers=utils.get_response_headers(http_res.headers),
725
706
  )
726
707
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -841,18 +822,14 @@ class Branding(BaseSDK):
841
822
  response_data: Any = None
842
823
  if utils.match_response(http_res, "200", "application/json"):
843
824
  return operations.UpdateBrandResponse(
844
- result=utils.unmarshal_json_response(
845
- components.BrandProperties, http_res
846
- ),
825
+ result=unmarshal_json_response(components.BrandProperties, http_res),
847
826
  headers=utils.get_response_headers(http_res.headers),
848
827
  )
849
828
  if utils.match_response(http_res, ["400", "409"], "application/json"):
850
- response_data = utils.unmarshal_json_response(
851
- errors.GenericErrorData, http_res
852
- )
829
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
853
830
  raise errors.GenericError(response_data, http_res)
854
831
  if utils.match_response(http_res, "422", "application/json"):
855
- response_data = utils.unmarshal_json_response(
832
+ response_data = unmarshal_json_response(
856
833
  errors.BrandValidationErrorData, http_res
857
834
  )
858
835
  raise errors.BrandValidationError(response_data, http_res)
@@ -974,18 +951,14 @@ class Branding(BaseSDK):
974
951
  response_data: Any = None
975
952
  if utils.match_response(http_res, "200", "application/json"):
976
953
  return operations.UpdateBrandResponse(
977
- result=utils.unmarshal_json_response(
978
- components.BrandProperties, http_res
979
- ),
954
+ result=unmarshal_json_response(components.BrandProperties, http_res),
980
955
  headers=utils.get_response_headers(http_res.headers),
981
956
  )
982
957
  if utils.match_response(http_res, ["400", "409"], "application/json"):
983
- response_data = utils.unmarshal_json_response(
984
- errors.GenericErrorData, http_res
985
- )
958
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
986
959
  raise errors.GenericError(response_data, http_res)
987
960
  if utils.match_response(http_res, "422", "application/json"):
988
- response_data = utils.unmarshal_json_response(
961
+ response_data = unmarshal_json_response(
989
962
  errors.BrandValidationErrorData, http_res
990
963
  )
991
964
  raise errors.BrandValidationError(response_data, http_res)
@@ -6,6 +6,7 @@ from moovio_sdk._hooks import HookContext
6
6
  from moovio_sdk.models import components, errors, operations
7
7
  from moovio_sdk.types import OptionalNullable, UNSET
8
8
  from moovio_sdk.utils import get_security_from_env
9
+ from moovio_sdk.utils.unmarshal_json_response import unmarshal_json_response
9
10
  from typing import Any, List, Mapping, Optional
10
11
 
11
12
 
@@ -90,9 +91,7 @@ class Capabilities(BaseSDK):
90
91
 
91
92
  if utils.match_response(http_res, "200", "application/json"):
92
93
  return operations.ListCapabilitiesResponse(
93
- result=utils.unmarshal_json_response(
94
- List[components.Capability], http_res
95
- ),
94
+ result=unmarshal_json_response(List[components.Capability], http_res),
96
95
  headers=utils.get_response_headers(http_res.headers),
97
96
  )
98
97
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -190,9 +189,7 @@ class Capabilities(BaseSDK):
190
189
 
191
190
  if utils.match_response(http_res, "200", "application/json"):
192
191
  return operations.ListCapabilitiesResponse(
193
- result=utils.unmarshal_json_response(
194
- List[components.Capability], http_res
195
- ),
192
+ result=unmarshal_json_response(List[components.Capability], http_res),
196
193
  headers=utils.get_response_headers(http_res.headers),
197
194
  )
198
195
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -313,18 +310,14 @@ class Capabilities(BaseSDK):
313
310
  response_data: Any = None
314
311
  if utils.match_response(http_res, "200", "application/json"):
315
312
  return operations.RequestCapabilitiesResponse(
316
- result=utils.unmarshal_json_response(
317
- List[components.Capability], http_res
318
- ),
313
+ result=unmarshal_json_response(List[components.Capability], http_res),
319
314
  headers=utils.get_response_headers(http_res.headers),
320
315
  )
321
316
  if utils.match_response(http_res, ["400", "409"], "application/json"):
322
- response_data = utils.unmarshal_json_response(
323
- errors.GenericErrorData, http_res
324
- )
317
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
325
318
  raise errors.GenericError(response_data, http_res)
326
319
  if utils.match_response(http_res, "422", "application/json"):
327
- response_data = utils.unmarshal_json_response(
320
+ response_data = unmarshal_json_response(
328
321
  errors.AddCapabilitiesErrorData, http_res
329
322
  )
330
323
  raise errors.AddCapabilitiesError(response_data, http_res)
@@ -446,18 +439,14 @@ class Capabilities(BaseSDK):
446
439
  response_data: Any = None
447
440
  if utils.match_response(http_res, "200", "application/json"):
448
441
  return operations.RequestCapabilitiesResponse(
449
- result=utils.unmarshal_json_response(
450
- List[components.Capability], http_res
451
- ),
442
+ result=unmarshal_json_response(List[components.Capability], http_res),
452
443
  headers=utils.get_response_headers(http_res.headers),
453
444
  )
454
445
  if utils.match_response(http_res, ["400", "409"], "application/json"):
455
- response_data = utils.unmarshal_json_response(
456
- errors.GenericErrorData, http_res
457
- )
446
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
458
447
  raise errors.GenericError(response_data, http_res)
459
448
  if utils.match_response(http_res, "422", "application/json"):
460
- response_data = utils.unmarshal_json_response(
449
+ response_data = unmarshal_json_response(
461
450
  errors.AddCapabilitiesErrorData, http_res
462
451
  )
463
452
  raise errors.AddCapabilitiesError(response_data, http_res)
@@ -557,7 +546,7 @@ class Capabilities(BaseSDK):
557
546
 
558
547
  if utils.match_response(http_res, "200", "application/json"):
559
548
  return operations.GetCapabilityResponse(
560
- result=utils.unmarshal_json_response(components.Capability, http_res),
549
+ result=unmarshal_json_response(components.Capability, http_res),
561
550
  headers=utils.get_response_headers(http_res.headers),
562
551
  )
563
552
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -656,7 +645,7 @@ class Capabilities(BaseSDK):
656
645
 
657
646
  if utils.match_response(http_res, "200", "application/json"):
658
647
  return operations.GetCapabilityResponse(
659
- result=utils.unmarshal_json_response(components.Capability, http_res),
648
+ result=unmarshal_json_response(components.Capability, http_res),
660
649
  headers=utils.get_response_headers(http_res.headers),
661
650
  )
662
651
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -770,9 +759,7 @@ class Capabilities(BaseSDK):
770
759
  headers=utils.get_response_headers(http_res.headers)
771
760
  )
772
761
  if utils.match_response(http_res, ["400", "409"], "application/json"):
773
- response_data = utils.unmarshal_json_response(
774
- errors.GenericErrorData, http_res
775
- )
762
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
776
763
  raise errors.GenericError(response_data, http_res)
777
764
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
778
765
  http_res_text = utils.stream_to_text(http_res)
@@ -885,9 +872,7 @@ class Capabilities(BaseSDK):
885
872
  headers=utils.get_response_headers(http_res.headers)
886
873
  )
887
874
  if utils.match_response(http_res, ["400", "409"], "application/json"):
888
- response_data = utils.unmarshal_json_response(
889
- errors.GenericErrorData, http_res
890
- )
875
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
891
876
  raise errors.GenericError(response_data, http_res)
892
877
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
893
878
  http_res_text = await utils.stream_to_text_async(http_res)