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
 
@@ -135,16 +136,14 @@ class CardIssuing(BaseSDK):
135
136
  response_data: Any = None
136
137
  if utils.match_response(http_res, "200", "application/json"):
137
138
  return operations.RequestCardResponse(
138
- result=utils.unmarshal_json_response(components.IssuedCard, http_res),
139
+ result=unmarshal_json_response(components.IssuedCard, http_res),
139
140
  headers=utils.get_response_headers(http_res.headers),
140
141
  )
141
142
  if utils.match_response(http_res, "400", "application/json"):
142
- response_data = utils.unmarshal_json_response(
143
- errors.GenericErrorData, http_res
144
- )
143
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
145
144
  raise errors.GenericError(response_data, http_res)
146
145
  if utils.match_response(http_res, "422", "application/json"):
147
- response_data = utils.unmarshal_json_response(
146
+ response_data = unmarshal_json_response(
148
147
  errors.RequestCardErrorData, http_res
149
148
  )
150
149
  raise errors.RequestCardError(response_data, http_res)
@@ -288,16 +287,14 @@ class CardIssuing(BaseSDK):
288
287
  response_data: Any = None
289
288
  if utils.match_response(http_res, "200", "application/json"):
290
289
  return operations.RequestCardResponse(
291
- result=utils.unmarshal_json_response(components.IssuedCard, http_res),
290
+ result=unmarshal_json_response(components.IssuedCard, http_res),
292
291
  headers=utils.get_response_headers(http_res.headers),
293
292
  )
294
293
  if utils.match_response(http_res, "400", "application/json"):
295
- response_data = utils.unmarshal_json_response(
296
- errors.GenericErrorData, http_res
297
- )
294
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
298
295
  raise errors.GenericError(response_data, http_res)
299
296
  if utils.match_response(http_res, "422", "application/json"):
300
- response_data = utils.unmarshal_json_response(
297
+ response_data = unmarshal_json_response(
301
298
  errors.RequestCardErrorData, http_res
302
299
  )
303
300
  raise errors.RequestCardError(response_data, http_res)
@@ -403,9 +400,7 @@ class CardIssuing(BaseSDK):
403
400
 
404
401
  if utils.match_response(http_res, "200", "application/json"):
405
402
  return operations.ListIssuedCardsResponse(
406
- result=utils.unmarshal_json_response(
407
- List[components.IssuedCard], http_res
408
- ),
403
+ result=unmarshal_json_response(List[components.IssuedCard], http_res),
409
404
  headers=utils.get_response_headers(http_res.headers),
410
405
  )
411
406
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -510,9 +505,7 @@ class CardIssuing(BaseSDK):
510
505
 
511
506
  if utils.match_response(http_res, "200", "application/json"):
512
507
  return operations.ListIssuedCardsResponse(
513
- result=utils.unmarshal_json_response(
514
- List[components.IssuedCard], http_res
515
- ),
508
+ result=unmarshal_json_response(List[components.IssuedCard], http_res),
516
509
  headers=utils.get_response_headers(http_res.headers),
517
510
  )
518
511
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -611,7 +604,7 @@ class CardIssuing(BaseSDK):
611
604
 
612
605
  if utils.match_response(http_res, "200", "application/json"):
613
606
  return operations.GetIssuedCardResponse(
614
- result=utils.unmarshal_json_response(components.IssuedCard, http_res),
607
+ result=unmarshal_json_response(components.IssuedCard, http_res),
615
608
  headers=utils.get_response_headers(http_res.headers),
616
609
  )
617
610
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -710,7 +703,7 @@ class CardIssuing(BaseSDK):
710
703
 
711
704
  if utils.match_response(http_res, "200", "application/json"):
712
705
  return operations.GetIssuedCardResponse(
713
- result=utils.unmarshal_json_response(components.IssuedCard, http_res),
706
+ result=unmarshal_json_response(components.IssuedCard, http_res),
714
707
  headers=utils.get_response_headers(http_res.headers),
715
708
  )
716
709
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -850,12 +843,10 @@ class CardIssuing(BaseSDK):
850
843
  headers=utils.get_response_headers(http_res.headers)
851
844
  )
852
845
  if utils.match_response(http_res, ["400", "409"], "application/json"):
853
- response_data = utils.unmarshal_json_response(
854
- errors.GenericErrorData, http_res
855
- )
846
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
856
847
  raise errors.GenericError(response_data, http_res)
857
848
  if utils.match_response(http_res, "422", "application/json"):
858
- response_data = utils.unmarshal_json_response(
849
+ response_data = unmarshal_json_response(
859
850
  errors.UpdateIssuedCardErrorData, http_res
860
851
  )
861
852
  raise errors.UpdateIssuedCardError(response_data, http_res)
@@ -996,12 +987,10 @@ class CardIssuing(BaseSDK):
996
987
  headers=utils.get_response_headers(http_res.headers)
997
988
  )
998
989
  if utils.match_response(http_res, ["400", "409"], "application/json"):
999
- response_data = utils.unmarshal_json_response(
1000
- errors.GenericErrorData, http_res
1001
- )
990
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1002
991
  raise errors.GenericError(response_data, http_res)
1003
992
  if utils.match_response(http_res, "422", "application/json"):
1004
- response_data = utils.unmarshal_json_response(
993
+ response_data = unmarshal_json_response(
1005
994
  errors.UpdateIssuedCardErrorData, http_res
1006
995
  )
1007
996
  raise errors.UpdateIssuedCardError(response_data, http_res)
@@ -1103,9 +1092,7 @@ class CardIssuing(BaseSDK):
1103
1092
 
1104
1093
  if utils.match_response(http_res, "200", "application/json"):
1105
1094
  return operations.GetFullIssuedCardResponse(
1106
- result=utils.unmarshal_json_response(
1107
- components.FullIssuedCard, http_res
1108
- ),
1095
+ result=unmarshal_json_response(components.FullIssuedCard, http_res),
1109
1096
  headers=utils.get_response_headers(http_res.headers),
1110
1097
  )
1111
1098
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -1206,9 +1193,7 @@ class CardIssuing(BaseSDK):
1206
1193
 
1207
1194
  if utils.match_response(http_res, "200", "application/json"):
1208
1195
  return operations.GetFullIssuedCardResponse(
1209
- result=utils.unmarshal_json_response(
1210
- components.FullIssuedCard, http_res
1211
- ),
1196
+ result=unmarshal_json_response(components.FullIssuedCard, http_res),
1212
1197
  headers=utils.get_response_headers(http_res.headers),
1213
1198
  )
1214
1199
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
moovio_sdk/cards.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, List, Mapping, Optional, Union
10
11
 
11
12
 
@@ -158,18 +159,14 @@ class Cards(BaseSDK):
158
159
  response_data: Any = None
159
160
  if utils.match_response(http_res, "200", "application/json"):
160
161
  return operations.LinkCardResponse(
161
- result=utils.unmarshal_json_response(components.Card, http_res),
162
+ result=unmarshal_json_response(components.Card, http_res),
162
163
  headers=utils.get_response_headers(http_res.headers),
163
164
  )
164
165
  if utils.match_response(http_res, "400", "application/json"):
165
- response_data = utils.unmarshal_json_response(
166
- errors.GenericErrorData, http_res
167
- )
166
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
168
167
  raise errors.GenericError(response_data, http_res)
169
168
  if utils.match_response(http_res, "422", "application/json"):
170
- response_data = utils.unmarshal_json_response(
171
- errors.LinkCardErrorData, http_res
172
- )
169
+ response_data = unmarshal_json_response(errors.LinkCardErrorData, http_res)
173
170
  raise errors.LinkCardError(response_data, http_res)
174
171
  if utils.match_response(http_res, ["401", "403", "404", "409", "429"], "*"):
175
172
  http_res_text = utils.stream_to_text(http_res)
@@ -334,18 +331,14 @@ class Cards(BaseSDK):
334
331
  response_data: Any = None
335
332
  if utils.match_response(http_res, "200", "application/json"):
336
333
  return operations.LinkCardResponse(
337
- result=utils.unmarshal_json_response(components.Card, http_res),
334
+ result=unmarshal_json_response(components.Card, http_res),
338
335
  headers=utils.get_response_headers(http_res.headers),
339
336
  )
340
337
  if utils.match_response(http_res, "400", "application/json"):
341
- response_data = utils.unmarshal_json_response(
342
- errors.GenericErrorData, http_res
343
- )
338
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
344
339
  raise errors.GenericError(response_data, http_res)
345
340
  if utils.match_response(http_res, "422", "application/json"):
346
- response_data = utils.unmarshal_json_response(
347
- errors.LinkCardErrorData, http_res
348
- )
341
+ response_data = unmarshal_json_response(errors.LinkCardErrorData, http_res)
349
342
  raise errors.LinkCardError(response_data, http_res)
350
343
  if utils.match_response(http_res, ["401", "403", "404", "409", "429"], "*"):
351
344
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -442,7 +435,7 @@ class Cards(BaseSDK):
442
435
 
443
436
  if utils.match_response(http_res, "200", "application/json"):
444
437
  return operations.ListCardsResponse(
445
- result=utils.unmarshal_json_response(List[components.Card], http_res),
438
+ result=unmarshal_json_response(List[components.Card], http_res),
446
439
  headers=utils.get_response_headers(http_res.headers),
447
440
  )
448
441
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -540,7 +533,7 @@ class Cards(BaseSDK):
540
533
 
541
534
  if utils.match_response(http_res, "200", "application/json"):
542
535
  return operations.ListCardsResponse(
543
- result=utils.unmarshal_json_response(List[components.Card], http_res),
536
+ result=unmarshal_json_response(List[components.Card], http_res),
544
537
  headers=utils.get_response_headers(http_res.headers),
545
538
  )
546
539
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
@@ -641,7 +634,7 @@ class Cards(BaseSDK):
641
634
 
642
635
  if utils.match_response(http_res, "200", "application/json"):
643
636
  return operations.GetCardResponse(
644
- result=utils.unmarshal_json_response(components.Card, http_res),
637
+ result=unmarshal_json_response(components.Card, http_res),
645
638
  headers=utils.get_response_headers(http_res.headers),
646
639
  )
647
640
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -742,7 +735,7 @@ class Cards(BaseSDK):
742
735
 
743
736
  if utils.match_response(http_res, "200", "application/json"):
744
737
  return operations.GetCardResponse(
745
- result=utils.unmarshal_json_response(components.Card, http_res),
738
+ result=unmarshal_json_response(components.Card, http_res),
746
739
  headers=utils.get_response_headers(http_res.headers),
747
740
  )
748
741
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -907,16 +900,14 @@ class Cards(BaseSDK):
907
900
  response_data: Any = None
908
901
  if utils.match_response(http_res, "200", "application/json"):
909
902
  return operations.UpdateCardResponse(
910
- result=utils.unmarshal_json_response(components.Card, http_res),
903
+ result=unmarshal_json_response(components.Card, http_res),
911
904
  headers=utils.get_response_headers(http_res.headers),
912
905
  )
913
906
  if utils.match_response(http_res, ["400", "409"], "application/json"):
914
- response_data = utils.unmarshal_json_response(
915
- errors.GenericErrorData, http_res
916
- )
907
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
917
908
  raise errors.GenericError(response_data, http_res)
918
909
  if utils.match_response(http_res, "422", "application/json"):
919
- response_data = utils.unmarshal_json_response(
910
+ response_data = unmarshal_json_response(
920
911
  errors.UpdateCardErrorData, http_res
921
912
  )
922
913
  raise errors.UpdateCardError(response_data, http_res)
@@ -1082,16 +1073,14 @@ class Cards(BaseSDK):
1082
1073
  response_data: Any = None
1083
1074
  if utils.match_response(http_res, "200", "application/json"):
1084
1075
  return operations.UpdateCardResponse(
1085
- result=utils.unmarshal_json_response(components.Card, http_res),
1076
+ result=unmarshal_json_response(components.Card, http_res),
1086
1077
  headers=utils.get_response_headers(http_res.headers),
1087
1078
  )
1088
1079
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1089
- response_data = utils.unmarshal_json_response(
1090
- errors.GenericErrorData, http_res
1091
- )
1080
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1092
1081
  raise errors.GenericError(response_data, http_res)
1093
1082
  if utils.match_response(http_res, "422", "application/json"):
1094
- response_data = utils.unmarshal_json_response(
1083
+ response_data = unmarshal_json_response(
1095
1084
  errors.UpdateCardErrorData, http_res
1096
1085
  )
1097
1086
  raise errors.UpdateCardError(response_data, http_res)
@@ -1206,9 +1195,7 @@ class Cards(BaseSDK):
1206
1195
  headers=utils.get_response_headers(http_res.headers)
1207
1196
  )
1208
1197
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1209
- response_data = utils.unmarshal_json_response(
1210
- errors.GenericErrorData, http_res
1211
- )
1198
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1212
1199
  raise errors.GenericError(response_data, http_res)
1213
1200
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1214
1201
  http_res_text = utils.stream_to_text(http_res)
@@ -1321,9 +1308,7 @@ class Cards(BaseSDK):
1321
1308
  headers=utils.get_response_headers(http_res.headers)
1322
1309
  )
1323
1310
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1324
- response_data = utils.unmarshal_json_response(
1325
- errors.GenericErrorData, http_res
1326
- )
1311
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1327
1312
  raise errors.GenericError(response_data, http_res)
1328
1313
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1329
1314
  http_res_text = await utils.stream_to_text_async(http_res)
moovio_sdk/disputes.py CHANGED
@@ -8,6 +8,7 @@ from moovio_sdk._hooks import HookContext
8
8
  from moovio_sdk.models import components, errors, operations
9
9
  from moovio_sdk.types import OptionalNullable, UNSET
10
10
  from moovio_sdk.utils import get_security_from_env
11
+ from moovio_sdk.utils.unmarshal_json_response import unmarshal_json_response
11
12
  from typing import Any, List, Mapping, Optional, Union
12
13
 
13
14
 
@@ -145,15 +146,11 @@ class Disputes(BaseSDK):
145
146
  response_data: Any = None
146
147
  if utils.match_response(http_res, "200", "application/json"):
147
148
  return operations.ListDisputesResponse(
148
- result=utils.unmarshal_json_response(
149
- List[components.Dispute], http_res
150
- ),
149
+ result=unmarshal_json_response(List[components.Dispute], http_res),
151
150
  headers=utils.get_response_headers(http_res.headers),
152
151
  )
153
152
  if utils.match_response(http_res, ["400", "409"], "application/json"):
154
- response_data = utils.unmarshal_json_response(
155
- errors.GenericErrorData, http_res
156
- )
153
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
157
154
  raise errors.GenericError(response_data, http_res)
158
155
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
159
156
  http_res_text = utils.stream_to_text(http_res)
@@ -297,15 +294,11 @@ class Disputes(BaseSDK):
297
294
  response_data: Any = None
298
295
  if utils.match_response(http_res, "200", "application/json"):
299
296
  return operations.ListDisputesResponse(
300
- result=utils.unmarshal_json_response(
301
- List[components.Dispute], http_res
302
- ),
297
+ result=unmarshal_json_response(List[components.Dispute], http_res),
303
298
  headers=utils.get_response_headers(http_res.headers),
304
299
  )
305
300
  if utils.match_response(http_res, ["400", "409"], "application/json"):
306
- response_data = utils.unmarshal_json_response(
307
- errors.GenericErrorData, http_res
308
- )
301
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
309
302
  raise errors.GenericError(response_data, http_res)
310
303
  if utils.match_response(http_res, ["401", "403", "429"], "*"):
311
304
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -405,7 +398,7 @@ class Disputes(BaseSDK):
405
398
 
406
399
  if utils.match_response(http_res, "200", "application/json"):
407
400
  return operations.GetDisputeResponse(
408
- result=utils.unmarshal_json_response(components.Dispute, http_res),
401
+ result=unmarshal_json_response(components.Dispute, http_res),
409
402
  headers=utils.get_response_headers(http_res.headers),
410
403
  )
411
404
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -506,7 +499,7 @@ class Disputes(BaseSDK):
506
499
 
507
500
  if utils.match_response(http_res, "200", "application/json"):
508
501
  return operations.GetDisputeResponse(
509
- result=utils.unmarshal_json_response(components.Dispute, http_res),
502
+ result=unmarshal_json_response(components.Dispute, http_res),
510
503
  headers=utils.get_response_headers(http_res.headers),
511
504
  )
512
505
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
@@ -619,13 +612,11 @@ class Disputes(BaseSDK):
619
612
  response_data: Any = None
620
613
  if utils.match_response(http_res, "200", "application/json"):
621
614
  return operations.AcceptDisputeResponse(
622
- result=utils.unmarshal_json_response(components.Dispute, http_res),
615
+ result=unmarshal_json_response(components.Dispute, http_res),
623
616
  headers=utils.get_response_headers(http_res.headers),
624
617
  )
625
618
  if utils.match_response(http_res, ["400", "409"], "application/json"):
626
- response_data = utils.unmarshal_json_response(
627
- errors.GenericErrorData, http_res
628
- )
619
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
629
620
  raise errors.GenericError(response_data, http_res)
630
621
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
631
622
  http_res_text = utils.stream_to_text(http_res)
@@ -737,13 +728,11 @@ class Disputes(BaseSDK):
737
728
  response_data: Any = None
738
729
  if utils.match_response(http_res, "200", "application/json"):
739
730
  return operations.AcceptDisputeResponse(
740
- result=utils.unmarshal_json_response(components.Dispute, http_res),
731
+ result=unmarshal_json_response(components.Dispute, http_res),
741
732
  headers=utils.get_response_headers(http_res.headers),
742
733
  )
743
734
  if utils.match_response(http_res, ["400", "409"], "application/json"):
744
- response_data = utils.unmarshal_json_response(
745
- errors.GenericErrorData, http_res
746
- )
735
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
747
736
  raise errors.GenericError(response_data, http_res)
748
737
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
749
738
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -843,7 +832,7 @@ class Disputes(BaseSDK):
843
832
 
844
833
  if utils.match_response(http_res, "200", "application/json"):
845
834
  return operations.ListDisputeEvidenceResponse(
846
- result=utils.unmarshal_json_response(
835
+ result=unmarshal_json_response(
847
836
  List[components.DisputeEvidenceResponse], http_res
848
837
  ),
849
838
  headers=utils.get_response_headers(http_res.headers),
@@ -946,7 +935,7 @@ class Disputes(BaseSDK):
946
935
 
947
936
  if utils.match_response(http_res, "200", "application/json"):
948
937
  return operations.ListDisputeEvidenceResponse(
949
- result=utils.unmarshal_json_response(
938
+ result=unmarshal_json_response(
950
939
  List[components.DisputeEvidenceResponse], http_res
951
940
  ),
952
941
  headers=utils.get_response_headers(http_res.headers),
@@ -1077,18 +1066,16 @@ class Disputes(BaseSDK):
1077
1066
  response_data: Any = None
1078
1067
  if utils.match_response(http_res, "201", "application/json"):
1079
1068
  return operations.UploadDisputeEvidenceFileResponse(
1080
- result=utils.unmarshal_json_response(
1069
+ result=unmarshal_json_response(
1081
1070
  components.EvidenceUploadResponse, http_res
1082
1071
  ),
1083
1072
  headers=utils.get_response_headers(http_res.headers),
1084
1073
  )
1085
1074
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1086
- response_data = utils.unmarshal_json_response(
1087
- errors.GenericErrorData, http_res
1088
- )
1075
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1089
1076
  raise errors.GenericError(response_data, http_res)
1090
1077
  if utils.match_response(http_res, "422", "application/json"):
1091
- response_data = utils.unmarshal_json_response(
1078
+ response_data = unmarshal_json_response(
1092
1079
  errors.FileUploadValidationErrorData, http_res
1093
1080
  )
1094
1081
  raise errors.FileUploadValidationError(response_data, http_res)
@@ -1218,18 +1205,16 @@ class Disputes(BaseSDK):
1218
1205
  response_data: Any = None
1219
1206
  if utils.match_response(http_res, "201", "application/json"):
1220
1207
  return operations.UploadDisputeEvidenceFileResponse(
1221
- result=utils.unmarshal_json_response(
1208
+ result=unmarshal_json_response(
1222
1209
  components.EvidenceUploadResponse, http_res
1223
1210
  ),
1224
1211
  headers=utils.get_response_headers(http_res.headers),
1225
1212
  )
1226
1213
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1227
- response_data = utils.unmarshal_json_response(
1228
- errors.GenericErrorData, http_res
1229
- )
1214
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1230
1215
  raise errors.GenericError(response_data, http_res)
1231
1216
  if utils.match_response(http_res, "422", "application/json"):
1232
- response_data = utils.unmarshal_json_response(
1217
+ response_data = unmarshal_json_response(
1233
1218
  errors.FileUploadValidationErrorData, http_res
1234
1219
  )
1235
1220
  raise errors.FileUploadValidationError(response_data, http_res)
@@ -1358,15 +1343,13 @@ class Disputes(BaseSDK):
1358
1343
  response_data: Any = None
1359
1344
  if utils.match_response(http_res, "201", "application/json"):
1360
1345
  return operations.UploadDisputeEvidenceTextResponse(
1361
- result=utils.unmarshal_json_response(
1346
+ result=unmarshal_json_response(
1362
1347
  components.EvidenceTextResponse, http_res
1363
1348
  ),
1364
1349
  headers=utils.get_response_headers(http_res.headers),
1365
1350
  )
1366
1351
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1367
- response_data = utils.unmarshal_json_response(
1368
- errors.GenericErrorData, http_res
1369
- )
1352
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1370
1353
  raise errors.GenericError(response_data, http_res)
1371
1354
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1372
1355
  http_res_text = utils.stream_to_text(http_res)
@@ -1493,15 +1476,13 @@ class Disputes(BaseSDK):
1493
1476
  response_data: Any = None
1494
1477
  if utils.match_response(http_res, "201", "application/json"):
1495
1478
  return operations.UploadDisputeEvidenceTextResponse(
1496
- result=utils.unmarshal_json_response(
1479
+ result=unmarshal_json_response(
1497
1480
  components.EvidenceTextResponse, http_res
1498
1481
  ),
1499
1482
  headers=utils.get_response_headers(http_res.headers),
1500
1483
  )
1501
1484
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1502
- response_data = utils.unmarshal_json_response(
1503
- errors.GenericErrorData, http_res
1504
- )
1485
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1505
1486
  raise errors.GenericError(response_data, http_res)
1506
1487
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1507
1488
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -1616,13 +1597,11 @@ class Disputes(BaseSDK):
1616
1597
  response_data: Any = None
1617
1598
  if utils.match_response(http_res, "200", "application/json"):
1618
1599
  return operations.SubmitDisputeEvidenceResponse(
1619
- result=utils.unmarshal_json_response(components.Dispute, http_res),
1600
+ result=unmarshal_json_response(components.Dispute, http_res),
1620
1601
  headers=utils.get_response_headers(http_res.headers),
1621
1602
  )
1622
1603
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1623
- response_data = utils.unmarshal_json_response(
1624
- errors.GenericErrorData, http_res
1625
- )
1604
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1626
1605
  raise errors.GenericError(response_data, http_res)
1627
1606
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1628
1607
  http_res_text = utils.stream_to_text(http_res)
@@ -1737,13 +1716,11 @@ class Disputes(BaseSDK):
1737
1716
  response_data: Any = None
1738
1717
  if utils.match_response(http_res, "200", "application/json"):
1739
1718
  return operations.SubmitDisputeEvidenceResponse(
1740
- result=utils.unmarshal_json_response(components.Dispute, http_res),
1719
+ result=unmarshal_json_response(components.Dispute, http_res),
1741
1720
  headers=utils.get_response_headers(http_res.headers),
1742
1721
  )
1743
1722
  if utils.match_response(http_res, ["400", "409"], "application/json"):
1744
- response_data = utils.unmarshal_json_response(
1745
- errors.GenericErrorData, http_res
1746
- )
1723
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
1747
1724
  raise errors.GenericError(response_data, http_res)
1748
1725
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
1749
1726
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -1846,7 +1823,7 @@ class Disputes(BaseSDK):
1846
1823
 
1847
1824
  if utils.match_response(http_res, "200", "application/json"):
1848
1825
  return operations.GetDisputeEvidenceResponse(
1849
- result=utils.unmarshal_json_response(
1826
+ result=unmarshal_json_response(
1850
1827
  components.DisputeEvidenceResponse, http_res
1851
1828
  ),
1852
1829
  headers=utils.get_response_headers(http_res.headers),
@@ -1952,7 +1929,7 @@ class Disputes(BaseSDK):
1952
1929
 
1953
1930
  if utils.match_response(http_res, "200", "application/json"):
1954
1931
  return operations.GetDisputeEvidenceResponse(
1955
- result=utils.unmarshal_json_response(
1932
+ result=unmarshal_json_response(
1956
1933
  components.DisputeEvidenceResponse, http_res
1957
1934
  ),
1958
1935
  headers=utils.get_response_headers(http_res.headers),
@@ -2080,15 +2057,13 @@ class Disputes(BaseSDK):
2080
2057
  response_data: Any = None
2081
2058
  if utils.match_response(http_res, "200", "application/json"):
2082
2059
  return operations.UpdateDisputeEvidenceResponse(
2083
- result=utils.unmarshal_json_response(
2060
+ result=unmarshal_json_response(
2084
2061
  components.DisputeEvidenceResponse, http_res
2085
2062
  ),
2086
2063
  headers=utils.get_response_headers(http_res.headers),
2087
2064
  )
2088
2065
  if utils.match_response(http_res, "400", "application/json"):
2089
- response_data = utils.unmarshal_json_response(
2090
- errors.GenericErrorData, http_res
2091
- )
2066
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2092
2067
  raise errors.GenericError(response_data, http_res)
2093
2068
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2094
2069
  http_res_text = utils.stream_to_text(http_res)
@@ -2213,15 +2188,13 @@ class Disputes(BaseSDK):
2213
2188
  response_data: Any = None
2214
2189
  if utils.match_response(http_res, "200", "application/json"):
2215
2190
  return operations.UpdateDisputeEvidenceResponse(
2216
- result=utils.unmarshal_json_response(
2191
+ result=unmarshal_json_response(
2217
2192
  components.DisputeEvidenceResponse, http_res
2218
2193
  ),
2219
2194
  headers=utils.get_response_headers(http_res.headers),
2220
2195
  )
2221
2196
  if utils.match_response(http_res, "400", "application/json"):
2222
- response_data = utils.unmarshal_json_response(
2223
- errors.GenericErrorData, http_res
2224
- )
2197
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2225
2198
  raise errors.GenericError(response_data, http_res)
2226
2199
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2227
2200
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -2338,9 +2311,7 @@ class Disputes(BaseSDK):
2338
2311
  headers=utils.get_response_headers(http_res.headers)
2339
2312
  )
2340
2313
  if utils.match_response(http_res, "409", "application/json"):
2341
- response_data = utils.unmarshal_json_response(
2342
- errors.GenericErrorData, http_res
2343
- )
2314
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2344
2315
  raise errors.GenericError(response_data, http_res)
2345
2316
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2346
2317
  http_res_text = utils.stream_to_text(http_res)
@@ -2457,9 +2428,7 @@ class Disputes(BaseSDK):
2457
2428
  headers=utils.get_response_headers(http_res.headers)
2458
2429
  )
2459
2430
  if utils.match_response(http_res, "409", "application/json"):
2460
- response_data = utils.unmarshal_json_response(
2461
- errors.GenericErrorData, http_res
2462
- )
2431
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
2463
2432
  raise errors.GenericError(response_data, http_res)
2464
2433
  if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
2465
2434
  http_res_text = await utils.stream_to_text_async(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 BaseModel, 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, cast
10
11
 
11
12
 
@@ -95,9 +96,7 @@ class EndToEndEncryption(BaseSDK):
95
96
  headers=utils.get_response_headers(http_res.headers)
96
97
  )
97
98
  if utils.match_response(http_res, "400", "application/json"):
98
- response_data = utils.unmarshal_json_response(
99
- errors.GenericErrorData, http_res
100
- )
99
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
101
100
  raise errors.GenericError(response_data, http_res)
102
101
  if utils.match_response(http_res, "429", "*"):
103
102
  http_res_text = utils.stream_to_text(http_res)
@@ -199,9 +198,7 @@ class EndToEndEncryption(BaseSDK):
199
198
  headers=utils.get_response_headers(http_res.headers)
200
199
  )
201
200
  if utils.match_response(http_res, "400", "application/json"):
202
- response_data = utils.unmarshal_json_response(
203
- errors.GenericErrorData, http_res
204
- )
201
+ response_data = unmarshal_json_response(errors.GenericErrorData, http_res)
205
202
  raise errors.GenericError(response_data, http_res)
206
203
  if utils.match_response(http_res, "429", "*"):
207
204
  http_res_text = await utils.stream_to_text_async(http_res)
@@ -296,7 +293,7 @@ class EndToEndEncryption(BaseSDK):
296
293
 
297
294
  if utils.match_response(http_res, "200", "application/json"):
298
295
  return operations.GenerateEndToEndKeyResponse(
299
- result=utils.unmarshal_json_response(components.JSONWebKey, http_res),
296
+ result=unmarshal_json_response(components.JSONWebKey, http_res),
300
297
  headers=utils.get_response_headers(http_res.headers),
301
298
  )
302
299
  if utils.match_response(http_res, "429", "*"):
@@ -389,7 +386,7 @@ class EndToEndEncryption(BaseSDK):
389
386
 
390
387
  if utils.match_response(http_res, "200", "application/json"):
391
388
  return operations.GenerateEndToEndKeyResponse(
392
- result=utils.unmarshal_json_response(components.JSONWebKey, http_res),
389
+ result=unmarshal_json_response(components.JSONWebKey, http_res),
393
390
  headers=utils.get_response_headers(http_res.headers),
394
391
  )
395
392
  if utils.match_response(http_res, "429", "*"):
@@ -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 Mapping, Optional
10
11
 
11
12
 
@@ -124,7 +125,7 @@ class EnrichedAddress(BaseSDK):
124
125
 
125
126
  if utils.match_response(http_res, "200", "application/json"):
126
127
  return operations.GetEnrichmentAddressResponse(
127
- result=utils.unmarshal_json_response(
128
+ result=unmarshal_json_response(
128
129
  components.EnrichedAddressResponse, http_res
129
130
  ),
130
131
  headers=utils.get_response_headers(http_res.headers),
@@ -258,7 +259,7 @@ class EnrichedAddress(BaseSDK):
258
259
 
259
260
  if utils.match_response(http_res, "200", "application/json"):
260
261
  return operations.GetEnrichmentAddressResponse(
261
- result=utils.unmarshal_json_response(
262
+ result=unmarshal_json_response(
262
263
  components.EnrichedAddressResponse, http_res
263
264
  ),
264
265
  headers=utils.get_response_headers(http_res.headers),