moovio_sdk 0.9.0__py3-none-any.whl → 0.11.0__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 (50) hide show
  1. moovio_sdk/_hooks/types.py +7 -0
  2. moovio_sdk/_version.py +3 -3
  3. moovio_sdk/account_terminal_applications.py +8 -0
  4. moovio_sdk/accounts.py +18 -0
  5. moovio_sdk/adjustments.py +4 -0
  6. moovio_sdk/apple_pay.py +10 -0
  7. moovio_sdk/authentication.py +4 -0
  8. moovio_sdk/avatars.py +2 -0
  9. moovio_sdk/bank_accounts.py +18 -0
  10. moovio_sdk/basesdk.py +12 -20
  11. moovio_sdk/branding.py +8 -0
  12. moovio_sdk/capabilities.py +8 -0
  13. moovio_sdk/card_issuing.py +10 -0
  14. moovio_sdk/cards.py +10 -0
  15. moovio_sdk/disputes.py +22 -0
  16. moovio_sdk/end_to_end_encryption.py +4 -0
  17. moovio_sdk/enriched_address.py +2 -0
  18. moovio_sdk/enriched_profile.py +2 -0
  19. moovio_sdk/fee_plans.py +14 -0
  20. moovio_sdk/files.py +6 -0
  21. moovio_sdk/httpclient.py +7 -37
  22. moovio_sdk/industries.py +2 -0
  23. moovio_sdk/institutions.py +2 -0
  24. moovio_sdk/issuing_transactions.py +10 -0
  25. moovio_sdk/models/__init__.py +0 -1
  26. moovio_sdk/models/components/__init__.py +1804 -845
  27. moovio_sdk/models/components/sweep.py +7 -1
  28. moovio_sdk/models/components/sweepsubtotal.py +27 -0
  29. moovio_sdk/models/errors/__init__.py +193 -77
  30. moovio_sdk/models/internal/__init__.py +35 -1
  31. moovio_sdk/models/operations/__init__.py +1908 -1073
  32. moovio_sdk/onboarding.py +8 -0
  33. moovio_sdk/payment_links.py +12 -0
  34. moovio_sdk/payment_methods.py +4 -0
  35. moovio_sdk/ping.py +2 -0
  36. moovio_sdk/receipts.py +4 -0
  37. moovio_sdk/representatives.py +10 -0
  38. moovio_sdk/scheduling.py +12 -0
  39. moovio_sdk/sdk.py +145 -107
  40. moovio_sdk/sdkconfiguration.py +0 -7
  41. moovio_sdk/sweeps.py +12 -0
  42. moovio_sdk/terminal_applications.py +8 -0
  43. moovio_sdk/transfers.py +22 -0
  44. moovio_sdk/underwriting.py +4 -0
  45. moovio_sdk/utils/__init__.py +131 -46
  46. moovio_sdk/wallet_transactions.py +4 -0
  47. moovio_sdk/wallets.py +4 -0
  48. {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/METADATA +46 -376
  49. {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/RECORD +50 -49
  50. {moovio_sdk-0.9.0.dist-info → moovio_sdk-0.11.0.dist-info}/WHEEL +0 -0
moovio_sdk/httpclient.py CHANGED
@@ -115,42 +115,12 @@ def close_clients(
115
115
  pass
116
116
 
117
117
  if async_client is not None and not async_client_supplied:
118
- # First, try the simplest approach - use asyncio.run()
119
- # This works when we're not in an async context
120
118
  try:
121
- asyncio.run(async_client.aclose())
122
- except RuntimeError as e:
123
- # If we get "RuntimeError: This event loop is already running",
124
- # it means we're in an async context
125
- if "already running" in str(e):
126
- try:
127
- # We're in an async context, so get the running loop
128
- loop = asyncio.get_running_loop()
129
- # Create a task but don't wait for it
130
- loop.create_task(async_client.aclose())
131
- except Exception:
132
- # If we can't get the loop or create a task, just ignore
133
- # The GC will eventually clean up the resources
134
- pass
135
- # If we get "RuntimeError: There is no current event loop in thread",
136
- # we're not in an async context, but asyncio.run() failed for some reason
137
- # In this case, we can try to create a new event loop explicitly
138
- elif "no current event loop" in str(e):
139
- try:
140
- # Create a new event loop and run the coroutine
141
- loop = asyncio.new_event_loop()
142
- asyncio.set_event_loop(loop)
143
- try:
144
- loop.run_until_complete(async_client.aclose())
145
- finally:
146
- loop.close()
147
- asyncio.set_event_loop(None)
148
- except Exception:
149
- # If this also fails, just ignore
150
- pass
151
- # For any other RuntimeError, just ignore
152
- else:
119
+ loop = asyncio.get_running_loop()
120
+ asyncio.run_coroutine_threadsafe(async_client.aclose(), loop)
121
+ except RuntimeError:
122
+ try:
123
+ asyncio.run(async_client.aclose())
124
+ except RuntimeError:
125
+ # best effort
153
126
  pass
154
- except Exception:
155
- # For any other exception, just ignore
156
- pass
moovio_sdk/industries.py CHANGED
@@ -75,6 +75,7 @@ class Industries(BaseSDK):
75
75
 
76
76
  http_res = self.do_request(
77
77
  hook_ctx=HookContext(
78
+ config=self.sdk_configuration,
78
79
  base_url=base_url or "",
79
80
  operation_id="listIndustries",
80
81
  oauth2_scopes=[],
@@ -189,6 +190,7 @@ class Industries(BaseSDK):
189
190
 
190
191
  http_res = await self.do_request_async(
191
192
  hook_ctx=HookContext(
193
+ config=self.sdk_configuration,
192
194
  base_url=base_url or "",
193
195
  operation_id="listIndustries",
194
196
  oauth2_scopes=[],
@@ -82,6 +82,7 @@ class Institutions(BaseSDK):
82
82
 
83
83
  http_res = self.do_request(
84
84
  hook_ctx=HookContext(
85
+ config=self.sdk_configuration,
85
86
  base_url=base_url or "",
86
87
  operation_id="listInstitutions",
87
88
  oauth2_scopes=[],
@@ -207,6 +208,7 @@ class Institutions(BaseSDK):
207
208
 
208
209
  http_res = await self.do_request_async(
209
210
  hook_ctx=HookContext(
211
+ config=self.sdk_configuration,
210
212
  base_url=base_url or "",
211
213
  operation_id="listInstitutions",
212
214
  oauth2_scopes=[],
@@ -92,6 +92,7 @@ class IssuingTransactions(BaseSDK):
92
92
 
93
93
  http_res = self.do_request(
94
94
  hook_ctx=HookContext(
95
+ config=self.sdk_configuration,
95
96
  base_url=base_url or "",
96
97
  operation_id="listIssuedCardAuthorizations",
97
98
  oauth2_scopes=[],
@@ -222,6 +223,7 @@ class IssuingTransactions(BaseSDK):
222
223
 
223
224
  http_res = await self.do_request_async(
224
225
  hook_ctx=HookContext(
226
+ config=self.sdk_configuration,
225
227
  base_url=base_url or "",
226
228
  operation_id="listIssuedCardAuthorizations",
227
229
  oauth2_scopes=[],
@@ -337,6 +339,7 @@ class IssuingTransactions(BaseSDK):
337
339
 
338
340
  http_res = self.do_request(
339
341
  hook_ctx=HookContext(
342
+ config=self.sdk_configuration,
340
343
  base_url=base_url or "",
341
344
  operation_id="getIssuedCardAuthorization",
342
345
  oauth2_scopes=[],
@@ -452,6 +455,7 @@ class IssuingTransactions(BaseSDK):
452
455
 
453
456
  http_res = await self.do_request_async(
454
457
  hook_ctx=HookContext(
458
+ config=self.sdk_configuration,
455
459
  base_url=base_url or "",
456
460
  operation_id="getIssuedCardAuthorization",
457
461
  oauth2_scopes=[],
@@ -573,6 +577,7 @@ class IssuingTransactions(BaseSDK):
573
577
 
574
578
  http_res = self.do_request(
575
579
  hook_ctx=HookContext(
580
+ config=self.sdk_configuration,
576
581
  base_url=base_url or "",
577
582
  operation_id="listIssuedCardAuthorizationEvents",
578
583
  oauth2_scopes=[],
@@ -694,6 +699,7 @@ class IssuingTransactions(BaseSDK):
694
699
 
695
700
  http_res = await self.do_request_async(
696
701
  hook_ctx=HookContext(
702
+ config=self.sdk_configuration,
697
703
  base_url=base_url or "",
698
704
  operation_id="listIssuedCardAuthorizationEvents",
699
705
  oauth2_scopes=[],
@@ -821,6 +827,7 @@ class IssuingTransactions(BaseSDK):
821
827
 
822
828
  http_res = self.do_request(
823
829
  hook_ctx=HookContext(
830
+ config=self.sdk_configuration,
824
831
  base_url=base_url or "",
825
832
  operation_id="listIssuedCardTransactions",
826
833
  oauth2_scopes=[],
@@ -948,6 +955,7 @@ class IssuingTransactions(BaseSDK):
948
955
 
949
956
  http_res = await self.do_request_async(
950
957
  hook_ctx=HookContext(
958
+ config=self.sdk_configuration,
951
959
  base_url=base_url or "",
952
960
  operation_id="listIssuedCardTransactions",
953
961
  oauth2_scopes=[],
@@ -1063,6 +1071,7 @@ class IssuingTransactions(BaseSDK):
1063
1071
 
1064
1072
  http_res = self.do_request(
1065
1073
  hook_ctx=HookContext(
1074
+ config=self.sdk_configuration,
1066
1075
  base_url=base_url or "",
1067
1076
  operation_id="getIssuedCardTransaction",
1068
1077
  oauth2_scopes=[],
@@ -1178,6 +1187,7 @@ class IssuingTransactions(BaseSDK):
1178
1187
 
1179
1188
  http_res = await self.do_request_async(
1180
1189
  hook_ctx=HookContext(
1190
+ config=self.sdk_configuration,
1181
1191
  base_url=base_url or "",
1182
1192
  operation_id="getIssuedCardTransaction",
1183
1193
  oauth2_scopes=[],
@@ -1,4 +1,3 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  # package
4
-