maytes-api-client-py 0.1.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.
- maytes_api_client/__init__.py +150 -0
- maytes_api_client/api/__init__.py +5 -0
- maytes_api_client/api/default_api.py +2661 -0
- maytes_api_client/api_client.py +804 -0
- maytes_api_client/api_response.py +21 -0
- maytes_api_client/configuration.py +630 -0
- maytes_api_client/exceptions.py +218 -0
- maytes_api_client/managed_client.py +199 -0
- maytes_api_client/models/__init__.py +64 -0
- maytes_api_client/models/cancel_checkout409_response.py +101 -0
- maytes_api_client/models/cancel_checkout_request.py +88 -0
- maytes_api_client/models/cancel_checkout_response.py +92 -0
- maytes_api_client/models/capture_checkout409_response.py +101 -0
- maytes_api_client/models/capture_checkout422_response.py +101 -0
- maytes_api_client/models/capture_checkout_request.py +118 -0
- maytes_api_client/models/capture_checkout_response.py +92 -0
- maytes_api_client/models/checkout.py +159 -0
- maytes_api_client/models/checkout_cancelled.py +97 -0
- maytes_api_client/models/checkout_captured.py +109 -0
- maytes_api_client/models/checkout_created.py +95 -0
- maytes_api_client/models/checkout_discount.py +133 -0
- maytes_api_client/models/checkout_fee.py +150 -0
- maytes_api_client/models/create_checkout401_response.py +101 -0
- maytes_api_client/models/create_checkout409_response.py +101 -0
- maytes_api_client/models/create_checkout422_response.py +101 -0
- maytes_api_client/models/create_checkout_request.py +213 -0
- maytes_api_client/models/create_checkout_response.py +92 -0
- maytes_api_client/models/create_refund_request.py +91 -0
- maytes_api_client/models/customer_data.py +107 -0
- maytes_api_client/models/digital_goods_custom_data.py +93 -0
- maytes_api_client/models/digital_goods_line_item.py +150 -0
- maytes_api_client/models/donation_line_item.py +144 -0
- maytes_api_client/models/error_response_dto.py +94 -0
- maytes_api_client/models/fee.py +103 -0
- maytes_api_client/models/fee_breakdown_line.py +101 -0
- maytes_api_client/models/food_beverage_line_item.py +144 -0
- maytes_api_client/models/get_checkout404_response.py +101 -0
- maytes_api_client/models/get_checkout422_response.py +101 -0
- maytes_api_client/models/get_checkout_response.py +92 -0
- maytes_api_client/models/get_settlement_response.py +92 -0
- maytes_api_client/models/health_response.py +88 -0
- maytes_api_client/models/line_item.py +210 -0
- maytes_api_client/models/list_settlements_response.py +96 -0
- maytes_api_client/models/o_auth_token_request.py +102 -0
- maytes_api_client/models/o_auth_token_response.py +96 -0
- maytes_api_client/models/other_line_item.py +144 -0
- maytes_api_client/models/physical_goods_custom_data.py +90 -0
- maytes_api_client/models/physical_goods_line_item.py +150 -0
- maytes_api_client/models/refund_checkout402_response.py +101 -0
- maytes_api_client/models/refund_checkout409_response.py +101 -0
- maytes_api_client/models/service_custom_data.py +93 -0
- maytes_api_client/models/service_line_item.py +150 -0
- maytes_api_client/models/settlement.py +160 -0
- maytes_api_client/models/tax.py +111 -0
- maytes_api_client/models/ticket_custom_data.py +125 -0
- maytes_api_client/models/ticket_line_item.py +150 -0
- maytes_api_client/models/ticket_seating.py +94 -0
- maytes_api_client/py.typed +0 -0
- maytes_api_client/rest.py +263 -0
- maytes_api_client/webhook_verifier.py +197 -0
- maytes_api_client_py-0.1.1.dist-info/METADATA +70 -0
- maytes_api_client_py-0.1.1.dist-info/RECORD +65 -0
- maytes_api_client_py-0.1.1.dist-info/WHEEL +5 -0
- maytes_api_client_py-0.1.1.dist-info/licenses/LICENSE +21 -0
- maytes_api_client_py-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2661 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Maytes API
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictStr, field_validator
|
|
19
|
+
from typing import Any, Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from maytes_api_client.models.cancel_checkout_request import CancelCheckoutRequest
|
|
22
|
+
from maytes_api_client.models.cancel_checkout_response import CancelCheckoutResponse
|
|
23
|
+
from maytes_api_client.models.capture_checkout_request import CaptureCheckoutRequest
|
|
24
|
+
from maytes_api_client.models.capture_checkout_response import CaptureCheckoutResponse
|
|
25
|
+
from maytes_api_client.models.create_checkout_request import CreateCheckoutRequest
|
|
26
|
+
from maytes_api_client.models.create_checkout_response import CreateCheckoutResponse
|
|
27
|
+
from maytes_api_client.models.create_refund_request import CreateRefundRequest
|
|
28
|
+
from maytes_api_client.models.get_checkout_response import GetCheckoutResponse
|
|
29
|
+
from maytes_api_client.models.get_settlement_response import GetSettlementResponse
|
|
30
|
+
from maytes_api_client.models.health_response import HealthResponse
|
|
31
|
+
from maytes_api_client.models.list_settlements_response import ListSettlementsResponse
|
|
32
|
+
from maytes_api_client.models.o_auth_token_request import OAuthTokenRequest
|
|
33
|
+
from maytes_api_client.models.o_auth_token_response import OAuthTokenResponse
|
|
34
|
+
|
|
35
|
+
from maytes_api_client.api_client import ApiClient, RequestSerialized
|
|
36
|
+
from maytes_api_client.api_response import ApiResponse
|
|
37
|
+
from maytes_api_client.rest import RESTResponseType
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class DefaultApi:
|
|
41
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
42
|
+
Ref: https://openapi-generator.tech
|
|
43
|
+
|
|
44
|
+
Do not edit the class manually.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, api_client=None) -> None:
|
|
48
|
+
if api_client is None:
|
|
49
|
+
api_client = ApiClient.get_default()
|
|
50
|
+
self.api_client = api_client
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@validate_call
|
|
54
|
+
def cancel_checkout(
|
|
55
|
+
self,
|
|
56
|
+
checkout_uuid: StrictStr,
|
|
57
|
+
cancel_checkout_request: CancelCheckoutRequest,
|
|
58
|
+
_request_timeout: Union[
|
|
59
|
+
None,
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
+
Tuple[
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
64
|
+
]
|
|
65
|
+
] = None,
|
|
66
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
67
|
+
_content_type: Optional[StrictStr] = None,
|
|
68
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
69
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
70
|
+
) -> CancelCheckoutResponse:
|
|
71
|
+
"""Cancel authorized checkout
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
:param checkout_uuid: (required)
|
|
75
|
+
:type checkout_uuid: str
|
|
76
|
+
:param cancel_checkout_request: (required)
|
|
77
|
+
:type cancel_checkout_request: CancelCheckoutRequest
|
|
78
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
79
|
+
number provided, it will be total request
|
|
80
|
+
timeout. It can also be a pair (tuple) of
|
|
81
|
+
(connection, read) timeouts.
|
|
82
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
83
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
84
|
+
request; this effectively ignores the
|
|
85
|
+
authentication in the spec for a single request.
|
|
86
|
+
:type _request_auth: dict, optional
|
|
87
|
+
:param _content_type: force content-type for the request.
|
|
88
|
+
:type _content_type: str, Optional
|
|
89
|
+
:param _headers: set to override the headers for a single
|
|
90
|
+
request; this effectively ignores the headers
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _headers: dict, optional
|
|
93
|
+
:param _host_index: set to override the host_index for a single
|
|
94
|
+
request; this effectively ignores the host_index
|
|
95
|
+
in the spec for a single request.
|
|
96
|
+
:type _host_index: int, optional
|
|
97
|
+
:return: Returns the result object.
|
|
98
|
+
""" # noqa: E501
|
|
99
|
+
|
|
100
|
+
_param = self._cancel_checkout_serialize(
|
|
101
|
+
checkout_uuid=checkout_uuid,
|
|
102
|
+
cancel_checkout_request=cancel_checkout_request,
|
|
103
|
+
_request_auth=_request_auth,
|
|
104
|
+
_content_type=_content_type,
|
|
105
|
+
_headers=_headers,
|
|
106
|
+
_host_index=_host_index
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
110
|
+
'200': "CancelCheckoutResponse",
|
|
111
|
+
'401': "CreateCheckout401Response",
|
|
112
|
+
'404': "GetCheckout404Response",
|
|
113
|
+
'409': "CancelCheckout409Response",
|
|
114
|
+
'422': "GetCheckout422Response",
|
|
115
|
+
}
|
|
116
|
+
response_data = self.api_client.call_api(
|
|
117
|
+
*_param,
|
|
118
|
+
_request_timeout=_request_timeout
|
|
119
|
+
)
|
|
120
|
+
response_data.read()
|
|
121
|
+
return self.api_client.response_deserialize(
|
|
122
|
+
response_data=response_data,
|
|
123
|
+
response_types_map=_response_types_map,
|
|
124
|
+
).data
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@validate_call
|
|
128
|
+
def cancel_checkout_with_http_info(
|
|
129
|
+
self,
|
|
130
|
+
checkout_uuid: StrictStr,
|
|
131
|
+
cancel_checkout_request: CancelCheckoutRequest,
|
|
132
|
+
_request_timeout: Union[
|
|
133
|
+
None,
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Tuple[
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
137
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
138
|
+
]
|
|
139
|
+
] = None,
|
|
140
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_content_type: Optional[StrictStr] = None,
|
|
142
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
143
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
144
|
+
) -> ApiResponse[CancelCheckoutResponse]:
|
|
145
|
+
"""Cancel authorized checkout
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
:param checkout_uuid: (required)
|
|
149
|
+
:type checkout_uuid: str
|
|
150
|
+
:param cancel_checkout_request: (required)
|
|
151
|
+
:type cancel_checkout_request: CancelCheckoutRequest
|
|
152
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
153
|
+
number provided, it will be total request
|
|
154
|
+
timeout. It can also be a pair (tuple) of
|
|
155
|
+
(connection, read) timeouts.
|
|
156
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
157
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
158
|
+
request; this effectively ignores the
|
|
159
|
+
authentication in the spec for a single request.
|
|
160
|
+
:type _request_auth: dict, optional
|
|
161
|
+
:param _content_type: force content-type for the request.
|
|
162
|
+
:type _content_type: str, Optional
|
|
163
|
+
:param _headers: set to override the headers for a single
|
|
164
|
+
request; this effectively ignores the headers
|
|
165
|
+
in the spec for a single request.
|
|
166
|
+
:type _headers: dict, optional
|
|
167
|
+
:param _host_index: set to override the host_index for a single
|
|
168
|
+
request; this effectively ignores the host_index
|
|
169
|
+
in the spec for a single request.
|
|
170
|
+
:type _host_index: int, optional
|
|
171
|
+
:return: Returns the result object.
|
|
172
|
+
""" # noqa: E501
|
|
173
|
+
|
|
174
|
+
_param = self._cancel_checkout_serialize(
|
|
175
|
+
checkout_uuid=checkout_uuid,
|
|
176
|
+
cancel_checkout_request=cancel_checkout_request,
|
|
177
|
+
_request_auth=_request_auth,
|
|
178
|
+
_content_type=_content_type,
|
|
179
|
+
_headers=_headers,
|
|
180
|
+
_host_index=_host_index
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
184
|
+
'200': "CancelCheckoutResponse",
|
|
185
|
+
'401': "CreateCheckout401Response",
|
|
186
|
+
'404': "GetCheckout404Response",
|
|
187
|
+
'409': "CancelCheckout409Response",
|
|
188
|
+
'422': "GetCheckout422Response",
|
|
189
|
+
}
|
|
190
|
+
response_data = self.api_client.call_api(
|
|
191
|
+
*_param,
|
|
192
|
+
_request_timeout=_request_timeout
|
|
193
|
+
)
|
|
194
|
+
response_data.read()
|
|
195
|
+
return self.api_client.response_deserialize(
|
|
196
|
+
response_data=response_data,
|
|
197
|
+
response_types_map=_response_types_map,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
@validate_call
|
|
202
|
+
def cancel_checkout_without_preload_content(
|
|
203
|
+
self,
|
|
204
|
+
checkout_uuid: StrictStr,
|
|
205
|
+
cancel_checkout_request: CancelCheckoutRequest,
|
|
206
|
+
_request_timeout: Union[
|
|
207
|
+
None,
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Tuple[
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
212
|
+
]
|
|
213
|
+
] = None,
|
|
214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_content_type: Optional[StrictStr] = None,
|
|
216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
218
|
+
) -> RESTResponseType:
|
|
219
|
+
"""Cancel authorized checkout
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
:param checkout_uuid: (required)
|
|
223
|
+
:type checkout_uuid: str
|
|
224
|
+
:param cancel_checkout_request: (required)
|
|
225
|
+
:type cancel_checkout_request: CancelCheckoutRequest
|
|
226
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
227
|
+
number provided, it will be total request
|
|
228
|
+
timeout. It can also be a pair (tuple) of
|
|
229
|
+
(connection, read) timeouts.
|
|
230
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
231
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
232
|
+
request; this effectively ignores the
|
|
233
|
+
authentication in the spec for a single request.
|
|
234
|
+
:type _request_auth: dict, optional
|
|
235
|
+
:param _content_type: force content-type for the request.
|
|
236
|
+
:type _content_type: str, Optional
|
|
237
|
+
:param _headers: set to override the headers for a single
|
|
238
|
+
request; this effectively ignores the headers
|
|
239
|
+
in the spec for a single request.
|
|
240
|
+
:type _headers: dict, optional
|
|
241
|
+
:param _host_index: set to override the host_index for a single
|
|
242
|
+
request; this effectively ignores the host_index
|
|
243
|
+
in the spec for a single request.
|
|
244
|
+
:type _host_index: int, optional
|
|
245
|
+
:return: Returns the result object.
|
|
246
|
+
""" # noqa: E501
|
|
247
|
+
|
|
248
|
+
_param = self._cancel_checkout_serialize(
|
|
249
|
+
checkout_uuid=checkout_uuid,
|
|
250
|
+
cancel_checkout_request=cancel_checkout_request,
|
|
251
|
+
_request_auth=_request_auth,
|
|
252
|
+
_content_type=_content_type,
|
|
253
|
+
_headers=_headers,
|
|
254
|
+
_host_index=_host_index
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
258
|
+
'200': "CancelCheckoutResponse",
|
|
259
|
+
'401': "CreateCheckout401Response",
|
|
260
|
+
'404': "GetCheckout404Response",
|
|
261
|
+
'409': "CancelCheckout409Response",
|
|
262
|
+
'422': "GetCheckout422Response",
|
|
263
|
+
}
|
|
264
|
+
response_data = self.api_client.call_api(
|
|
265
|
+
*_param,
|
|
266
|
+
_request_timeout=_request_timeout
|
|
267
|
+
)
|
|
268
|
+
return response_data.response
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def _cancel_checkout_serialize(
|
|
272
|
+
self,
|
|
273
|
+
checkout_uuid,
|
|
274
|
+
cancel_checkout_request,
|
|
275
|
+
_request_auth,
|
|
276
|
+
_content_type,
|
|
277
|
+
_headers,
|
|
278
|
+
_host_index,
|
|
279
|
+
) -> RequestSerialized:
|
|
280
|
+
|
|
281
|
+
_host = None
|
|
282
|
+
|
|
283
|
+
_collection_formats: Dict[str, str] = {
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
_path_params: Dict[str, str] = {}
|
|
287
|
+
_query_params: List[Tuple[str, str]] = []
|
|
288
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
289
|
+
_form_params: List[Tuple[str, str]] = []
|
|
290
|
+
_files: Dict[
|
|
291
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
292
|
+
] = {}
|
|
293
|
+
_body_params: Optional[bytes] = None
|
|
294
|
+
|
|
295
|
+
# process the path parameters
|
|
296
|
+
if checkout_uuid is not None:
|
|
297
|
+
_path_params['checkoutUuid'] = checkout_uuid
|
|
298
|
+
# process the query parameters
|
|
299
|
+
# process the header parameters
|
|
300
|
+
# process the form parameters
|
|
301
|
+
# process the body parameter
|
|
302
|
+
if cancel_checkout_request is not None:
|
|
303
|
+
_body_params = cancel_checkout_request
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
# set the HTTP header `Accept`
|
|
307
|
+
if 'Accept' not in _header_params:
|
|
308
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
309
|
+
[
|
|
310
|
+
'application/json'
|
|
311
|
+
]
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
# set the HTTP header `Content-Type`
|
|
315
|
+
if _content_type:
|
|
316
|
+
_header_params['Content-Type'] = _content_type
|
|
317
|
+
else:
|
|
318
|
+
_default_content_type = (
|
|
319
|
+
self.api_client.select_header_content_type(
|
|
320
|
+
[
|
|
321
|
+
'application/json'
|
|
322
|
+
]
|
|
323
|
+
)
|
|
324
|
+
)
|
|
325
|
+
if _default_content_type is not None:
|
|
326
|
+
_header_params['Content-Type'] = _default_content_type
|
|
327
|
+
|
|
328
|
+
# authentication setting
|
|
329
|
+
_auth_settings: List[str] = [
|
|
330
|
+
'bearer'
|
|
331
|
+
]
|
|
332
|
+
|
|
333
|
+
return self.api_client.param_serialize(
|
|
334
|
+
method='POST',
|
|
335
|
+
resource_path='/api/merchant/v1/checkouts/{checkoutUuid}/cancel',
|
|
336
|
+
path_params=_path_params,
|
|
337
|
+
query_params=_query_params,
|
|
338
|
+
header_params=_header_params,
|
|
339
|
+
body=_body_params,
|
|
340
|
+
post_params=_form_params,
|
|
341
|
+
files=_files,
|
|
342
|
+
auth_settings=_auth_settings,
|
|
343
|
+
collection_formats=_collection_formats,
|
|
344
|
+
_host=_host,
|
|
345
|
+
_request_auth=_request_auth
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
@validate_call
|
|
352
|
+
def capture_checkout(
|
|
353
|
+
self,
|
|
354
|
+
checkout_uuid: StrictStr,
|
|
355
|
+
capture_checkout_request: CaptureCheckoutRequest,
|
|
356
|
+
_request_timeout: Union[
|
|
357
|
+
None,
|
|
358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
359
|
+
Tuple[
|
|
360
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
361
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
362
|
+
]
|
|
363
|
+
] = None,
|
|
364
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
365
|
+
_content_type: Optional[StrictStr] = None,
|
|
366
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
367
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
368
|
+
) -> CaptureCheckoutResponse:
|
|
369
|
+
"""Capture authorized checkout
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
:param checkout_uuid: (required)
|
|
373
|
+
:type checkout_uuid: str
|
|
374
|
+
:param capture_checkout_request: (required)
|
|
375
|
+
:type capture_checkout_request: CaptureCheckoutRequest
|
|
376
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
377
|
+
number provided, it will be total request
|
|
378
|
+
timeout. It can also be a pair (tuple) of
|
|
379
|
+
(connection, read) timeouts.
|
|
380
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
381
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
382
|
+
request; this effectively ignores the
|
|
383
|
+
authentication in the spec for a single request.
|
|
384
|
+
:type _request_auth: dict, optional
|
|
385
|
+
:param _content_type: force content-type for the request.
|
|
386
|
+
:type _content_type: str, Optional
|
|
387
|
+
:param _headers: set to override the headers for a single
|
|
388
|
+
request; this effectively ignores the headers
|
|
389
|
+
in the spec for a single request.
|
|
390
|
+
:type _headers: dict, optional
|
|
391
|
+
:param _host_index: set to override the host_index for a single
|
|
392
|
+
request; this effectively ignores the host_index
|
|
393
|
+
in the spec for a single request.
|
|
394
|
+
:type _host_index: int, optional
|
|
395
|
+
:return: Returns the result object.
|
|
396
|
+
""" # noqa: E501
|
|
397
|
+
|
|
398
|
+
_param = self._capture_checkout_serialize(
|
|
399
|
+
checkout_uuid=checkout_uuid,
|
|
400
|
+
capture_checkout_request=capture_checkout_request,
|
|
401
|
+
_request_auth=_request_auth,
|
|
402
|
+
_content_type=_content_type,
|
|
403
|
+
_headers=_headers,
|
|
404
|
+
_host_index=_host_index
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
408
|
+
'200': "CaptureCheckoutResponse",
|
|
409
|
+
'401': "CreateCheckout401Response",
|
|
410
|
+
'404': "GetCheckout404Response",
|
|
411
|
+
'409': "CaptureCheckout409Response",
|
|
412
|
+
'422': "CaptureCheckout422Response",
|
|
413
|
+
}
|
|
414
|
+
response_data = self.api_client.call_api(
|
|
415
|
+
*_param,
|
|
416
|
+
_request_timeout=_request_timeout
|
|
417
|
+
)
|
|
418
|
+
response_data.read()
|
|
419
|
+
return self.api_client.response_deserialize(
|
|
420
|
+
response_data=response_data,
|
|
421
|
+
response_types_map=_response_types_map,
|
|
422
|
+
).data
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
@validate_call
|
|
426
|
+
def capture_checkout_with_http_info(
|
|
427
|
+
self,
|
|
428
|
+
checkout_uuid: StrictStr,
|
|
429
|
+
capture_checkout_request: CaptureCheckoutRequest,
|
|
430
|
+
_request_timeout: Union[
|
|
431
|
+
None,
|
|
432
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
433
|
+
Tuple[
|
|
434
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
435
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
436
|
+
]
|
|
437
|
+
] = None,
|
|
438
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
439
|
+
_content_type: Optional[StrictStr] = None,
|
|
440
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
441
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
442
|
+
) -> ApiResponse[CaptureCheckoutResponse]:
|
|
443
|
+
"""Capture authorized checkout
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
:param checkout_uuid: (required)
|
|
447
|
+
:type checkout_uuid: str
|
|
448
|
+
:param capture_checkout_request: (required)
|
|
449
|
+
:type capture_checkout_request: CaptureCheckoutRequest
|
|
450
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
451
|
+
number provided, it will be total request
|
|
452
|
+
timeout. It can also be a pair (tuple) of
|
|
453
|
+
(connection, read) timeouts.
|
|
454
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
455
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
456
|
+
request; this effectively ignores the
|
|
457
|
+
authentication in the spec for a single request.
|
|
458
|
+
:type _request_auth: dict, optional
|
|
459
|
+
:param _content_type: force content-type for the request.
|
|
460
|
+
:type _content_type: str, Optional
|
|
461
|
+
:param _headers: set to override the headers for a single
|
|
462
|
+
request; this effectively ignores the headers
|
|
463
|
+
in the spec for a single request.
|
|
464
|
+
:type _headers: dict, optional
|
|
465
|
+
:param _host_index: set to override the host_index for a single
|
|
466
|
+
request; this effectively ignores the host_index
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _host_index: int, optional
|
|
469
|
+
:return: Returns the result object.
|
|
470
|
+
""" # noqa: E501
|
|
471
|
+
|
|
472
|
+
_param = self._capture_checkout_serialize(
|
|
473
|
+
checkout_uuid=checkout_uuid,
|
|
474
|
+
capture_checkout_request=capture_checkout_request,
|
|
475
|
+
_request_auth=_request_auth,
|
|
476
|
+
_content_type=_content_type,
|
|
477
|
+
_headers=_headers,
|
|
478
|
+
_host_index=_host_index
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
482
|
+
'200': "CaptureCheckoutResponse",
|
|
483
|
+
'401': "CreateCheckout401Response",
|
|
484
|
+
'404': "GetCheckout404Response",
|
|
485
|
+
'409': "CaptureCheckout409Response",
|
|
486
|
+
'422': "CaptureCheckout422Response",
|
|
487
|
+
}
|
|
488
|
+
response_data = self.api_client.call_api(
|
|
489
|
+
*_param,
|
|
490
|
+
_request_timeout=_request_timeout
|
|
491
|
+
)
|
|
492
|
+
response_data.read()
|
|
493
|
+
return self.api_client.response_deserialize(
|
|
494
|
+
response_data=response_data,
|
|
495
|
+
response_types_map=_response_types_map,
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
@validate_call
|
|
500
|
+
def capture_checkout_without_preload_content(
|
|
501
|
+
self,
|
|
502
|
+
checkout_uuid: StrictStr,
|
|
503
|
+
capture_checkout_request: CaptureCheckoutRequest,
|
|
504
|
+
_request_timeout: Union[
|
|
505
|
+
None,
|
|
506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
507
|
+
Tuple[
|
|
508
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
509
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
510
|
+
]
|
|
511
|
+
] = None,
|
|
512
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
513
|
+
_content_type: Optional[StrictStr] = None,
|
|
514
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
515
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
516
|
+
) -> RESTResponseType:
|
|
517
|
+
"""Capture authorized checkout
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
:param checkout_uuid: (required)
|
|
521
|
+
:type checkout_uuid: str
|
|
522
|
+
:param capture_checkout_request: (required)
|
|
523
|
+
:type capture_checkout_request: CaptureCheckoutRequest
|
|
524
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
525
|
+
number provided, it will be total request
|
|
526
|
+
timeout. It can also be a pair (tuple) of
|
|
527
|
+
(connection, read) timeouts.
|
|
528
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
529
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
530
|
+
request; this effectively ignores the
|
|
531
|
+
authentication in the spec for a single request.
|
|
532
|
+
:type _request_auth: dict, optional
|
|
533
|
+
:param _content_type: force content-type for the request.
|
|
534
|
+
:type _content_type: str, Optional
|
|
535
|
+
:param _headers: set to override the headers for a single
|
|
536
|
+
request; this effectively ignores the headers
|
|
537
|
+
in the spec for a single request.
|
|
538
|
+
:type _headers: dict, optional
|
|
539
|
+
:param _host_index: set to override the host_index for a single
|
|
540
|
+
request; this effectively ignores the host_index
|
|
541
|
+
in the spec for a single request.
|
|
542
|
+
:type _host_index: int, optional
|
|
543
|
+
:return: Returns the result object.
|
|
544
|
+
""" # noqa: E501
|
|
545
|
+
|
|
546
|
+
_param = self._capture_checkout_serialize(
|
|
547
|
+
checkout_uuid=checkout_uuid,
|
|
548
|
+
capture_checkout_request=capture_checkout_request,
|
|
549
|
+
_request_auth=_request_auth,
|
|
550
|
+
_content_type=_content_type,
|
|
551
|
+
_headers=_headers,
|
|
552
|
+
_host_index=_host_index
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
556
|
+
'200': "CaptureCheckoutResponse",
|
|
557
|
+
'401': "CreateCheckout401Response",
|
|
558
|
+
'404': "GetCheckout404Response",
|
|
559
|
+
'409': "CaptureCheckout409Response",
|
|
560
|
+
'422': "CaptureCheckout422Response",
|
|
561
|
+
}
|
|
562
|
+
response_data = self.api_client.call_api(
|
|
563
|
+
*_param,
|
|
564
|
+
_request_timeout=_request_timeout
|
|
565
|
+
)
|
|
566
|
+
return response_data.response
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
def _capture_checkout_serialize(
|
|
570
|
+
self,
|
|
571
|
+
checkout_uuid,
|
|
572
|
+
capture_checkout_request,
|
|
573
|
+
_request_auth,
|
|
574
|
+
_content_type,
|
|
575
|
+
_headers,
|
|
576
|
+
_host_index,
|
|
577
|
+
) -> RequestSerialized:
|
|
578
|
+
|
|
579
|
+
_host = None
|
|
580
|
+
|
|
581
|
+
_collection_formats: Dict[str, str] = {
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
_path_params: Dict[str, str] = {}
|
|
585
|
+
_query_params: List[Tuple[str, str]] = []
|
|
586
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
587
|
+
_form_params: List[Tuple[str, str]] = []
|
|
588
|
+
_files: Dict[
|
|
589
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
590
|
+
] = {}
|
|
591
|
+
_body_params: Optional[bytes] = None
|
|
592
|
+
|
|
593
|
+
# process the path parameters
|
|
594
|
+
if checkout_uuid is not None:
|
|
595
|
+
_path_params['checkoutUuid'] = checkout_uuid
|
|
596
|
+
# process the query parameters
|
|
597
|
+
# process the header parameters
|
|
598
|
+
# process the form parameters
|
|
599
|
+
# process the body parameter
|
|
600
|
+
if capture_checkout_request is not None:
|
|
601
|
+
_body_params = capture_checkout_request
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
# set the HTTP header `Accept`
|
|
605
|
+
if 'Accept' not in _header_params:
|
|
606
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
607
|
+
[
|
|
608
|
+
'application/json'
|
|
609
|
+
]
|
|
610
|
+
)
|
|
611
|
+
|
|
612
|
+
# set the HTTP header `Content-Type`
|
|
613
|
+
if _content_type:
|
|
614
|
+
_header_params['Content-Type'] = _content_type
|
|
615
|
+
else:
|
|
616
|
+
_default_content_type = (
|
|
617
|
+
self.api_client.select_header_content_type(
|
|
618
|
+
[
|
|
619
|
+
'application/json'
|
|
620
|
+
]
|
|
621
|
+
)
|
|
622
|
+
)
|
|
623
|
+
if _default_content_type is not None:
|
|
624
|
+
_header_params['Content-Type'] = _default_content_type
|
|
625
|
+
|
|
626
|
+
# authentication setting
|
|
627
|
+
_auth_settings: List[str] = [
|
|
628
|
+
'bearer'
|
|
629
|
+
]
|
|
630
|
+
|
|
631
|
+
return self.api_client.param_serialize(
|
|
632
|
+
method='POST',
|
|
633
|
+
resource_path='/api/merchant/v1/checkouts/{checkoutUuid}/capture',
|
|
634
|
+
path_params=_path_params,
|
|
635
|
+
query_params=_query_params,
|
|
636
|
+
header_params=_header_params,
|
|
637
|
+
body=_body_params,
|
|
638
|
+
post_params=_form_params,
|
|
639
|
+
files=_files,
|
|
640
|
+
auth_settings=_auth_settings,
|
|
641
|
+
collection_formats=_collection_formats,
|
|
642
|
+
_host=_host,
|
|
643
|
+
_request_auth=_request_auth
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
@validate_call
|
|
650
|
+
def create_checkout(
|
|
651
|
+
self,
|
|
652
|
+
create_checkout_request: CreateCheckoutRequest,
|
|
653
|
+
_request_timeout: Union[
|
|
654
|
+
None,
|
|
655
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
656
|
+
Tuple[
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
658
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
659
|
+
]
|
|
660
|
+
] = None,
|
|
661
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
662
|
+
_content_type: Optional[StrictStr] = None,
|
|
663
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
664
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
665
|
+
) -> CreateCheckoutResponse:
|
|
666
|
+
"""Create a new checkout
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
:param create_checkout_request: (required)
|
|
670
|
+
:type create_checkout_request: CreateCheckoutRequest
|
|
671
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
672
|
+
number provided, it will be total request
|
|
673
|
+
timeout. It can also be a pair (tuple) of
|
|
674
|
+
(connection, read) timeouts.
|
|
675
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
676
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
677
|
+
request; this effectively ignores the
|
|
678
|
+
authentication in the spec for a single request.
|
|
679
|
+
:type _request_auth: dict, optional
|
|
680
|
+
:param _content_type: force content-type for the request.
|
|
681
|
+
:type _content_type: str, Optional
|
|
682
|
+
:param _headers: set to override the headers for a single
|
|
683
|
+
request; this effectively ignores the headers
|
|
684
|
+
in the spec for a single request.
|
|
685
|
+
:type _headers: dict, optional
|
|
686
|
+
:param _host_index: set to override the host_index for a single
|
|
687
|
+
request; this effectively ignores the host_index
|
|
688
|
+
in the spec for a single request.
|
|
689
|
+
:type _host_index: int, optional
|
|
690
|
+
:return: Returns the result object.
|
|
691
|
+
""" # noqa: E501
|
|
692
|
+
|
|
693
|
+
_param = self._create_checkout_serialize(
|
|
694
|
+
create_checkout_request=create_checkout_request,
|
|
695
|
+
_request_auth=_request_auth,
|
|
696
|
+
_content_type=_content_type,
|
|
697
|
+
_headers=_headers,
|
|
698
|
+
_host_index=_host_index
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
702
|
+
'200': "CreateCheckoutResponse",
|
|
703
|
+
'401': "CreateCheckout401Response",
|
|
704
|
+
'409': "CreateCheckout409Response",
|
|
705
|
+
'422': "CreateCheckout422Response",
|
|
706
|
+
}
|
|
707
|
+
response_data = self.api_client.call_api(
|
|
708
|
+
*_param,
|
|
709
|
+
_request_timeout=_request_timeout
|
|
710
|
+
)
|
|
711
|
+
response_data.read()
|
|
712
|
+
return self.api_client.response_deserialize(
|
|
713
|
+
response_data=response_data,
|
|
714
|
+
response_types_map=_response_types_map,
|
|
715
|
+
).data
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
@validate_call
|
|
719
|
+
def create_checkout_with_http_info(
|
|
720
|
+
self,
|
|
721
|
+
create_checkout_request: CreateCheckoutRequest,
|
|
722
|
+
_request_timeout: Union[
|
|
723
|
+
None,
|
|
724
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
725
|
+
Tuple[
|
|
726
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
727
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
728
|
+
]
|
|
729
|
+
] = None,
|
|
730
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
731
|
+
_content_type: Optional[StrictStr] = None,
|
|
732
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
733
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
734
|
+
) -> ApiResponse[CreateCheckoutResponse]:
|
|
735
|
+
"""Create a new checkout
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
:param create_checkout_request: (required)
|
|
739
|
+
:type create_checkout_request: CreateCheckoutRequest
|
|
740
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
741
|
+
number provided, it will be total request
|
|
742
|
+
timeout. It can also be a pair (tuple) of
|
|
743
|
+
(connection, read) timeouts.
|
|
744
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
745
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
746
|
+
request; this effectively ignores the
|
|
747
|
+
authentication in the spec for a single request.
|
|
748
|
+
:type _request_auth: dict, optional
|
|
749
|
+
:param _content_type: force content-type for the request.
|
|
750
|
+
:type _content_type: str, Optional
|
|
751
|
+
:param _headers: set to override the headers for a single
|
|
752
|
+
request; this effectively ignores the headers
|
|
753
|
+
in the spec for a single request.
|
|
754
|
+
:type _headers: dict, optional
|
|
755
|
+
:param _host_index: set to override the host_index for a single
|
|
756
|
+
request; this effectively ignores the host_index
|
|
757
|
+
in the spec for a single request.
|
|
758
|
+
:type _host_index: int, optional
|
|
759
|
+
:return: Returns the result object.
|
|
760
|
+
""" # noqa: E501
|
|
761
|
+
|
|
762
|
+
_param = self._create_checkout_serialize(
|
|
763
|
+
create_checkout_request=create_checkout_request,
|
|
764
|
+
_request_auth=_request_auth,
|
|
765
|
+
_content_type=_content_type,
|
|
766
|
+
_headers=_headers,
|
|
767
|
+
_host_index=_host_index
|
|
768
|
+
)
|
|
769
|
+
|
|
770
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
771
|
+
'200': "CreateCheckoutResponse",
|
|
772
|
+
'401': "CreateCheckout401Response",
|
|
773
|
+
'409': "CreateCheckout409Response",
|
|
774
|
+
'422': "CreateCheckout422Response",
|
|
775
|
+
}
|
|
776
|
+
response_data = self.api_client.call_api(
|
|
777
|
+
*_param,
|
|
778
|
+
_request_timeout=_request_timeout
|
|
779
|
+
)
|
|
780
|
+
response_data.read()
|
|
781
|
+
return self.api_client.response_deserialize(
|
|
782
|
+
response_data=response_data,
|
|
783
|
+
response_types_map=_response_types_map,
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
@validate_call
|
|
788
|
+
def create_checkout_without_preload_content(
|
|
789
|
+
self,
|
|
790
|
+
create_checkout_request: CreateCheckoutRequest,
|
|
791
|
+
_request_timeout: Union[
|
|
792
|
+
None,
|
|
793
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
794
|
+
Tuple[
|
|
795
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
796
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
797
|
+
]
|
|
798
|
+
] = None,
|
|
799
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
800
|
+
_content_type: Optional[StrictStr] = None,
|
|
801
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
802
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
803
|
+
) -> RESTResponseType:
|
|
804
|
+
"""Create a new checkout
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
:param create_checkout_request: (required)
|
|
808
|
+
:type create_checkout_request: CreateCheckoutRequest
|
|
809
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
810
|
+
number provided, it will be total request
|
|
811
|
+
timeout. It can also be a pair (tuple) of
|
|
812
|
+
(connection, read) timeouts.
|
|
813
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
814
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
815
|
+
request; this effectively ignores the
|
|
816
|
+
authentication in the spec for a single request.
|
|
817
|
+
:type _request_auth: dict, optional
|
|
818
|
+
:param _content_type: force content-type for the request.
|
|
819
|
+
:type _content_type: str, Optional
|
|
820
|
+
:param _headers: set to override the headers for a single
|
|
821
|
+
request; this effectively ignores the headers
|
|
822
|
+
in the spec for a single request.
|
|
823
|
+
:type _headers: dict, optional
|
|
824
|
+
:param _host_index: set to override the host_index for a single
|
|
825
|
+
request; this effectively ignores the host_index
|
|
826
|
+
in the spec for a single request.
|
|
827
|
+
:type _host_index: int, optional
|
|
828
|
+
:return: Returns the result object.
|
|
829
|
+
""" # noqa: E501
|
|
830
|
+
|
|
831
|
+
_param = self._create_checkout_serialize(
|
|
832
|
+
create_checkout_request=create_checkout_request,
|
|
833
|
+
_request_auth=_request_auth,
|
|
834
|
+
_content_type=_content_type,
|
|
835
|
+
_headers=_headers,
|
|
836
|
+
_host_index=_host_index
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
840
|
+
'200': "CreateCheckoutResponse",
|
|
841
|
+
'401': "CreateCheckout401Response",
|
|
842
|
+
'409': "CreateCheckout409Response",
|
|
843
|
+
'422': "CreateCheckout422Response",
|
|
844
|
+
}
|
|
845
|
+
response_data = self.api_client.call_api(
|
|
846
|
+
*_param,
|
|
847
|
+
_request_timeout=_request_timeout
|
|
848
|
+
)
|
|
849
|
+
return response_data.response
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
def _create_checkout_serialize(
|
|
853
|
+
self,
|
|
854
|
+
create_checkout_request,
|
|
855
|
+
_request_auth,
|
|
856
|
+
_content_type,
|
|
857
|
+
_headers,
|
|
858
|
+
_host_index,
|
|
859
|
+
) -> RequestSerialized:
|
|
860
|
+
|
|
861
|
+
_host = None
|
|
862
|
+
|
|
863
|
+
_collection_formats: Dict[str, str] = {
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
_path_params: Dict[str, str] = {}
|
|
867
|
+
_query_params: List[Tuple[str, str]] = []
|
|
868
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
869
|
+
_form_params: List[Tuple[str, str]] = []
|
|
870
|
+
_files: Dict[
|
|
871
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
872
|
+
] = {}
|
|
873
|
+
_body_params: Optional[bytes] = None
|
|
874
|
+
|
|
875
|
+
# process the path parameters
|
|
876
|
+
# process the query parameters
|
|
877
|
+
# process the header parameters
|
|
878
|
+
# process the form parameters
|
|
879
|
+
# process the body parameter
|
|
880
|
+
if create_checkout_request is not None:
|
|
881
|
+
_body_params = create_checkout_request
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
# set the HTTP header `Accept`
|
|
885
|
+
if 'Accept' not in _header_params:
|
|
886
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
887
|
+
[
|
|
888
|
+
'application/json'
|
|
889
|
+
]
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
# set the HTTP header `Content-Type`
|
|
893
|
+
if _content_type:
|
|
894
|
+
_header_params['Content-Type'] = _content_type
|
|
895
|
+
else:
|
|
896
|
+
_default_content_type = (
|
|
897
|
+
self.api_client.select_header_content_type(
|
|
898
|
+
[
|
|
899
|
+
'application/json'
|
|
900
|
+
]
|
|
901
|
+
)
|
|
902
|
+
)
|
|
903
|
+
if _default_content_type is not None:
|
|
904
|
+
_header_params['Content-Type'] = _default_content_type
|
|
905
|
+
|
|
906
|
+
# authentication setting
|
|
907
|
+
_auth_settings: List[str] = [
|
|
908
|
+
'bearer'
|
|
909
|
+
]
|
|
910
|
+
|
|
911
|
+
return self.api_client.param_serialize(
|
|
912
|
+
method='POST',
|
|
913
|
+
resource_path='/api/merchant/v1/checkouts',
|
|
914
|
+
path_params=_path_params,
|
|
915
|
+
query_params=_query_params,
|
|
916
|
+
header_params=_header_params,
|
|
917
|
+
body=_body_params,
|
|
918
|
+
post_params=_form_params,
|
|
919
|
+
files=_files,
|
|
920
|
+
auth_settings=_auth_settings,
|
|
921
|
+
collection_formats=_collection_formats,
|
|
922
|
+
_host=_host,
|
|
923
|
+
_request_auth=_request_auth
|
|
924
|
+
)
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
@validate_call
|
|
930
|
+
def get_checkout(
|
|
931
|
+
self,
|
|
932
|
+
checkout_uuid: StrictStr,
|
|
933
|
+
merchant_order_id: Optional[StrictStr] = None,
|
|
934
|
+
_request_timeout: Union[
|
|
935
|
+
None,
|
|
936
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
937
|
+
Tuple[
|
|
938
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
939
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
940
|
+
]
|
|
941
|
+
] = None,
|
|
942
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
943
|
+
_content_type: Optional[StrictStr] = None,
|
|
944
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
945
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
946
|
+
) -> GetCheckoutResponse:
|
|
947
|
+
"""Get checkout details
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
:param checkout_uuid: (required)
|
|
951
|
+
:type checkout_uuid: str
|
|
952
|
+
:param merchant_order_id:
|
|
953
|
+
:type merchant_order_id: str
|
|
954
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
955
|
+
number provided, it will be total request
|
|
956
|
+
timeout. It can also be a pair (tuple) of
|
|
957
|
+
(connection, read) timeouts.
|
|
958
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
959
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
960
|
+
request; this effectively ignores the
|
|
961
|
+
authentication in the spec for a single request.
|
|
962
|
+
:type _request_auth: dict, optional
|
|
963
|
+
:param _content_type: force content-type for the request.
|
|
964
|
+
:type _content_type: str, Optional
|
|
965
|
+
:param _headers: set to override the headers for a single
|
|
966
|
+
request; this effectively ignores the headers
|
|
967
|
+
in the spec for a single request.
|
|
968
|
+
:type _headers: dict, optional
|
|
969
|
+
:param _host_index: set to override the host_index for a single
|
|
970
|
+
request; this effectively ignores the host_index
|
|
971
|
+
in the spec for a single request.
|
|
972
|
+
:type _host_index: int, optional
|
|
973
|
+
:return: Returns the result object.
|
|
974
|
+
""" # noqa: E501
|
|
975
|
+
|
|
976
|
+
_param = self._get_checkout_serialize(
|
|
977
|
+
checkout_uuid=checkout_uuid,
|
|
978
|
+
merchant_order_id=merchant_order_id,
|
|
979
|
+
_request_auth=_request_auth,
|
|
980
|
+
_content_type=_content_type,
|
|
981
|
+
_headers=_headers,
|
|
982
|
+
_host_index=_host_index
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
986
|
+
'200': "GetCheckoutResponse",
|
|
987
|
+
'401': "CreateCheckout401Response",
|
|
988
|
+
'404': "GetCheckout404Response",
|
|
989
|
+
'422': "GetCheckout422Response",
|
|
990
|
+
}
|
|
991
|
+
response_data = self.api_client.call_api(
|
|
992
|
+
*_param,
|
|
993
|
+
_request_timeout=_request_timeout
|
|
994
|
+
)
|
|
995
|
+
response_data.read()
|
|
996
|
+
return self.api_client.response_deserialize(
|
|
997
|
+
response_data=response_data,
|
|
998
|
+
response_types_map=_response_types_map,
|
|
999
|
+
).data
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
@validate_call
|
|
1003
|
+
def get_checkout_with_http_info(
|
|
1004
|
+
self,
|
|
1005
|
+
checkout_uuid: StrictStr,
|
|
1006
|
+
merchant_order_id: Optional[StrictStr] = None,
|
|
1007
|
+
_request_timeout: Union[
|
|
1008
|
+
None,
|
|
1009
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1010
|
+
Tuple[
|
|
1011
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1012
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1013
|
+
]
|
|
1014
|
+
] = None,
|
|
1015
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1016
|
+
_content_type: Optional[StrictStr] = None,
|
|
1017
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1018
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1019
|
+
) -> ApiResponse[GetCheckoutResponse]:
|
|
1020
|
+
"""Get checkout details
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
:param checkout_uuid: (required)
|
|
1024
|
+
:type checkout_uuid: str
|
|
1025
|
+
:param merchant_order_id:
|
|
1026
|
+
:type merchant_order_id: str
|
|
1027
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1028
|
+
number provided, it will be total request
|
|
1029
|
+
timeout. It can also be a pair (tuple) of
|
|
1030
|
+
(connection, read) timeouts.
|
|
1031
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1032
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1033
|
+
request; this effectively ignores the
|
|
1034
|
+
authentication in the spec for a single request.
|
|
1035
|
+
:type _request_auth: dict, optional
|
|
1036
|
+
:param _content_type: force content-type for the request.
|
|
1037
|
+
:type _content_type: str, Optional
|
|
1038
|
+
:param _headers: set to override the headers for a single
|
|
1039
|
+
request; this effectively ignores the headers
|
|
1040
|
+
in the spec for a single request.
|
|
1041
|
+
:type _headers: dict, optional
|
|
1042
|
+
:param _host_index: set to override the host_index for a single
|
|
1043
|
+
request; this effectively ignores the host_index
|
|
1044
|
+
in the spec for a single request.
|
|
1045
|
+
:type _host_index: int, optional
|
|
1046
|
+
:return: Returns the result object.
|
|
1047
|
+
""" # noqa: E501
|
|
1048
|
+
|
|
1049
|
+
_param = self._get_checkout_serialize(
|
|
1050
|
+
checkout_uuid=checkout_uuid,
|
|
1051
|
+
merchant_order_id=merchant_order_id,
|
|
1052
|
+
_request_auth=_request_auth,
|
|
1053
|
+
_content_type=_content_type,
|
|
1054
|
+
_headers=_headers,
|
|
1055
|
+
_host_index=_host_index
|
|
1056
|
+
)
|
|
1057
|
+
|
|
1058
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1059
|
+
'200': "GetCheckoutResponse",
|
|
1060
|
+
'401': "CreateCheckout401Response",
|
|
1061
|
+
'404': "GetCheckout404Response",
|
|
1062
|
+
'422': "GetCheckout422Response",
|
|
1063
|
+
}
|
|
1064
|
+
response_data = self.api_client.call_api(
|
|
1065
|
+
*_param,
|
|
1066
|
+
_request_timeout=_request_timeout
|
|
1067
|
+
)
|
|
1068
|
+
response_data.read()
|
|
1069
|
+
return self.api_client.response_deserialize(
|
|
1070
|
+
response_data=response_data,
|
|
1071
|
+
response_types_map=_response_types_map,
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
@validate_call
|
|
1076
|
+
def get_checkout_without_preload_content(
|
|
1077
|
+
self,
|
|
1078
|
+
checkout_uuid: StrictStr,
|
|
1079
|
+
merchant_order_id: Optional[StrictStr] = None,
|
|
1080
|
+
_request_timeout: Union[
|
|
1081
|
+
None,
|
|
1082
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1083
|
+
Tuple[
|
|
1084
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1085
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1086
|
+
]
|
|
1087
|
+
] = None,
|
|
1088
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1089
|
+
_content_type: Optional[StrictStr] = None,
|
|
1090
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1091
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1092
|
+
) -> RESTResponseType:
|
|
1093
|
+
"""Get checkout details
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
:param checkout_uuid: (required)
|
|
1097
|
+
:type checkout_uuid: str
|
|
1098
|
+
:param merchant_order_id:
|
|
1099
|
+
:type merchant_order_id: str
|
|
1100
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1101
|
+
number provided, it will be total request
|
|
1102
|
+
timeout. It can also be a pair (tuple) of
|
|
1103
|
+
(connection, read) timeouts.
|
|
1104
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1105
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1106
|
+
request; this effectively ignores the
|
|
1107
|
+
authentication in the spec for a single request.
|
|
1108
|
+
:type _request_auth: dict, optional
|
|
1109
|
+
:param _content_type: force content-type for the request.
|
|
1110
|
+
:type _content_type: str, Optional
|
|
1111
|
+
:param _headers: set to override the headers for a single
|
|
1112
|
+
request; this effectively ignores the headers
|
|
1113
|
+
in the spec for a single request.
|
|
1114
|
+
:type _headers: dict, optional
|
|
1115
|
+
:param _host_index: set to override the host_index for a single
|
|
1116
|
+
request; this effectively ignores the host_index
|
|
1117
|
+
in the spec for a single request.
|
|
1118
|
+
:type _host_index: int, optional
|
|
1119
|
+
:return: Returns the result object.
|
|
1120
|
+
""" # noqa: E501
|
|
1121
|
+
|
|
1122
|
+
_param = self._get_checkout_serialize(
|
|
1123
|
+
checkout_uuid=checkout_uuid,
|
|
1124
|
+
merchant_order_id=merchant_order_id,
|
|
1125
|
+
_request_auth=_request_auth,
|
|
1126
|
+
_content_type=_content_type,
|
|
1127
|
+
_headers=_headers,
|
|
1128
|
+
_host_index=_host_index
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1132
|
+
'200': "GetCheckoutResponse",
|
|
1133
|
+
'401': "CreateCheckout401Response",
|
|
1134
|
+
'404': "GetCheckout404Response",
|
|
1135
|
+
'422': "GetCheckout422Response",
|
|
1136
|
+
}
|
|
1137
|
+
response_data = self.api_client.call_api(
|
|
1138
|
+
*_param,
|
|
1139
|
+
_request_timeout=_request_timeout
|
|
1140
|
+
)
|
|
1141
|
+
return response_data.response
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
def _get_checkout_serialize(
|
|
1145
|
+
self,
|
|
1146
|
+
checkout_uuid,
|
|
1147
|
+
merchant_order_id,
|
|
1148
|
+
_request_auth,
|
|
1149
|
+
_content_type,
|
|
1150
|
+
_headers,
|
|
1151
|
+
_host_index,
|
|
1152
|
+
) -> RequestSerialized:
|
|
1153
|
+
|
|
1154
|
+
_host = None
|
|
1155
|
+
|
|
1156
|
+
_collection_formats: Dict[str, str] = {
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
_path_params: Dict[str, str] = {}
|
|
1160
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1161
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1162
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1163
|
+
_files: Dict[
|
|
1164
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1165
|
+
] = {}
|
|
1166
|
+
_body_params: Optional[bytes] = None
|
|
1167
|
+
|
|
1168
|
+
# process the path parameters
|
|
1169
|
+
if checkout_uuid is not None:
|
|
1170
|
+
_path_params['checkoutUuid'] = checkout_uuid
|
|
1171
|
+
# process the query parameters
|
|
1172
|
+
if merchant_order_id is not None:
|
|
1173
|
+
|
|
1174
|
+
_query_params.append(('merchant_order_id', merchant_order_id))
|
|
1175
|
+
|
|
1176
|
+
# process the header parameters
|
|
1177
|
+
# process the form parameters
|
|
1178
|
+
# process the body parameter
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
# set the HTTP header `Accept`
|
|
1182
|
+
if 'Accept' not in _header_params:
|
|
1183
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1184
|
+
[
|
|
1185
|
+
'application/json'
|
|
1186
|
+
]
|
|
1187
|
+
)
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
# authentication setting
|
|
1191
|
+
_auth_settings: List[str] = [
|
|
1192
|
+
'bearer'
|
|
1193
|
+
]
|
|
1194
|
+
|
|
1195
|
+
return self.api_client.param_serialize(
|
|
1196
|
+
method='GET',
|
|
1197
|
+
resource_path='/api/merchant/v1/checkouts/{checkoutUuid}',
|
|
1198
|
+
path_params=_path_params,
|
|
1199
|
+
query_params=_query_params,
|
|
1200
|
+
header_params=_header_params,
|
|
1201
|
+
body=_body_params,
|
|
1202
|
+
post_params=_form_params,
|
|
1203
|
+
files=_files,
|
|
1204
|
+
auth_settings=_auth_settings,
|
|
1205
|
+
collection_formats=_collection_formats,
|
|
1206
|
+
_host=_host,
|
|
1207
|
+
_request_auth=_request_auth
|
|
1208
|
+
)
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
@validate_call
|
|
1214
|
+
def get_health(
|
|
1215
|
+
self,
|
|
1216
|
+
_request_timeout: Union[
|
|
1217
|
+
None,
|
|
1218
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1219
|
+
Tuple[
|
|
1220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1221
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1222
|
+
]
|
|
1223
|
+
] = None,
|
|
1224
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1225
|
+
_content_type: Optional[StrictStr] = None,
|
|
1226
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1227
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1228
|
+
) -> HealthResponse:
|
|
1229
|
+
"""Health check
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1233
|
+
number provided, it will be total request
|
|
1234
|
+
timeout. It can also be a pair (tuple) of
|
|
1235
|
+
(connection, read) timeouts.
|
|
1236
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1237
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1238
|
+
request; this effectively ignores the
|
|
1239
|
+
authentication in the spec for a single request.
|
|
1240
|
+
:type _request_auth: dict, optional
|
|
1241
|
+
:param _content_type: force content-type for the request.
|
|
1242
|
+
:type _content_type: str, Optional
|
|
1243
|
+
:param _headers: set to override the headers for a single
|
|
1244
|
+
request; this effectively ignores the headers
|
|
1245
|
+
in the spec for a single request.
|
|
1246
|
+
:type _headers: dict, optional
|
|
1247
|
+
:param _host_index: set to override the host_index for a single
|
|
1248
|
+
request; this effectively ignores the host_index
|
|
1249
|
+
in the spec for a single request.
|
|
1250
|
+
:type _host_index: int, optional
|
|
1251
|
+
:return: Returns the result object.
|
|
1252
|
+
""" # noqa: E501
|
|
1253
|
+
|
|
1254
|
+
_param = self._get_health_serialize(
|
|
1255
|
+
_request_auth=_request_auth,
|
|
1256
|
+
_content_type=_content_type,
|
|
1257
|
+
_headers=_headers,
|
|
1258
|
+
_host_index=_host_index
|
|
1259
|
+
)
|
|
1260
|
+
|
|
1261
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1262
|
+
'200': "HealthResponse",
|
|
1263
|
+
}
|
|
1264
|
+
response_data = self.api_client.call_api(
|
|
1265
|
+
*_param,
|
|
1266
|
+
_request_timeout=_request_timeout
|
|
1267
|
+
)
|
|
1268
|
+
response_data.read()
|
|
1269
|
+
return self.api_client.response_deserialize(
|
|
1270
|
+
response_data=response_data,
|
|
1271
|
+
response_types_map=_response_types_map,
|
|
1272
|
+
).data
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
@validate_call
|
|
1276
|
+
def get_health_with_http_info(
|
|
1277
|
+
self,
|
|
1278
|
+
_request_timeout: Union[
|
|
1279
|
+
None,
|
|
1280
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1281
|
+
Tuple[
|
|
1282
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1283
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1284
|
+
]
|
|
1285
|
+
] = None,
|
|
1286
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1287
|
+
_content_type: Optional[StrictStr] = None,
|
|
1288
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1289
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1290
|
+
) -> ApiResponse[HealthResponse]:
|
|
1291
|
+
"""Health check
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1295
|
+
number provided, it will be total request
|
|
1296
|
+
timeout. It can also be a pair (tuple) of
|
|
1297
|
+
(connection, read) timeouts.
|
|
1298
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1299
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1300
|
+
request; this effectively ignores the
|
|
1301
|
+
authentication in the spec for a single request.
|
|
1302
|
+
:type _request_auth: dict, optional
|
|
1303
|
+
:param _content_type: force content-type for the request.
|
|
1304
|
+
:type _content_type: str, Optional
|
|
1305
|
+
:param _headers: set to override the headers for a single
|
|
1306
|
+
request; this effectively ignores the headers
|
|
1307
|
+
in the spec for a single request.
|
|
1308
|
+
:type _headers: dict, optional
|
|
1309
|
+
:param _host_index: set to override the host_index for a single
|
|
1310
|
+
request; this effectively ignores the host_index
|
|
1311
|
+
in the spec for a single request.
|
|
1312
|
+
:type _host_index: int, optional
|
|
1313
|
+
:return: Returns the result object.
|
|
1314
|
+
""" # noqa: E501
|
|
1315
|
+
|
|
1316
|
+
_param = self._get_health_serialize(
|
|
1317
|
+
_request_auth=_request_auth,
|
|
1318
|
+
_content_type=_content_type,
|
|
1319
|
+
_headers=_headers,
|
|
1320
|
+
_host_index=_host_index
|
|
1321
|
+
)
|
|
1322
|
+
|
|
1323
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1324
|
+
'200': "HealthResponse",
|
|
1325
|
+
}
|
|
1326
|
+
response_data = self.api_client.call_api(
|
|
1327
|
+
*_param,
|
|
1328
|
+
_request_timeout=_request_timeout
|
|
1329
|
+
)
|
|
1330
|
+
response_data.read()
|
|
1331
|
+
return self.api_client.response_deserialize(
|
|
1332
|
+
response_data=response_data,
|
|
1333
|
+
response_types_map=_response_types_map,
|
|
1334
|
+
)
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
@validate_call
|
|
1338
|
+
def get_health_without_preload_content(
|
|
1339
|
+
self,
|
|
1340
|
+
_request_timeout: Union[
|
|
1341
|
+
None,
|
|
1342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1343
|
+
Tuple[
|
|
1344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1346
|
+
]
|
|
1347
|
+
] = None,
|
|
1348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1349
|
+
_content_type: Optional[StrictStr] = None,
|
|
1350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1352
|
+
) -> RESTResponseType:
|
|
1353
|
+
"""Health check
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1357
|
+
number provided, it will be total request
|
|
1358
|
+
timeout. It can also be a pair (tuple) of
|
|
1359
|
+
(connection, read) timeouts.
|
|
1360
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1361
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1362
|
+
request; this effectively ignores the
|
|
1363
|
+
authentication in the spec for a single request.
|
|
1364
|
+
:type _request_auth: dict, optional
|
|
1365
|
+
:param _content_type: force content-type for the request.
|
|
1366
|
+
:type _content_type: str, Optional
|
|
1367
|
+
:param _headers: set to override the headers for a single
|
|
1368
|
+
request; this effectively ignores the headers
|
|
1369
|
+
in the spec for a single request.
|
|
1370
|
+
:type _headers: dict, optional
|
|
1371
|
+
:param _host_index: set to override the host_index for a single
|
|
1372
|
+
request; this effectively ignores the host_index
|
|
1373
|
+
in the spec for a single request.
|
|
1374
|
+
:type _host_index: int, optional
|
|
1375
|
+
:return: Returns the result object.
|
|
1376
|
+
""" # noqa: E501
|
|
1377
|
+
|
|
1378
|
+
_param = self._get_health_serialize(
|
|
1379
|
+
_request_auth=_request_auth,
|
|
1380
|
+
_content_type=_content_type,
|
|
1381
|
+
_headers=_headers,
|
|
1382
|
+
_host_index=_host_index
|
|
1383
|
+
)
|
|
1384
|
+
|
|
1385
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1386
|
+
'200': "HealthResponse",
|
|
1387
|
+
}
|
|
1388
|
+
response_data = self.api_client.call_api(
|
|
1389
|
+
*_param,
|
|
1390
|
+
_request_timeout=_request_timeout
|
|
1391
|
+
)
|
|
1392
|
+
return response_data.response
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
def _get_health_serialize(
|
|
1396
|
+
self,
|
|
1397
|
+
_request_auth,
|
|
1398
|
+
_content_type,
|
|
1399
|
+
_headers,
|
|
1400
|
+
_host_index,
|
|
1401
|
+
) -> RequestSerialized:
|
|
1402
|
+
|
|
1403
|
+
_host = None
|
|
1404
|
+
|
|
1405
|
+
_collection_formats: Dict[str, str] = {
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
_path_params: Dict[str, str] = {}
|
|
1409
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1410
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1411
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1412
|
+
_files: Dict[
|
|
1413
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1414
|
+
] = {}
|
|
1415
|
+
_body_params: Optional[bytes] = None
|
|
1416
|
+
|
|
1417
|
+
# process the path parameters
|
|
1418
|
+
# process the query parameters
|
|
1419
|
+
# process the header parameters
|
|
1420
|
+
# process the form parameters
|
|
1421
|
+
# process the body parameter
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
# set the HTTP header `Accept`
|
|
1425
|
+
if 'Accept' not in _header_params:
|
|
1426
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1427
|
+
[
|
|
1428
|
+
'application/json'
|
|
1429
|
+
]
|
|
1430
|
+
)
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
# authentication setting
|
|
1434
|
+
_auth_settings: List[str] = [
|
|
1435
|
+
]
|
|
1436
|
+
|
|
1437
|
+
return self.api_client.param_serialize(
|
|
1438
|
+
method='GET',
|
|
1439
|
+
resource_path='/api/health',
|
|
1440
|
+
path_params=_path_params,
|
|
1441
|
+
query_params=_query_params,
|
|
1442
|
+
header_params=_header_params,
|
|
1443
|
+
body=_body_params,
|
|
1444
|
+
post_params=_form_params,
|
|
1445
|
+
files=_files,
|
|
1446
|
+
auth_settings=_auth_settings,
|
|
1447
|
+
collection_formats=_collection_formats,
|
|
1448
|
+
_host=_host,
|
|
1449
|
+
_request_auth=_request_auth
|
|
1450
|
+
)
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
@validate_call
|
|
1456
|
+
def get_o_auth_token(
|
|
1457
|
+
self,
|
|
1458
|
+
o_auth_token_request: OAuthTokenRequest,
|
|
1459
|
+
_request_timeout: Union[
|
|
1460
|
+
None,
|
|
1461
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1462
|
+
Tuple[
|
|
1463
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1464
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1465
|
+
]
|
|
1466
|
+
] = None,
|
|
1467
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1468
|
+
_content_type: Optional[StrictStr] = None,
|
|
1469
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1470
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1471
|
+
) -> OAuthTokenResponse:
|
|
1472
|
+
"""Issue an access token
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
:param o_auth_token_request: (required)
|
|
1476
|
+
:type o_auth_token_request: OAuthTokenRequest
|
|
1477
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1478
|
+
number provided, it will be total request
|
|
1479
|
+
timeout. It can also be a pair (tuple) of
|
|
1480
|
+
(connection, read) timeouts.
|
|
1481
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1482
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1483
|
+
request; this effectively ignores the
|
|
1484
|
+
authentication in the spec for a single request.
|
|
1485
|
+
:type _request_auth: dict, optional
|
|
1486
|
+
:param _content_type: force content-type for the request.
|
|
1487
|
+
:type _content_type: str, Optional
|
|
1488
|
+
:param _headers: set to override the headers for a single
|
|
1489
|
+
request; this effectively ignores the headers
|
|
1490
|
+
in the spec for a single request.
|
|
1491
|
+
:type _headers: dict, optional
|
|
1492
|
+
:param _host_index: set to override the host_index for a single
|
|
1493
|
+
request; this effectively ignores the host_index
|
|
1494
|
+
in the spec for a single request.
|
|
1495
|
+
:type _host_index: int, optional
|
|
1496
|
+
:return: Returns the result object.
|
|
1497
|
+
""" # noqa: E501
|
|
1498
|
+
|
|
1499
|
+
_param = self._get_o_auth_token_serialize(
|
|
1500
|
+
o_auth_token_request=o_auth_token_request,
|
|
1501
|
+
_request_auth=_request_auth,
|
|
1502
|
+
_content_type=_content_type,
|
|
1503
|
+
_headers=_headers,
|
|
1504
|
+
_host_index=_host_index
|
|
1505
|
+
)
|
|
1506
|
+
|
|
1507
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1508
|
+
'200': "OAuthTokenResponse",
|
|
1509
|
+
'400': None,
|
|
1510
|
+
'401': None,
|
|
1511
|
+
}
|
|
1512
|
+
response_data = self.api_client.call_api(
|
|
1513
|
+
*_param,
|
|
1514
|
+
_request_timeout=_request_timeout
|
|
1515
|
+
)
|
|
1516
|
+
response_data.read()
|
|
1517
|
+
return self.api_client.response_deserialize(
|
|
1518
|
+
response_data=response_data,
|
|
1519
|
+
response_types_map=_response_types_map,
|
|
1520
|
+
).data
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
@validate_call
|
|
1524
|
+
def get_o_auth_token_with_http_info(
|
|
1525
|
+
self,
|
|
1526
|
+
o_auth_token_request: OAuthTokenRequest,
|
|
1527
|
+
_request_timeout: Union[
|
|
1528
|
+
None,
|
|
1529
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1530
|
+
Tuple[
|
|
1531
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1532
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1533
|
+
]
|
|
1534
|
+
] = None,
|
|
1535
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1536
|
+
_content_type: Optional[StrictStr] = None,
|
|
1537
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1538
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1539
|
+
) -> ApiResponse[OAuthTokenResponse]:
|
|
1540
|
+
"""Issue an access token
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
:param o_auth_token_request: (required)
|
|
1544
|
+
:type o_auth_token_request: OAuthTokenRequest
|
|
1545
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1546
|
+
number provided, it will be total request
|
|
1547
|
+
timeout. It can also be a pair (tuple) of
|
|
1548
|
+
(connection, read) timeouts.
|
|
1549
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1550
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1551
|
+
request; this effectively ignores the
|
|
1552
|
+
authentication in the spec for a single request.
|
|
1553
|
+
:type _request_auth: dict, optional
|
|
1554
|
+
:param _content_type: force content-type for the request.
|
|
1555
|
+
:type _content_type: str, Optional
|
|
1556
|
+
:param _headers: set to override the headers for a single
|
|
1557
|
+
request; this effectively ignores the headers
|
|
1558
|
+
in the spec for a single request.
|
|
1559
|
+
:type _headers: dict, optional
|
|
1560
|
+
:param _host_index: set to override the host_index for a single
|
|
1561
|
+
request; this effectively ignores the host_index
|
|
1562
|
+
in the spec for a single request.
|
|
1563
|
+
:type _host_index: int, optional
|
|
1564
|
+
:return: Returns the result object.
|
|
1565
|
+
""" # noqa: E501
|
|
1566
|
+
|
|
1567
|
+
_param = self._get_o_auth_token_serialize(
|
|
1568
|
+
o_auth_token_request=o_auth_token_request,
|
|
1569
|
+
_request_auth=_request_auth,
|
|
1570
|
+
_content_type=_content_type,
|
|
1571
|
+
_headers=_headers,
|
|
1572
|
+
_host_index=_host_index
|
|
1573
|
+
)
|
|
1574
|
+
|
|
1575
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1576
|
+
'200': "OAuthTokenResponse",
|
|
1577
|
+
'400': None,
|
|
1578
|
+
'401': None,
|
|
1579
|
+
}
|
|
1580
|
+
response_data = self.api_client.call_api(
|
|
1581
|
+
*_param,
|
|
1582
|
+
_request_timeout=_request_timeout
|
|
1583
|
+
)
|
|
1584
|
+
response_data.read()
|
|
1585
|
+
return self.api_client.response_deserialize(
|
|
1586
|
+
response_data=response_data,
|
|
1587
|
+
response_types_map=_response_types_map,
|
|
1588
|
+
)
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
@validate_call
|
|
1592
|
+
def get_o_auth_token_without_preload_content(
|
|
1593
|
+
self,
|
|
1594
|
+
o_auth_token_request: OAuthTokenRequest,
|
|
1595
|
+
_request_timeout: Union[
|
|
1596
|
+
None,
|
|
1597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1598
|
+
Tuple[
|
|
1599
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1600
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1601
|
+
]
|
|
1602
|
+
] = None,
|
|
1603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1604
|
+
_content_type: Optional[StrictStr] = None,
|
|
1605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1607
|
+
) -> RESTResponseType:
|
|
1608
|
+
"""Issue an access token
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
:param o_auth_token_request: (required)
|
|
1612
|
+
:type o_auth_token_request: OAuthTokenRequest
|
|
1613
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1614
|
+
number provided, it will be total request
|
|
1615
|
+
timeout. It can also be a pair (tuple) of
|
|
1616
|
+
(connection, read) timeouts.
|
|
1617
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1618
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1619
|
+
request; this effectively ignores the
|
|
1620
|
+
authentication in the spec for a single request.
|
|
1621
|
+
:type _request_auth: dict, optional
|
|
1622
|
+
:param _content_type: force content-type for the request.
|
|
1623
|
+
:type _content_type: str, Optional
|
|
1624
|
+
:param _headers: set to override the headers for a single
|
|
1625
|
+
request; this effectively ignores the headers
|
|
1626
|
+
in the spec for a single request.
|
|
1627
|
+
:type _headers: dict, optional
|
|
1628
|
+
:param _host_index: set to override the host_index for a single
|
|
1629
|
+
request; this effectively ignores the host_index
|
|
1630
|
+
in the spec for a single request.
|
|
1631
|
+
:type _host_index: int, optional
|
|
1632
|
+
:return: Returns the result object.
|
|
1633
|
+
""" # noqa: E501
|
|
1634
|
+
|
|
1635
|
+
_param = self._get_o_auth_token_serialize(
|
|
1636
|
+
o_auth_token_request=o_auth_token_request,
|
|
1637
|
+
_request_auth=_request_auth,
|
|
1638
|
+
_content_type=_content_type,
|
|
1639
|
+
_headers=_headers,
|
|
1640
|
+
_host_index=_host_index
|
|
1641
|
+
)
|
|
1642
|
+
|
|
1643
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1644
|
+
'200': "OAuthTokenResponse",
|
|
1645
|
+
'400': None,
|
|
1646
|
+
'401': None,
|
|
1647
|
+
}
|
|
1648
|
+
response_data = self.api_client.call_api(
|
|
1649
|
+
*_param,
|
|
1650
|
+
_request_timeout=_request_timeout
|
|
1651
|
+
)
|
|
1652
|
+
return response_data.response
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
def _get_o_auth_token_serialize(
|
|
1656
|
+
self,
|
|
1657
|
+
o_auth_token_request,
|
|
1658
|
+
_request_auth,
|
|
1659
|
+
_content_type,
|
|
1660
|
+
_headers,
|
|
1661
|
+
_host_index,
|
|
1662
|
+
) -> RequestSerialized:
|
|
1663
|
+
|
|
1664
|
+
_host = None
|
|
1665
|
+
|
|
1666
|
+
_collection_formats: Dict[str, str] = {
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
_path_params: Dict[str, str] = {}
|
|
1670
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1671
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1672
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1673
|
+
_files: Dict[
|
|
1674
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1675
|
+
] = {}
|
|
1676
|
+
_body_params: Optional[bytes] = None
|
|
1677
|
+
|
|
1678
|
+
# process the path parameters
|
|
1679
|
+
# process the query parameters
|
|
1680
|
+
# process the header parameters
|
|
1681
|
+
# process the form parameters
|
|
1682
|
+
# process the body parameter
|
|
1683
|
+
if o_auth_token_request is not None:
|
|
1684
|
+
_body_params = o_auth_token_request
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
# set the HTTP header `Accept`
|
|
1688
|
+
if 'Accept' not in _header_params:
|
|
1689
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1690
|
+
[
|
|
1691
|
+
'application/json'
|
|
1692
|
+
]
|
|
1693
|
+
)
|
|
1694
|
+
|
|
1695
|
+
# set the HTTP header `Content-Type`
|
|
1696
|
+
if _content_type:
|
|
1697
|
+
_header_params['Content-Type'] = _content_type
|
|
1698
|
+
else:
|
|
1699
|
+
_default_content_type = (
|
|
1700
|
+
self.api_client.select_header_content_type(
|
|
1701
|
+
[
|
|
1702
|
+
'application/json'
|
|
1703
|
+
]
|
|
1704
|
+
)
|
|
1705
|
+
)
|
|
1706
|
+
if _default_content_type is not None:
|
|
1707
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1708
|
+
|
|
1709
|
+
# authentication setting
|
|
1710
|
+
_auth_settings: List[str] = [
|
|
1711
|
+
]
|
|
1712
|
+
|
|
1713
|
+
return self.api_client.param_serialize(
|
|
1714
|
+
method='POST',
|
|
1715
|
+
resource_path='/oauth/token',
|
|
1716
|
+
path_params=_path_params,
|
|
1717
|
+
query_params=_query_params,
|
|
1718
|
+
header_params=_header_params,
|
|
1719
|
+
body=_body_params,
|
|
1720
|
+
post_params=_form_params,
|
|
1721
|
+
files=_files,
|
|
1722
|
+
auth_settings=_auth_settings,
|
|
1723
|
+
collection_formats=_collection_formats,
|
|
1724
|
+
_host=_host,
|
|
1725
|
+
_request_auth=_request_auth
|
|
1726
|
+
)
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
@validate_call
|
|
1732
|
+
def get_settlement(
|
|
1733
|
+
self,
|
|
1734
|
+
uuid: Annotated[StrictStr, Field(description="Settlement UUID")],
|
|
1735
|
+
_request_timeout: Union[
|
|
1736
|
+
None,
|
|
1737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1738
|
+
Tuple[
|
|
1739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1740
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1741
|
+
]
|
|
1742
|
+
] = None,
|
|
1743
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1744
|
+
_content_type: Optional[StrictStr] = None,
|
|
1745
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1746
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1747
|
+
) -> GetSettlementResponse:
|
|
1748
|
+
"""Get a settlement by UUID
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
:param uuid: Settlement UUID (required)
|
|
1752
|
+
:type uuid: str
|
|
1753
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1754
|
+
number provided, it will be total request
|
|
1755
|
+
timeout. It can also be a pair (tuple) of
|
|
1756
|
+
(connection, read) timeouts.
|
|
1757
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1758
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1759
|
+
request; this effectively ignores the
|
|
1760
|
+
authentication in the spec for a single request.
|
|
1761
|
+
:type _request_auth: dict, optional
|
|
1762
|
+
:param _content_type: force content-type for the request.
|
|
1763
|
+
:type _content_type: str, Optional
|
|
1764
|
+
:param _headers: set to override the headers for a single
|
|
1765
|
+
request; this effectively ignores the headers
|
|
1766
|
+
in the spec for a single request.
|
|
1767
|
+
:type _headers: dict, optional
|
|
1768
|
+
:param _host_index: set to override the host_index for a single
|
|
1769
|
+
request; this effectively ignores the host_index
|
|
1770
|
+
in the spec for a single request.
|
|
1771
|
+
:type _host_index: int, optional
|
|
1772
|
+
:return: Returns the result object.
|
|
1773
|
+
""" # noqa: E501
|
|
1774
|
+
|
|
1775
|
+
_param = self._get_settlement_serialize(
|
|
1776
|
+
uuid=uuid,
|
|
1777
|
+
_request_auth=_request_auth,
|
|
1778
|
+
_content_type=_content_type,
|
|
1779
|
+
_headers=_headers,
|
|
1780
|
+
_host_index=_host_index
|
|
1781
|
+
)
|
|
1782
|
+
|
|
1783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1784
|
+
'200': "GetSettlementResponse",
|
|
1785
|
+
'401': "CreateCheckout401Response",
|
|
1786
|
+
'404': "GetCheckout404Response",
|
|
1787
|
+
}
|
|
1788
|
+
response_data = self.api_client.call_api(
|
|
1789
|
+
*_param,
|
|
1790
|
+
_request_timeout=_request_timeout
|
|
1791
|
+
)
|
|
1792
|
+
response_data.read()
|
|
1793
|
+
return self.api_client.response_deserialize(
|
|
1794
|
+
response_data=response_data,
|
|
1795
|
+
response_types_map=_response_types_map,
|
|
1796
|
+
).data
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
@validate_call
|
|
1800
|
+
def get_settlement_with_http_info(
|
|
1801
|
+
self,
|
|
1802
|
+
uuid: Annotated[StrictStr, Field(description="Settlement UUID")],
|
|
1803
|
+
_request_timeout: Union[
|
|
1804
|
+
None,
|
|
1805
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1806
|
+
Tuple[
|
|
1807
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1808
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1809
|
+
]
|
|
1810
|
+
] = None,
|
|
1811
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1812
|
+
_content_type: Optional[StrictStr] = None,
|
|
1813
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1814
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1815
|
+
) -> ApiResponse[GetSettlementResponse]:
|
|
1816
|
+
"""Get a settlement by UUID
|
|
1817
|
+
|
|
1818
|
+
|
|
1819
|
+
:param uuid: Settlement UUID (required)
|
|
1820
|
+
:type uuid: str
|
|
1821
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1822
|
+
number provided, it will be total request
|
|
1823
|
+
timeout. It can also be a pair (tuple) of
|
|
1824
|
+
(connection, read) timeouts.
|
|
1825
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1826
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1827
|
+
request; this effectively ignores the
|
|
1828
|
+
authentication in the spec for a single request.
|
|
1829
|
+
:type _request_auth: dict, optional
|
|
1830
|
+
:param _content_type: force content-type for the request.
|
|
1831
|
+
:type _content_type: str, Optional
|
|
1832
|
+
:param _headers: set to override the headers for a single
|
|
1833
|
+
request; this effectively ignores the headers
|
|
1834
|
+
in the spec for a single request.
|
|
1835
|
+
:type _headers: dict, optional
|
|
1836
|
+
:param _host_index: set to override the host_index for a single
|
|
1837
|
+
request; this effectively ignores the host_index
|
|
1838
|
+
in the spec for a single request.
|
|
1839
|
+
:type _host_index: int, optional
|
|
1840
|
+
:return: Returns the result object.
|
|
1841
|
+
""" # noqa: E501
|
|
1842
|
+
|
|
1843
|
+
_param = self._get_settlement_serialize(
|
|
1844
|
+
uuid=uuid,
|
|
1845
|
+
_request_auth=_request_auth,
|
|
1846
|
+
_content_type=_content_type,
|
|
1847
|
+
_headers=_headers,
|
|
1848
|
+
_host_index=_host_index
|
|
1849
|
+
)
|
|
1850
|
+
|
|
1851
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1852
|
+
'200': "GetSettlementResponse",
|
|
1853
|
+
'401': "CreateCheckout401Response",
|
|
1854
|
+
'404': "GetCheckout404Response",
|
|
1855
|
+
}
|
|
1856
|
+
response_data = self.api_client.call_api(
|
|
1857
|
+
*_param,
|
|
1858
|
+
_request_timeout=_request_timeout
|
|
1859
|
+
)
|
|
1860
|
+
response_data.read()
|
|
1861
|
+
return self.api_client.response_deserialize(
|
|
1862
|
+
response_data=response_data,
|
|
1863
|
+
response_types_map=_response_types_map,
|
|
1864
|
+
)
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
@validate_call
|
|
1868
|
+
def get_settlement_without_preload_content(
|
|
1869
|
+
self,
|
|
1870
|
+
uuid: Annotated[StrictStr, Field(description="Settlement UUID")],
|
|
1871
|
+
_request_timeout: Union[
|
|
1872
|
+
None,
|
|
1873
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1874
|
+
Tuple[
|
|
1875
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1876
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1877
|
+
]
|
|
1878
|
+
] = None,
|
|
1879
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1880
|
+
_content_type: Optional[StrictStr] = None,
|
|
1881
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1882
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1883
|
+
) -> RESTResponseType:
|
|
1884
|
+
"""Get a settlement by UUID
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
:param uuid: Settlement UUID (required)
|
|
1888
|
+
:type uuid: str
|
|
1889
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1890
|
+
number provided, it will be total request
|
|
1891
|
+
timeout. It can also be a pair (tuple) of
|
|
1892
|
+
(connection, read) timeouts.
|
|
1893
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1894
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1895
|
+
request; this effectively ignores the
|
|
1896
|
+
authentication in the spec for a single request.
|
|
1897
|
+
:type _request_auth: dict, optional
|
|
1898
|
+
:param _content_type: force content-type for the request.
|
|
1899
|
+
:type _content_type: str, Optional
|
|
1900
|
+
:param _headers: set to override the headers for a single
|
|
1901
|
+
request; this effectively ignores the headers
|
|
1902
|
+
in the spec for a single request.
|
|
1903
|
+
:type _headers: dict, optional
|
|
1904
|
+
:param _host_index: set to override the host_index for a single
|
|
1905
|
+
request; this effectively ignores the host_index
|
|
1906
|
+
in the spec for a single request.
|
|
1907
|
+
:type _host_index: int, optional
|
|
1908
|
+
:return: Returns the result object.
|
|
1909
|
+
""" # noqa: E501
|
|
1910
|
+
|
|
1911
|
+
_param = self._get_settlement_serialize(
|
|
1912
|
+
uuid=uuid,
|
|
1913
|
+
_request_auth=_request_auth,
|
|
1914
|
+
_content_type=_content_type,
|
|
1915
|
+
_headers=_headers,
|
|
1916
|
+
_host_index=_host_index
|
|
1917
|
+
)
|
|
1918
|
+
|
|
1919
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1920
|
+
'200': "GetSettlementResponse",
|
|
1921
|
+
'401': "CreateCheckout401Response",
|
|
1922
|
+
'404': "GetCheckout404Response",
|
|
1923
|
+
}
|
|
1924
|
+
response_data = self.api_client.call_api(
|
|
1925
|
+
*_param,
|
|
1926
|
+
_request_timeout=_request_timeout
|
|
1927
|
+
)
|
|
1928
|
+
return response_data.response
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
def _get_settlement_serialize(
|
|
1932
|
+
self,
|
|
1933
|
+
uuid,
|
|
1934
|
+
_request_auth,
|
|
1935
|
+
_content_type,
|
|
1936
|
+
_headers,
|
|
1937
|
+
_host_index,
|
|
1938
|
+
) -> RequestSerialized:
|
|
1939
|
+
|
|
1940
|
+
_host = None
|
|
1941
|
+
|
|
1942
|
+
_collection_formats: Dict[str, str] = {
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
_path_params: Dict[str, str] = {}
|
|
1946
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1947
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1948
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1949
|
+
_files: Dict[
|
|
1950
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1951
|
+
] = {}
|
|
1952
|
+
_body_params: Optional[bytes] = None
|
|
1953
|
+
|
|
1954
|
+
# process the path parameters
|
|
1955
|
+
if uuid is not None:
|
|
1956
|
+
_path_params['uuid'] = uuid
|
|
1957
|
+
# process the query parameters
|
|
1958
|
+
# process the header parameters
|
|
1959
|
+
# process the form parameters
|
|
1960
|
+
# process the body parameter
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
# set the HTTP header `Accept`
|
|
1964
|
+
if 'Accept' not in _header_params:
|
|
1965
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1966
|
+
[
|
|
1967
|
+
'application/json'
|
|
1968
|
+
]
|
|
1969
|
+
)
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
# authentication setting
|
|
1973
|
+
_auth_settings: List[str] = [
|
|
1974
|
+
'bearer'
|
|
1975
|
+
]
|
|
1976
|
+
|
|
1977
|
+
return self.api_client.param_serialize(
|
|
1978
|
+
method='GET',
|
|
1979
|
+
resource_path='/api/merchant/v1/settlements/{uuid}',
|
|
1980
|
+
path_params=_path_params,
|
|
1981
|
+
query_params=_query_params,
|
|
1982
|
+
header_params=_header_params,
|
|
1983
|
+
body=_body_params,
|
|
1984
|
+
post_params=_form_params,
|
|
1985
|
+
files=_files,
|
|
1986
|
+
auth_settings=_auth_settings,
|
|
1987
|
+
collection_formats=_collection_formats,
|
|
1988
|
+
_host=_host,
|
|
1989
|
+
_request_auth=_request_auth
|
|
1990
|
+
)
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
|
|
1994
|
+
|
|
1995
|
+
@validate_call
|
|
1996
|
+
def list_settlements(
|
|
1997
|
+
self,
|
|
1998
|
+
offset: Annotated[Optional[Any], Field(description="Pagination offset (default 0)")] = None,
|
|
1999
|
+
limit: Annotated[Optional[Any], Field(description="Max records to return (default 50, max 200)")] = None,
|
|
2000
|
+
sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction (default: asc)")] = None,
|
|
2001
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="Field to sort by (default: created_at)")] = None,
|
|
2002
|
+
created_before: Annotated[Optional[Any], Field(description="Include settlements created at or before this ISO-8601 timestamp")] = None,
|
|
2003
|
+
created_after: Annotated[Optional[Any], Field(description="Include settlements created at or after this ISO-8601 timestamp")] = None,
|
|
2004
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
2005
|
+
_request_timeout: Union[
|
|
2006
|
+
None,
|
|
2007
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2008
|
+
Tuple[
|
|
2009
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2010
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2011
|
+
]
|
|
2012
|
+
] = None,
|
|
2013
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2014
|
+
_content_type: Optional[StrictStr] = None,
|
|
2015
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2016
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2017
|
+
) -> ListSettlementsResponse:
|
|
2018
|
+
"""List settlements for this merchant
|
|
2019
|
+
|
|
2020
|
+
Returns settlements for the authenticated merchant. Default sort: created_at ASC.
|
|
2021
|
+
|
|
2022
|
+
:param offset: Pagination offset (default 0)
|
|
2023
|
+
:type offset: object
|
|
2024
|
+
:param limit: Max records to return (default 50, max 200)
|
|
2025
|
+
:type limit: object
|
|
2026
|
+
:param sort_dir: Sort direction (default: asc)
|
|
2027
|
+
:type sort_dir: str
|
|
2028
|
+
:param sort_by: Field to sort by (default: created_at)
|
|
2029
|
+
:type sort_by: str
|
|
2030
|
+
:param created_before: Include settlements created at or before this ISO-8601 timestamp
|
|
2031
|
+
:type created_before: object
|
|
2032
|
+
:param created_after: Include settlements created at or after this ISO-8601 timestamp
|
|
2033
|
+
:type created_after: object
|
|
2034
|
+
:param status: Filter by status
|
|
2035
|
+
:type status: str
|
|
2036
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2037
|
+
number provided, it will be total request
|
|
2038
|
+
timeout. It can also be a pair (tuple) of
|
|
2039
|
+
(connection, read) timeouts.
|
|
2040
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2041
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2042
|
+
request; this effectively ignores the
|
|
2043
|
+
authentication in the spec for a single request.
|
|
2044
|
+
:type _request_auth: dict, optional
|
|
2045
|
+
:param _content_type: force content-type for the request.
|
|
2046
|
+
:type _content_type: str, Optional
|
|
2047
|
+
:param _headers: set to override the headers for a single
|
|
2048
|
+
request; this effectively ignores the headers
|
|
2049
|
+
in the spec for a single request.
|
|
2050
|
+
:type _headers: dict, optional
|
|
2051
|
+
:param _host_index: set to override the host_index for a single
|
|
2052
|
+
request; this effectively ignores the host_index
|
|
2053
|
+
in the spec for a single request.
|
|
2054
|
+
:type _host_index: int, optional
|
|
2055
|
+
:return: Returns the result object.
|
|
2056
|
+
""" # noqa: E501
|
|
2057
|
+
|
|
2058
|
+
_param = self._list_settlements_serialize(
|
|
2059
|
+
offset=offset,
|
|
2060
|
+
limit=limit,
|
|
2061
|
+
sort_dir=sort_dir,
|
|
2062
|
+
sort_by=sort_by,
|
|
2063
|
+
created_before=created_before,
|
|
2064
|
+
created_after=created_after,
|
|
2065
|
+
status=status,
|
|
2066
|
+
_request_auth=_request_auth,
|
|
2067
|
+
_content_type=_content_type,
|
|
2068
|
+
_headers=_headers,
|
|
2069
|
+
_host_index=_host_index
|
|
2070
|
+
)
|
|
2071
|
+
|
|
2072
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2073
|
+
'200': "ListSettlementsResponse",
|
|
2074
|
+
'401': "CreateCheckout401Response",
|
|
2075
|
+
}
|
|
2076
|
+
response_data = self.api_client.call_api(
|
|
2077
|
+
*_param,
|
|
2078
|
+
_request_timeout=_request_timeout
|
|
2079
|
+
)
|
|
2080
|
+
response_data.read()
|
|
2081
|
+
return self.api_client.response_deserialize(
|
|
2082
|
+
response_data=response_data,
|
|
2083
|
+
response_types_map=_response_types_map,
|
|
2084
|
+
).data
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
@validate_call
|
|
2088
|
+
def list_settlements_with_http_info(
|
|
2089
|
+
self,
|
|
2090
|
+
offset: Annotated[Optional[Any], Field(description="Pagination offset (default 0)")] = None,
|
|
2091
|
+
limit: Annotated[Optional[Any], Field(description="Max records to return (default 50, max 200)")] = None,
|
|
2092
|
+
sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction (default: asc)")] = None,
|
|
2093
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="Field to sort by (default: created_at)")] = None,
|
|
2094
|
+
created_before: Annotated[Optional[Any], Field(description="Include settlements created at or before this ISO-8601 timestamp")] = None,
|
|
2095
|
+
created_after: Annotated[Optional[Any], Field(description="Include settlements created at or after this ISO-8601 timestamp")] = None,
|
|
2096
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
2097
|
+
_request_timeout: Union[
|
|
2098
|
+
None,
|
|
2099
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2100
|
+
Tuple[
|
|
2101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2102
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2103
|
+
]
|
|
2104
|
+
] = None,
|
|
2105
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2106
|
+
_content_type: Optional[StrictStr] = None,
|
|
2107
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2108
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2109
|
+
) -> ApiResponse[ListSettlementsResponse]:
|
|
2110
|
+
"""List settlements for this merchant
|
|
2111
|
+
|
|
2112
|
+
Returns settlements for the authenticated merchant. Default sort: created_at ASC.
|
|
2113
|
+
|
|
2114
|
+
:param offset: Pagination offset (default 0)
|
|
2115
|
+
:type offset: object
|
|
2116
|
+
:param limit: Max records to return (default 50, max 200)
|
|
2117
|
+
:type limit: object
|
|
2118
|
+
:param sort_dir: Sort direction (default: asc)
|
|
2119
|
+
:type sort_dir: str
|
|
2120
|
+
:param sort_by: Field to sort by (default: created_at)
|
|
2121
|
+
:type sort_by: str
|
|
2122
|
+
:param created_before: Include settlements created at or before this ISO-8601 timestamp
|
|
2123
|
+
:type created_before: object
|
|
2124
|
+
:param created_after: Include settlements created at or after this ISO-8601 timestamp
|
|
2125
|
+
:type created_after: object
|
|
2126
|
+
:param status: Filter by status
|
|
2127
|
+
:type status: str
|
|
2128
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2129
|
+
number provided, it will be total request
|
|
2130
|
+
timeout. It can also be a pair (tuple) of
|
|
2131
|
+
(connection, read) timeouts.
|
|
2132
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2134
|
+
request; this effectively ignores the
|
|
2135
|
+
authentication in the spec for a single request.
|
|
2136
|
+
:type _request_auth: dict, optional
|
|
2137
|
+
:param _content_type: force content-type for the request.
|
|
2138
|
+
:type _content_type: str, Optional
|
|
2139
|
+
:param _headers: set to override the headers for a single
|
|
2140
|
+
request; this effectively ignores the headers
|
|
2141
|
+
in the spec for a single request.
|
|
2142
|
+
:type _headers: dict, optional
|
|
2143
|
+
:param _host_index: set to override the host_index for a single
|
|
2144
|
+
request; this effectively ignores the host_index
|
|
2145
|
+
in the spec for a single request.
|
|
2146
|
+
:type _host_index: int, optional
|
|
2147
|
+
:return: Returns the result object.
|
|
2148
|
+
""" # noqa: E501
|
|
2149
|
+
|
|
2150
|
+
_param = self._list_settlements_serialize(
|
|
2151
|
+
offset=offset,
|
|
2152
|
+
limit=limit,
|
|
2153
|
+
sort_dir=sort_dir,
|
|
2154
|
+
sort_by=sort_by,
|
|
2155
|
+
created_before=created_before,
|
|
2156
|
+
created_after=created_after,
|
|
2157
|
+
status=status,
|
|
2158
|
+
_request_auth=_request_auth,
|
|
2159
|
+
_content_type=_content_type,
|
|
2160
|
+
_headers=_headers,
|
|
2161
|
+
_host_index=_host_index
|
|
2162
|
+
)
|
|
2163
|
+
|
|
2164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2165
|
+
'200': "ListSettlementsResponse",
|
|
2166
|
+
'401': "CreateCheckout401Response",
|
|
2167
|
+
}
|
|
2168
|
+
response_data = self.api_client.call_api(
|
|
2169
|
+
*_param,
|
|
2170
|
+
_request_timeout=_request_timeout
|
|
2171
|
+
)
|
|
2172
|
+
response_data.read()
|
|
2173
|
+
return self.api_client.response_deserialize(
|
|
2174
|
+
response_data=response_data,
|
|
2175
|
+
response_types_map=_response_types_map,
|
|
2176
|
+
)
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
@validate_call
|
|
2180
|
+
def list_settlements_without_preload_content(
|
|
2181
|
+
self,
|
|
2182
|
+
offset: Annotated[Optional[Any], Field(description="Pagination offset (default 0)")] = None,
|
|
2183
|
+
limit: Annotated[Optional[Any], Field(description="Max records to return (default 50, max 200)")] = None,
|
|
2184
|
+
sort_dir: Annotated[Optional[StrictStr], Field(description="Sort direction (default: asc)")] = None,
|
|
2185
|
+
sort_by: Annotated[Optional[StrictStr], Field(description="Field to sort by (default: created_at)")] = None,
|
|
2186
|
+
created_before: Annotated[Optional[Any], Field(description="Include settlements created at or before this ISO-8601 timestamp")] = None,
|
|
2187
|
+
created_after: Annotated[Optional[Any], Field(description="Include settlements created at or after this ISO-8601 timestamp")] = None,
|
|
2188
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
2189
|
+
_request_timeout: Union[
|
|
2190
|
+
None,
|
|
2191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2192
|
+
Tuple[
|
|
2193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2195
|
+
]
|
|
2196
|
+
] = None,
|
|
2197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2198
|
+
_content_type: Optional[StrictStr] = None,
|
|
2199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2201
|
+
) -> RESTResponseType:
|
|
2202
|
+
"""List settlements for this merchant
|
|
2203
|
+
|
|
2204
|
+
Returns settlements for the authenticated merchant. Default sort: created_at ASC.
|
|
2205
|
+
|
|
2206
|
+
:param offset: Pagination offset (default 0)
|
|
2207
|
+
:type offset: object
|
|
2208
|
+
:param limit: Max records to return (default 50, max 200)
|
|
2209
|
+
:type limit: object
|
|
2210
|
+
:param sort_dir: Sort direction (default: asc)
|
|
2211
|
+
:type sort_dir: str
|
|
2212
|
+
:param sort_by: Field to sort by (default: created_at)
|
|
2213
|
+
:type sort_by: str
|
|
2214
|
+
:param created_before: Include settlements created at or before this ISO-8601 timestamp
|
|
2215
|
+
:type created_before: object
|
|
2216
|
+
:param created_after: Include settlements created at or after this ISO-8601 timestamp
|
|
2217
|
+
:type created_after: object
|
|
2218
|
+
:param status: Filter by status
|
|
2219
|
+
:type status: str
|
|
2220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2221
|
+
number provided, it will be total request
|
|
2222
|
+
timeout. It can also be a pair (tuple) of
|
|
2223
|
+
(connection, read) timeouts.
|
|
2224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2226
|
+
request; this effectively ignores the
|
|
2227
|
+
authentication in the spec for a single request.
|
|
2228
|
+
:type _request_auth: dict, optional
|
|
2229
|
+
:param _content_type: force content-type for the request.
|
|
2230
|
+
:type _content_type: str, Optional
|
|
2231
|
+
:param _headers: set to override the headers for a single
|
|
2232
|
+
request; this effectively ignores the headers
|
|
2233
|
+
in the spec for a single request.
|
|
2234
|
+
:type _headers: dict, optional
|
|
2235
|
+
:param _host_index: set to override the host_index for a single
|
|
2236
|
+
request; this effectively ignores the host_index
|
|
2237
|
+
in the spec for a single request.
|
|
2238
|
+
:type _host_index: int, optional
|
|
2239
|
+
:return: Returns the result object.
|
|
2240
|
+
""" # noqa: E501
|
|
2241
|
+
|
|
2242
|
+
_param = self._list_settlements_serialize(
|
|
2243
|
+
offset=offset,
|
|
2244
|
+
limit=limit,
|
|
2245
|
+
sort_dir=sort_dir,
|
|
2246
|
+
sort_by=sort_by,
|
|
2247
|
+
created_before=created_before,
|
|
2248
|
+
created_after=created_after,
|
|
2249
|
+
status=status,
|
|
2250
|
+
_request_auth=_request_auth,
|
|
2251
|
+
_content_type=_content_type,
|
|
2252
|
+
_headers=_headers,
|
|
2253
|
+
_host_index=_host_index
|
|
2254
|
+
)
|
|
2255
|
+
|
|
2256
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2257
|
+
'200': "ListSettlementsResponse",
|
|
2258
|
+
'401': "CreateCheckout401Response",
|
|
2259
|
+
}
|
|
2260
|
+
response_data = self.api_client.call_api(
|
|
2261
|
+
*_param,
|
|
2262
|
+
_request_timeout=_request_timeout
|
|
2263
|
+
)
|
|
2264
|
+
return response_data.response
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
def _list_settlements_serialize(
|
|
2268
|
+
self,
|
|
2269
|
+
offset,
|
|
2270
|
+
limit,
|
|
2271
|
+
sort_dir,
|
|
2272
|
+
sort_by,
|
|
2273
|
+
created_before,
|
|
2274
|
+
created_after,
|
|
2275
|
+
status,
|
|
2276
|
+
_request_auth,
|
|
2277
|
+
_content_type,
|
|
2278
|
+
_headers,
|
|
2279
|
+
_host_index,
|
|
2280
|
+
) -> RequestSerialized:
|
|
2281
|
+
|
|
2282
|
+
_host = None
|
|
2283
|
+
|
|
2284
|
+
_collection_formats: Dict[str, str] = {
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
_path_params: Dict[str, str] = {}
|
|
2288
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2289
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2290
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2291
|
+
_files: Dict[
|
|
2292
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2293
|
+
] = {}
|
|
2294
|
+
_body_params: Optional[bytes] = None
|
|
2295
|
+
|
|
2296
|
+
# process the path parameters
|
|
2297
|
+
# process the query parameters
|
|
2298
|
+
if offset is not None:
|
|
2299
|
+
|
|
2300
|
+
_query_params.append(('offset', offset))
|
|
2301
|
+
|
|
2302
|
+
if limit is not None:
|
|
2303
|
+
|
|
2304
|
+
_query_params.append(('limit', limit))
|
|
2305
|
+
|
|
2306
|
+
if sort_dir is not None:
|
|
2307
|
+
|
|
2308
|
+
_query_params.append(('sort_dir', sort_dir))
|
|
2309
|
+
|
|
2310
|
+
if sort_by is not None:
|
|
2311
|
+
|
|
2312
|
+
_query_params.append(('sort_by', sort_by))
|
|
2313
|
+
|
|
2314
|
+
if created_before is not None:
|
|
2315
|
+
|
|
2316
|
+
_query_params.append(('created_before', created_before))
|
|
2317
|
+
|
|
2318
|
+
if created_after is not None:
|
|
2319
|
+
|
|
2320
|
+
_query_params.append(('created_after', created_after))
|
|
2321
|
+
|
|
2322
|
+
if status is not None:
|
|
2323
|
+
|
|
2324
|
+
_query_params.append(('status', status))
|
|
2325
|
+
|
|
2326
|
+
# process the header parameters
|
|
2327
|
+
# process the form parameters
|
|
2328
|
+
# process the body parameter
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
# set the HTTP header `Accept`
|
|
2332
|
+
if 'Accept' not in _header_params:
|
|
2333
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2334
|
+
[
|
|
2335
|
+
'application/json'
|
|
2336
|
+
]
|
|
2337
|
+
)
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
# authentication setting
|
|
2341
|
+
_auth_settings: List[str] = [
|
|
2342
|
+
'bearer'
|
|
2343
|
+
]
|
|
2344
|
+
|
|
2345
|
+
return self.api_client.param_serialize(
|
|
2346
|
+
method='GET',
|
|
2347
|
+
resource_path='/api/merchant/v1/settlements',
|
|
2348
|
+
path_params=_path_params,
|
|
2349
|
+
query_params=_query_params,
|
|
2350
|
+
header_params=_header_params,
|
|
2351
|
+
body=_body_params,
|
|
2352
|
+
post_params=_form_params,
|
|
2353
|
+
files=_files,
|
|
2354
|
+
auth_settings=_auth_settings,
|
|
2355
|
+
collection_formats=_collection_formats,
|
|
2356
|
+
_host=_host,
|
|
2357
|
+
_request_auth=_request_auth
|
|
2358
|
+
)
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
@validate_call
|
|
2364
|
+
def refund_checkout(
|
|
2365
|
+
self,
|
|
2366
|
+
checkout_uuid: StrictStr,
|
|
2367
|
+
create_refund_request: CreateRefundRequest,
|
|
2368
|
+
_request_timeout: Union[
|
|
2369
|
+
None,
|
|
2370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2371
|
+
Tuple[
|
|
2372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2374
|
+
]
|
|
2375
|
+
] = None,
|
|
2376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2377
|
+
_content_type: Optional[StrictStr] = None,
|
|
2378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2380
|
+
) -> None:
|
|
2381
|
+
"""Refund a captured checkout
|
|
2382
|
+
|
|
2383
|
+
Initiates a full refund of the captured payment. Returns 204 immediately; Stripe confirms asynchronously via webhook. Poll GET /checkouts/:uuid for status and refund details.
|
|
2384
|
+
|
|
2385
|
+
:param checkout_uuid: (required)
|
|
2386
|
+
:type checkout_uuid: str
|
|
2387
|
+
:param create_refund_request: (required)
|
|
2388
|
+
:type create_refund_request: CreateRefundRequest
|
|
2389
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2390
|
+
number provided, it will be total request
|
|
2391
|
+
timeout. It can also be a pair (tuple) of
|
|
2392
|
+
(connection, read) timeouts.
|
|
2393
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2394
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2395
|
+
request; this effectively ignores the
|
|
2396
|
+
authentication in the spec for a single request.
|
|
2397
|
+
:type _request_auth: dict, optional
|
|
2398
|
+
:param _content_type: force content-type for the request.
|
|
2399
|
+
:type _content_type: str, Optional
|
|
2400
|
+
:param _headers: set to override the headers for a single
|
|
2401
|
+
request; this effectively ignores the headers
|
|
2402
|
+
in the spec for a single request.
|
|
2403
|
+
:type _headers: dict, optional
|
|
2404
|
+
:param _host_index: set to override the host_index for a single
|
|
2405
|
+
request; this effectively ignores the host_index
|
|
2406
|
+
in the spec for a single request.
|
|
2407
|
+
:type _host_index: int, optional
|
|
2408
|
+
:return: Returns the result object.
|
|
2409
|
+
""" # noqa: E501
|
|
2410
|
+
|
|
2411
|
+
_param = self._refund_checkout_serialize(
|
|
2412
|
+
checkout_uuid=checkout_uuid,
|
|
2413
|
+
create_refund_request=create_refund_request,
|
|
2414
|
+
_request_auth=_request_auth,
|
|
2415
|
+
_content_type=_content_type,
|
|
2416
|
+
_headers=_headers,
|
|
2417
|
+
_host_index=_host_index
|
|
2418
|
+
)
|
|
2419
|
+
|
|
2420
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2421
|
+
'204': None,
|
|
2422
|
+
'401': "CreateCheckout401Response",
|
|
2423
|
+
'402': "RefundCheckout402Response",
|
|
2424
|
+
'404': "GetCheckout404Response",
|
|
2425
|
+
'409': "RefundCheckout409Response",
|
|
2426
|
+
}
|
|
2427
|
+
response_data = self.api_client.call_api(
|
|
2428
|
+
*_param,
|
|
2429
|
+
_request_timeout=_request_timeout
|
|
2430
|
+
)
|
|
2431
|
+
response_data.read()
|
|
2432
|
+
return self.api_client.response_deserialize(
|
|
2433
|
+
response_data=response_data,
|
|
2434
|
+
response_types_map=_response_types_map,
|
|
2435
|
+
).data
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
@validate_call
|
|
2439
|
+
def refund_checkout_with_http_info(
|
|
2440
|
+
self,
|
|
2441
|
+
checkout_uuid: StrictStr,
|
|
2442
|
+
create_refund_request: CreateRefundRequest,
|
|
2443
|
+
_request_timeout: Union[
|
|
2444
|
+
None,
|
|
2445
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2446
|
+
Tuple[
|
|
2447
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2448
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2449
|
+
]
|
|
2450
|
+
] = None,
|
|
2451
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2452
|
+
_content_type: Optional[StrictStr] = None,
|
|
2453
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2454
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2455
|
+
) -> ApiResponse[None]:
|
|
2456
|
+
"""Refund a captured checkout
|
|
2457
|
+
|
|
2458
|
+
Initiates a full refund of the captured payment. Returns 204 immediately; Stripe confirms asynchronously via webhook. Poll GET /checkouts/:uuid for status and refund details.
|
|
2459
|
+
|
|
2460
|
+
:param checkout_uuid: (required)
|
|
2461
|
+
:type checkout_uuid: str
|
|
2462
|
+
:param create_refund_request: (required)
|
|
2463
|
+
:type create_refund_request: CreateRefundRequest
|
|
2464
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2465
|
+
number provided, it will be total request
|
|
2466
|
+
timeout. It can also be a pair (tuple) of
|
|
2467
|
+
(connection, read) timeouts.
|
|
2468
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2469
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2470
|
+
request; this effectively ignores the
|
|
2471
|
+
authentication in the spec for a single request.
|
|
2472
|
+
:type _request_auth: dict, optional
|
|
2473
|
+
:param _content_type: force content-type for the request.
|
|
2474
|
+
:type _content_type: str, Optional
|
|
2475
|
+
:param _headers: set to override the headers for a single
|
|
2476
|
+
request; this effectively ignores the headers
|
|
2477
|
+
in the spec for a single request.
|
|
2478
|
+
:type _headers: dict, optional
|
|
2479
|
+
:param _host_index: set to override the host_index for a single
|
|
2480
|
+
request; this effectively ignores the host_index
|
|
2481
|
+
in the spec for a single request.
|
|
2482
|
+
:type _host_index: int, optional
|
|
2483
|
+
:return: Returns the result object.
|
|
2484
|
+
""" # noqa: E501
|
|
2485
|
+
|
|
2486
|
+
_param = self._refund_checkout_serialize(
|
|
2487
|
+
checkout_uuid=checkout_uuid,
|
|
2488
|
+
create_refund_request=create_refund_request,
|
|
2489
|
+
_request_auth=_request_auth,
|
|
2490
|
+
_content_type=_content_type,
|
|
2491
|
+
_headers=_headers,
|
|
2492
|
+
_host_index=_host_index
|
|
2493
|
+
)
|
|
2494
|
+
|
|
2495
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2496
|
+
'204': None,
|
|
2497
|
+
'401': "CreateCheckout401Response",
|
|
2498
|
+
'402': "RefundCheckout402Response",
|
|
2499
|
+
'404': "GetCheckout404Response",
|
|
2500
|
+
'409': "RefundCheckout409Response",
|
|
2501
|
+
}
|
|
2502
|
+
response_data = self.api_client.call_api(
|
|
2503
|
+
*_param,
|
|
2504
|
+
_request_timeout=_request_timeout
|
|
2505
|
+
)
|
|
2506
|
+
response_data.read()
|
|
2507
|
+
return self.api_client.response_deserialize(
|
|
2508
|
+
response_data=response_data,
|
|
2509
|
+
response_types_map=_response_types_map,
|
|
2510
|
+
)
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
@validate_call
|
|
2514
|
+
def refund_checkout_without_preload_content(
|
|
2515
|
+
self,
|
|
2516
|
+
checkout_uuid: StrictStr,
|
|
2517
|
+
create_refund_request: CreateRefundRequest,
|
|
2518
|
+
_request_timeout: Union[
|
|
2519
|
+
None,
|
|
2520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2521
|
+
Tuple[
|
|
2522
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2523
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2524
|
+
]
|
|
2525
|
+
] = None,
|
|
2526
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2527
|
+
_content_type: Optional[StrictStr] = None,
|
|
2528
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2529
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2530
|
+
) -> RESTResponseType:
|
|
2531
|
+
"""Refund a captured checkout
|
|
2532
|
+
|
|
2533
|
+
Initiates a full refund of the captured payment. Returns 204 immediately; Stripe confirms asynchronously via webhook. Poll GET /checkouts/:uuid for status and refund details.
|
|
2534
|
+
|
|
2535
|
+
:param checkout_uuid: (required)
|
|
2536
|
+
:type checkout_uuid: str
|
|
2537
|
+
:param create_refund_request: (required)
|
|
2538
|
+
:type create_refund_request: CreateRefundRequest
|
|
2539
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2540
|
+
number provided, it will be total request
|
|
2541
|
+
timeout. It can also be a pair (tuple) of
|
|
2542
|
+
(connection, read) timeouts.
|
|
2543
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2544
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2545
|
+
request; this effectively ignores the
|
|
2546
|
+
authentication in the spec for a single request.
|
|
2547
|
+
:type _request_auth: dict, optional
|
|
2548
|
+
:param _content_type: force content-type for the request.
|
|
2549
|
+
:type _content_type: str, Optional
|
|
2550
|
+
:param _headers: set to override the headers for a single
|
|
2551
|
+
request; this effectively ignores the headers
|
|
2552
|
+
in the spec for a single request.
|
|
2553
|
+
:type _headers: dict, optional
|
|
2554
|
+
:param _host_index: set to override the host_index for a single
|
|
2555
|
+
request; this effectively ignores the host_index
|
|
2556
|
+
in the spec for a single request.
|
|
2557
|
+
:type _host_index: int, optional
|
|
2558
|
+
:return: Returns the result object.
|
|
2559
|
+
""" # noqa: E501
|
|
2560
|
+
|
|
2561
|
+
_param = self._refund_checkout_serialize(
|
|
2562
|
+
checkout_uuid=checkout_uuid,
|
|
2563
|
+
create_refund_request=create_refund_request,
|
|
2564
|
+
_request_auth=_request_auth,
|
|
2565
|
+
_content_type=_content_type,
|
|
2566
|
+
_headers=_headers,
|
|
2567
|
+
_host_index=_host_index
|
|
2568
|
+
)
|
|
2569
|
+
|
|
2570
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2571
|
+
'204': None,
|
|
2572
|
+
'401': "CreateCheckout401Response",
|
|
2573
|
+
'402': "RefundCheckout402Response",
|
|
2574
|
+
'404': "GetCheckout404Response",
|
|
2575
|
+
'409': "RefundCheckout409Response",
|
|
2576
|
+
}
|
|
2577
|
+
response_data = self.api_client.call_api(
|
|
2578
|
+
*_param,
|
|
2579
|
+
_request_timeout=_request_timeout
|
|
2580
|
+
)
|
|
2581
|
+
return response_data.response
|
|
2582
|
+
|
|
2583
|
+
|
|
2584
|
+
def _refund_checkout_serialize(
|
|
2585
|
+
self,
|
|
2586
|
+
checkout_uuid,
|
|
2587
|
+
create_refund_request,
|
|
2588
|
+
_request_auth,
|
|
2589
|
+
_content_type,
|
|
2590
|
+
_headers,
|
|
2591
|
+
_host_index,
|
|
2592
|
+
) -> RequestSerialized:
|
|
2593
|
+
|
|
2594
|
+
_host = None
|
|
2595
|
+
|
|
2596
|
+
_collection_formats: Dict[str, str] = {
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
_path_params: Dict[str, str] = {}
|
|
2600
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2601
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2602
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2603
|
+
_files: Dict[
|
|
2604
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2605
|
+
] = {}
|
|
2606
|
+
_body_params: Optional[bytes] = None
|
|
2607
|
+
|
|
2608
|
+
# process the path parameters
|
|
2609
|
+
if checkout_uuid is not None:
|
|
2610
|
+
_path_params['checkoutUuid'] = checkout_uuid
|
|
2611
|
+
# process the query parameters
|
|
2612
|
+
# process the header parameters
|
|
2613
|
+
# process the form parameters
|
|
2614
|
+
# process the body parameter
|
|
2615
|
+
if create_refund_request is not None:
|
|
2616
|
+
_body_params = create_refund_request
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
# set the HTTP header `Accept`
|
|
2620
|
+
if 'Accept' not in _header_params:
|
|
2621
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2622
|
+
[
|
|
2623
|
+
'application/json'
|
|
2624
|
+
]
|
|
2625
|
+
)
|
|
2626
|
+
|
|
2627
|
+
# set the HTTP header `Content-Type`
|
|
2628
|
+
if _content_type:
|
|
2629
|
+
_header_params['Content-Type'] = _content_type
|
|
2630
|
+
else:
|
|
2631
|
+
_default_content_type = (
|
|
2632
|
+
self.api_client.select_header_content_type(
|
|
2633
|
+
[
|
|
2634
|
+
'application/json'
|
|
2635
|
+
]
|
|
2636
|
+
)
|
|
2637
|
+
)
|
|
2638
|
+
if _default_content_type is not None:
|
|
2639
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2640
|
+
|
|
2641
|
+
# authentication setting
|
|
2642
|
+
_auth_settings: List[str] = [
|
|
2643
|
+
'bearer'
|
|
2644
|
+
]
|
|
2645
|
+
|
|
2646
|
+
return self.api_client.param_serialize(
|
|
2647
|
+
method='POST',
|
|
2648
|
+
resource_path='/api/merchant/v1/checkouts/{checkoutUuid}/refund',
|
|
2649
|
+
path_params=_path_params,
|
|
2650
|
+
query_params=_query_params,
|
|
2651
|
+
header_params=_header_params,
|
|
2652
|
+
body=_body_params,
|
|
2653
|
+
post_params=_form_params,
|
|
2654
|
+
files=_files,
|
|
2655
|
+
auth_settings=_auth_settings,
|
|
2656
|
+
collection_formats=_collection_formats,
|
|
2657
|
+
_host=_host,
|
|
2658
|
+
_request_auth=_request_auth
|
|
2659
|
+
)
|
|
2660
|
+
|
|
2661
|
+
|