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
@@ -0,0 +1,81 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from moovio_sdk.models.components import ticket as components_ticket
|
5
|
+
from moovio_sdk.types import BaseModel
|
6
|
+
from moovio_sdk.utils import (
|
7
|
+
FieldMetadata,
|
8
|
+
HeaderMetadata,
|
9
|
+
PathParamMetadata,
|
10
|
+
QueryParamMetadata,
|
11
|
+
)
|
12
|
+
import pydantic
|
13
|
+
from typing import Dict, List, Optional
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
15
|
+
|
16
|
+
|
17
|
+
class ListTicketsGlobalsTypedDict(TypedDict):
|
18
|
+
x_moov_version: NotRequired[str]
|
19
|
+
r"""Specify an API version.
|
20
|
+
|
21
|
+
API versioning follows the format `vYYYY.QQ.BB`, where
|
22
|
+
- `YYYY` is the year
|
23
|
+
- `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
24
|
+
- `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
25
|
+
- For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
26
|
+
|
27
|
+
The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
28
|
+
"""
|
29
|
+
|
30
|
+
|
31
|
+
class ListTicketsGlobals(BaseModel):
|
32
|
+
x_moov_version: Annotated[
|
33
|
+
Optional[str],
|
34
|
+
pydantic.Field(alias="x-moov-version"),
|
35
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
36
|
+
] = "v2024.01.00"
|
37
|
+
r"""Specify an API version.
|
38
|
+
|
39
|
+
API versioning follows the format `vYYYY.QQ.BB`, where
|
40
|
+
- `YYYY` is the year
|
41
|
+
- `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
42
|
+
- `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
43
|
+
- For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
44
|
+
|
45
|
+
The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
46
|
+
"""
|
47
|
+
|
48
|
+
|
49
|
+
class ListTicketsRequestTypedDict(TypedDict):
|
50
|
+
account_id: str
|
51
|
+
skip: NotRequired[int]
|
52
|
+
count: NotRequired[int]
|
53
|
+
|
54
|
+
|
55
|
+
class ListTicketsRequest(BaseModel):
|
56
|
+
account_id: Annotated[
|
57
|
+
str,
|
58
|
+
pydantic.Field(alias="accountID"),
|
59
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
60
|
+
]
|
61
|
+
|
62
|
+
skip: Annotated[
|
63
|
+
Optional[int],
|
64
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
|
65
|
+
] = None
|
66
|
+
|
67
|
+
count: Annotated[
|
68
|
+
Optional[int],
|
69
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
|
70
|
+
] = None
|
71
|
+
|
72
|
+
|
73
|
+
class ListTicketsResponseTypedDict(TypedDict):
|
74
|
+
headers: Dict[str, List[str]]
|
75
|
+
result: List[components_ticket.TicketTypedDict]
|
76
|
+
|
77
|
+
|
78
|
+
class ListTicketsResponse(BaseModel):
|
79
|
+
headers: Dict[str, List[str]]
|
80
|
+
|
81
|
+
result: List[components_ticket.Ticket]
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from moovio_sdk.models.components import (
|
5
|
+
ticket as components_ticket,
|
6
|
+
updateticket as components_updateticket,
|
7
|
+
)
|
8
|
+
from moovio_sdk.types import BaseModel
|
9
|
+
from moovio_sdk.utils import (
|
10
|
+
FieldMetadata,
|
11
|
+
HeaderMetadata,
|
12
|
+
PathParamMetadata,
|
13
|
+
RequestMetadata,
|
14
|
+
)
|
15
|
+
import pydantic
|
16
|
+
from typing import Dict, List, Optional
|
17
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
18
|
+
|
19
|
+
|
20
|
+
class UpdateTicketGlobalsTypedDict(TypedDict):
|
21
|
+
x_moov_version: NotRequired[str]
|
22
|
+
r"""Specify an API version.
|
23
|
+
|
24
|
+
API versioning follows the format `vYYYY.QQ.BB`, where
|
25
|
+
- `YYYY` is the year
|
26
|
+
- `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
27
|
+
- `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
28
|
+
- For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
29
|
+
|
30
|
+
The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
31
|
+
"""
|
32
|
+
|
33
|
+
|
34
|
+
class UpdateTicketGlobals(BaseModel):
|
35
|
+
x_moov_version: Annotated[
|
36
|
+
Optional[str],
|
37
|
+
pydantic.Field(alias="x-moov-version"),
|
38
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
39
|
+
] = "v2024.01.00"
|
40
|
+
r"""Specify an API version.
|
41
|
+
|
42
|
+
API versioning follows the format `vYYYY.QQ.BB`, where
|
43
|
+
- `YYYY` is the year
|
44
|
+
- `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
45
|
+
- `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
46
|
+
- For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
47
|
+
|
48
|
+
The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
49
|
+
"""
|
50
|
+
|
51
|
+
|
52
|
+
class UpdateTicketRequestTypedDict(TypedDict):
|
53
|
+
account_id: str
|
54
|
+
ticket_id: str
|
55
|
+
update_ticket: components_updateticket.UpdateTicketTypedDict
|
56
|
+
|
57
|
+
|
58
|
+
class UpdateTicketRequest(BaseModel):
|
59
|
+
account_id: Annotated[
|
60
|
+
str,
|
61
|
+
pydantic.Field(alias="accountID"),
|
62
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
63
|
+
]
|
64
|
+
|
65
|
+
ticket_id: Annotated[
|
66
|
+
str,
|
67
|
+
pydantic.Field(alias="ticketID"),
|
68
|
+
FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
|
69
|
+
]
|
70
|
+
|
71
|
+
update_ticket: Annotated[
|
72
|
+
components_updateticket.UpdateTicket,
|
73
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
74
|
+
]
|
75
|
+
|
76
|
+
|
77
|
+
class UpdateTicketResponseTypedDict(TypedDict):
|
78
|
+
headers: Dict[str, List[str]]
|
79
|
+
result: components_ticket.TicketTypedDict
|
80
|
+
|
81
|
+
|
82
|
+
class UpdateTicketResponse(BaseModel):
|
83
|
+
headers: Dict[str, List[str]]
|
84
|
+
|
85
|
+
result: components_ticket.Ticket
|
moovio_sdk/onboarding.py
CHANGED
@@ -123,46 +123,35 @@ class Onboarding(BaseSDK):
|
|
123
123
|
response_data: Any = None
|
124
124
|
if utils.match_response(http_res, "200", "application/json"):
|
125
125
|
return operations.CreateOnboardingInviteResponse(
|
126
|
-
result=utils.
|
126
|
+
result=utils.unmarshal_json_response(
|
127
|
+
components.OnboardingInvite, http_res
|
128
|
+
),
|
127
129
|
headers=utils.get_response_headers(http_res.headers),
|
128
130
|
)
|
129
131
|
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
130
|
-
response_data = utils.
|
131
|
-
|
132
|
+
response_data = utils.unmarshal_json_response(
|
133
|
+
errors.GenericErrorData, http_res
|
134
|
+
)
|
135
|
+
raise errors.GenericError(response_data, http_res)
|
132
136
|
if utils.match_response(http_res, "422", "application/json"):
|
133
|
-
response_data = utils.
|
134
|
-
|
137
|
+
response_data = utils.unmarshal_json_response(
|
138
|
+
errors.OnboardingInviteErrorData, http_res
|
135
139
|
)
|
136
|
-
raise errors.OnboardingInviteError(
|
140
|
+
raise errors.OnboardingInviteError(response_data, http_res)
|
137
141
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
138
142
|
http_res_text = utils.stream_to_text(http_res)
|
139
|
-
raise errors.APIError(
|
140
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
141
|
-
)
|
143
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
142
144
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
143
145
|
http_res_text = utils.stream_to_text(http_res)
|
144
|
-
raise errors.APIError(
|
145
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
146
|
-
)
|
146
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
147
147
|
if utils.match_response(http_res, "4XX", "*"):
|
148
148
|
http_res_text = utils.stream_to_text(http_res)
|
149
|
-
raise errors.APIError(
|
150
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
151
|
-
)
|
149
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
152
150
|
if utils.match_response(http_res, "5XX", "*"):
|
153
151
|
http_res_text = utils.stream_to_text(http_res)
|
154
|
-
raise errors.APIError(
|
155
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
156
|
-
)
|
152
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
157
153
|
|
158
|
-
|
159
|
-
http_res_text = utils.stream_to_text(http_res)
|
160
|
-
raise errors.APIError(
|
161
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
162
|
-
http_res.status_code,
|
163
|
-
http_res_text,
|
164
|
-
http_res,
|
165
|
-
)
|
154
|
+
raise errors.APIError("Unexpected response received", http_res)
|
166
155
|
|
167
156
|
async def create_invite_async(
|
168
157
|
self,
|
@@ -277,46 +266,35 @@ class Onboarding(BaseSDK):
|
|
277
266
|
response_data: Any = None
|
278
267
|
if utils.match_response(http_res, "200", "application/json"):
|
279
268
|
return operations.CreateOnboardingInviteResponse(
|
280
|
-
result=utils.
|
269
|
+
result=utils.unmarshal_json_response(
|
270
|
+
components.OnboardingInvite, http_res
|
271
|
+
),
|
281
272
|
headers=utils.get_response_headers(http_res.headers),
|
282
273
|
)
|
283
274
|
if utils.match_response(http_res, ["400", "409"], "application/json"):
|
284
|
-
response_data = utils.
|
285
|
-
|
275
|
+
response_data = utils.unmarshal_json_response(
|
276
|
+
errors.GenericErrorData, http_res
|
277
|
+
)
|
278
|
+
raise errors.GenericError(response_data, http_res)
|
286
279
|
if utils.match_response(http_res, "422", "application/json"):
|
287
|
-
response_data = utils.
|
288
|
-
|
280
|
+
response_data = utils.unmarshal_json_response(
|
281
|
+
errors.OnboardingInviteErrorData, http_res
|
289
282
|
)
|
290
|
-
raise errors.OnboardingInviteError(
|
283
|
+
raise errors.OnboardingInviteError(response_data, http_res)
|
291
284
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
292
285
|
http_res_text = await utils.stream_to_text_async(http_res)
|
293
|
-
raise errors.APIError(
|
294
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
295
|
-
)
|
286
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
296
287
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
297
288
|
http_res_text = await utils.stream_to_text_async(http_res)
|
298
|
-
raise errors.APIError(
|
299
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
300
|
-
)
|
289
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
301
290
|
if utils.match_response(http_res, "4XX", "*"):
|
302
291
|
http_res_text = await utils.stream_to_text_async(http_res)
|
303
|
-
raise errors.APIError(
|
304
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
305
|
-
)
|
292
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
306
293
|
if utils.match_response(http_res, "5XX", "*"):
|
307
294
|
http_res_text = await utils.stream_to_text_async(http_res)
|
308
|
-
raise errors.APIError(
|
309
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
310
|
-
)
|
295
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
311
296
|
|
312
|
-
|
313
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
314
|
-
raise errors.APIError(
|
315
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
316
|
-
http_res.status_code,
|
317
|
-
http_res_text,
|
318
|
-
http_res,
|
319
|
-
)
|
297
|
+
raise errors.APIError("Unexpected response received", http_res)
|
320
298
|
|
321
299
|
def list_invites(
|
322
300
|
self,
|
@@ -399,40 +377,25 @@ class Onboarding(BaseSDK):
|
|
399
377
|
|
400
378
|
if utils.match_response(http_res, "200", "application/json"):
|
401
379
|
return operations.ListOnboardingInvitesResponse(
|
402
|
-
result=utils.
|
403
|
-
|
380
|
+
result=utils.unmarshal_json_response(
|
381
|
+
List[components.OnboardingInvite], http_res
|
404
382
|
),
|
405
383
|
headers=utils.get_response_headers(http_res.headers),
|
406
384
|
)
|
407
385
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
408
386
|
http_res_text = utils.stream_to_text(http_res)
|
409
|
-
raise errors.APIError(
|
410
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
411
|
-
)
|
387
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
412
388
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
413
389
|
http_res_text = utils.stream_to_text(http_res)
|
414
|
-
raise errors.APIError(
|
415
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
416
|
-
)
|
390
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
417
391
|
if utils.match_response(http_res, "4XX", "*"):
|
418
392
|
http_res_text = utils.stream_to_text(http_res)
|
419
|
-
raise errors.APIError(
|
420
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
421
|
-
)
|
393
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
422
394
|
if utils.match_response(http_res, "5XX", "*"):
|
423
395
|
http_res_text = utils.stream_to_text(http_res)
|
424
|
-
raise errors.APIError(
|
425
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
426
|
-
)
|
396
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
427
397
|
|
428
|
-
|
429
|
-
http_res_text = utils.stream_to_text(http_res)
|
430
|
-
raise errors.APIError(
|
431
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
432
|
-
http_res.status_code,
|
433
|
-
http_res_text,
|
434
|
-
http_res,
|
435
|
-
)
|
398
|
+
raise errors.APIError("Unexpected response received", http_res)
|
436
399
|
|
437
400
|
async def list_invites_async(
|
438
401
|
self,
|
@@ -515,40 +478,25 @@ class Onboarding(BaseSDK):
|
|
515
478
|
|
516
479
|
if utils.match_response(http_res, "200", "application/json"):
|
517
480
|
return operations.ListOnboardingInvitesResponse(
|
518
|
-
result=utils.
|
519
|
-
|
481
|
+
result=utils.unmarshal_json_response(
|
482
|
+
List[components.OnboardingInvite], http_res
|
520
483
|
),
|
521
484
|
headers=utils.get_response_headers(http_res.headers),
|
522
485
|
)
|
523
486
|
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
524
487
|
http_res_text = await utils.stream_to_text_async(http_res)
|
525
|
-
raise errors.APIError(
|
526
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
527
|
-
)
|
488
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
528
489
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
529
490
|
http_res_text = await utils.stream_to_text_async(http_res)
|
530
|
-
raise errors.APIError(
|
531
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
532
|
-
)
|
491
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
533
492
|
if utils.match_response(http_res, "4XX", "*"):
|
534
493
|
http_res_text = await utils.stream_to_text_async(http_res)
|
535
|
-
raise errors.APIError(
|
536
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
537
|
-
)
|
494
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
538
495
|
if utils.match_response(http_res, "5XX", "*"):
|
539
496
|
http_res_text = await utils.stream_to_text_async(http_res)
|
540
|
-
raise errors.APIError(
|
541
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
542
|
-
)
|
497
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
543
498
|
|
544
|
-
|
545
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
546
|
-
raise errors.APIError(
|
547
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
548
|
-
http_res.status_code,
|
549
|
-
http_res_text,
|
550
|
-
http_res,
|
551
|
-
)
|
499
|
+
raise errors.APIError("Unexpected response received", http_res)
|
552
500
|
|
553
501
|
def get_invite(
|
554
502
|
self,
|
@@ -628,38 +576,25 @@ class Onboarding(BaseSDK):
|
|
628
576
|
|
629
577
|
if utils.match_response(http_res, "200", "application/json"):
|
630
578
|
return operations.GetOnboardingInviteResponse(
|
631
|
-
result=utils.
|
579
|
+
result=utils.unmarshal_json_response(
|
580
|
+
components.OnboardingInvite, http_res
|
581
|
+
),
|
632
582
|
headers=utils.get_response_headers(http_res.headers),
|
633
583
|
)
|
634
584
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
635
585
|
http_res_text = utils.stream_to_text(http_res)
|
636
|
-
raise errors.APIError(
|
637
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
638
|
-
)
|
586
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
639
587
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
640
588
|
http_res_text = utils.stream_to_text(http_res)
|
641
|
-
raise errors.APIError(
|
642
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
643
|
-
)
|
589
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
644
590
|
if utils.match_response(http_res, "4XX", "*"):
|
645
591
|
http_res_text = utils.stream_to_text(http_res)
|
646
|
-
raise errors.APIError(
|
647
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
648
|
-
)
|
592
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
649
593
|
if utils.match_response(http_res, "5XX", "*"):
|
650
594
|
http_res_text = utils.stream_to_text(http_res)
|
651
|
-
raise errors.APIError(
|
652
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
653
|
-
)
|
595
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
654
596
|
|
655
|
-
|
656
|
-
http_res_text = utils.stream_to_text(http_res)
|
657
|
-
raise errors.APIError(
|
658
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
659
|
-
http_res.status_code,
|
660
|
-
http_res_text,
|
661
|
-
http_res,
|
662
|
-
)
|
597
|
+
raise errors.APIError("Unexpected response received", http_res)
|
663
598
|
|
664
599
|
async def get_invite_async(
|
665
600
|
self,
|
@@ -739,38 +674,25 @@ class Onboarding(BaseSDK):
|
|
739
674
|
|
740
675
|
if utils.match_response(http_res, "200", "application/json"):
|
741
676
|
return operations.GetOnboardingInviteResponse(
|
742
|
-
result=utils.
|
677
|
+
result=utils.unmarshal_json_response(
|
678
|
+
components.OnboardingInvite, http_res
|
679
|
+
),
|
743
680
|
headers=utils.get_response_headers(http_res.headers),
|
744
681
|
)
|
745
682
|
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
746
683
|
http_res_text = await utils.stream_to_text_async(http_res)
|
747
|
-
raise errors.APIError(
|
748
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
749
|
-
)
|
684
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
750
685
|
if utils.match_response(http_res, ["500", "504"], "*"):
|
751
686
|
http_res_text = await utils.stream_to_text_async(http_res)
|
752
|
-
raise errors.APIError(
|
753
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
754
|
-
)
|
687
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
755
688
|
if utils.match_response(http_res, "4XX", "*"):
|
756
689
|
http_res_text = await utils.stream_to_text_async(http_res)
|
757
|
-
raise errors.APIError(
|
758
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
759
|
-
)
|
690
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
760
691
|
if utils.match_response(http_res, "5XX", "*"):
|
761
692
|
http_res_text = await utils.stream_to_text_async(http_res)
|
762
|
-
raise errors.APIError(
|
763
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
764
|
-
)
|
693
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
765
694
|
|
766
|
-
|
767
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
768
|
-
raise errors.APIError(
|
769
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
770
|
-
http_res.status_code,
|
771
|
-
http_res_text,
|
772
|
-
http_res,
|
773
|
-
)
|
695
|
+
raise errors.APIError("Unexpected response received", http_res)
|
774
696
|
|
775
697
|
def revoke_invite(
|
776
698
|
self,
|
@@ -854,23 +776,12 @@ class Onboarding(BaseSDK):
|
|
854
776
|
)
|
855
777
|
if utils.match_response(http_res, "4XX", "*"):
|
856
778
|
http_res_text = utils.stream_to_text(http_res)
|
857
|
-
raise errors.APIError(
|
858
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
859
|
-
)
|
779
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
860
780
|
if utils.match_response(http_res, "5XX", "*"):
|
861
781
|
http_res_text = utils.stream_to_text(http_res)
|
862
|
-
raise errors.APIError(
|
863
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
864
|
-
)
|
782
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
865
783
|
|
866
|
-
|
867
|
-
http_res_text = utils.stream_to_text(http_res)
|
868
|
-
raise errors.APIError(
|
869
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
870
|
-
http_res.status_code,
|
871
|
-
http_res_text,
|
872
|
-
http_res,
|
873
|
-
)
|
784
|
+
raise errors.APIError("Unexpected response received", http_res)
|
874
785
|
|
875
786
|
async def revoke_invite_async(
|
876
787
|
self,
|
@@ -954,20 +865,9 @@ class Onboarding(BaseSDK):
|
|
954
865
|
)
|
955
866
|
if utils.match_response(http_res, "4XX", "*"):
|
956
867
|
http_res_text = await utils.stream_to_text_async(http_res)
|
957
|
-
raise errors.APIError(
|
958
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
959
|
-
)
|
868
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
960
869
|
if utils.match_response(http_res, "5XX", "*"):
|
961
870
|
http_res_text = await utils.stream_to_text_async(http_res)
|
962
|
-
raise errors.APIError(
|
963
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
964
|
-
)
|
871
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
965
872
|
|
966
|
-
|
967
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
968
|
-
raise errors.APIError(
|
969
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
970
|
-
http_res.status_code,
|
971
|
-
http_res_text,
|
972
|
-
http_res,
|
973
|
-
)
|
873
|
+
raise errors.APIError("Unexpected response received", http_res)
|