moovio_sdk 0.8.2__py3-none-any.whl → 0.10.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.
- moovio_sdk/_version.py +3 -3
- moovio_sdk/cards.py +4 -4
- moovio_sdk/httpclient.py +6 -16
- moovio_sdk/models/__init__.py +0 -1
- moovio_sdk/models/components/__init__.py +1804 -845
- moovio_sdk/models/components/sweep.py +7 -1
- moovio_sdk/models/components/sweepsubtotal.py +27 -0
- moovio_sdk/models/errors/__init__.py +193 -77
- moovio_sdk/models/internal/__init__.py +35 -1
- moovio_sdk/models/operations/__init__.py +1908 -1073
- moovio_sdk/models/operations/createtransfer.py +2 -2
- moovio_sdk/sdk.py +142 -104
- moovio_sdk/transfers.py +2 -2
- moovio_sdk/utils/__init__.py +131 -46
- {moovio_sdk-0.8.2.dist-info → moovio_sdk-0.10.0.dist-info}/METADATA +46 -378
- {moovio_sdk-0.8.2.dist-info → moovio_sdk-0.10.0.dist-info}/RECORD +17 -16
- {moovio_sdk-0.8.2.dist-info → moovio_sdk-0.10.0.dist-info}/WHEEL +0 -0
moovio_sdk/_version.py
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
import importlib.metadata
|
4
4
|
|
5
5
|
__title__: str = "moovio_sdk"
|
6
|
-
__version__: str = "0.
|
6
|
+
__version__: str = "0.10.0"
|
7
7
|
__openapi_doc_version__: str = "latest"
|
8
|
-
__gen_version__: str = "2.
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.
|
8
|
+
__gen_version__: str = "2.610.0"
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.10.0 2.610.0 latest moovio_sdk"
|
10
10
|
|
11
11
|
try:
|
12
12
|
if __package__ is not None:
|
moovio_sdk/cards.py
CHANGED
@@ -160,7 +160,7 @@ class Cards(BaseSDK):
|
|
160
160
|
result=utils.unmarshal_json(http_res.text, components.Card),
|
161
161
|
headers=utils.get_response_headers(http_res.headers),
|
162
162
|
)
|
163
|
-
if utils.match_response(http_res,
|
163
|
+
if utils.match_response(http_res, "400", "application/json"):
|
164
164
|
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
165
165
|
raise errors.GenericError(data=response_data)
|
166
166
|
if utils.match_response(http_res, "422", "application/json"):
|
@@ -168,7 +168,7 @@ class Cards(BaseSDK):
|
|
168
168
|
http_res.text, errors.LinkCardErrorData
|
169
169
|
)
|
170
170
|
raise errors.LinkCardError(data=response_data)
|
171
|
-
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
171
|
+
if utils.match_response(http_res, ["401", "403", "404", "409", "429"], "*"):
|
172
172
|
http_res_text = utils.stream_to_text(http_res)
|
173
173
|
raise errors.APIError(
|
174
174
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -348,7 +348,7 @@ class Cards(BaseSDK):
|
|
348
348
|
result=utils.unmarshal_json(http_res.text, components.Card),
|
349
349
|
headers=utils.get_response_headers(http_res.headers),
|
350
350
|
)
|
351
|
-
if utils.match_response(http_res,
|
351
|
+
if utils.match_response(http_res, "400", "application/json"):
|
352
352
|
response_data = utils.unmarshal_json(http_res.text, errors.GenericErrorData)
|
353
353
|
raise errors.GenericError(data=response_data)
|
354
354
|
if utils.match_response(http_res, "422", "application/json"):
|
@@ -356,7 +356,7 @@ class Cards(BaseSDK):
|
|
356
356
|
http_res.text, errors.LinkCardErrorData
|
357
357
|
)
|
358
358
|
raise errors.LinkCardError(data=response_data)
|
359
|
-
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
359
|
+
if utils.match_response(http_res, ["401", "403", "404", "409", "429"], "*"):
|
360
360
|
http_res_text = await utils.stream_to_text_async(http_res)
|
361
361
|
raise errors.APIError(
|
362
362
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
moovio_sdk/httpclient.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
# pyright: reportReturnType = false
|
4
4
|
import asyncio
|
5
|
-
from concurrent.futures import ThreadPoolExecutor
|
6
5
|
from typing_extensions import Protocol, runtime_checkable
|
7
6
|
import httpx
|
8
7
|
from typing import Any, Optional, Union
|
@@ -116,21 +115,12 @@ def close_clients(
|
|
116
115
|
pass
|
117
116
|
|
118
117
|
if async_client is not None and not async_client_supplied:
|
119
|
-
is_async = False
|
120
118
|
try:
|
121
|
-
asyncio.get_running_loop()
|
122
|
-
|
119
|
+
loop = asyncio.get_running_loop()
|
120
|
+
asyncio.run_coroutine_threadsafe(async_client.aclose(), loop)
|
123
121
|
except RuntimeError:
|
124
|
-
|
125
|
-
|
126
|
-
try:
|
127
|
-
# If this function is called in an async loop then start another
|
128
|
-
# loop in a separate thread to close the async http client.
|
129
|
-
if is_async:
|
130
|
-
with ThreadPoolExecutor(max_workers=1) as executor:
|
131
|
-
future = executor.submit(asyncio.run, async_client.aclose())
|
132
|
-
future.result()
|
133
|
-
else:
|
122
|
+
try:
|
134
123
|
asyncio.run(async_client.aclose())
|
135
|
-
|
136
|
-
|
124
|
+
except RuntimeError:
|
125
|
+
# best effort
|
126
|
+
pass
|
moovio_sdk/models/__init__.py
CHANGED