vortex-sdk 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. vortex/__init__.py +265 -0
  2. vortex/api/__init__.py +24 -0
  3. vortex/api/billing_api.py +34608 -0
  4. vortex/api/catalog_api.py +708 -0
  5. vortex/api/checkout_api.py +372 -0
  6. vortex/api/credit_notes_api.py +1688 -0
  7. vortex/api/customer_balance_api.py +1747 -0
  8. vortex/api/customers_api.py +387 -0
  9. vortex/api/discounts_api.py +2623 -0
  10. vortex/api/entitlements_api.py +1646 -0
  11. vortex/api/hosted_api.py +2855 -0
  12. vortex/api/invoices_api.py +2402 -0
  13. vortex/api/payables_api.py +1380 -0
  14. vortex/api/payment_methods_api.py +2069 -0
  15. vortex/api/payment_requests_api.py +1877 -0
  16. vortex/api/payments_api.py +694 -0
  17. vortex/api/payments_readiness_api.py +2311 -0
  18. vortex/api/public_api.py +6931 -0
  19. vortex/api/quotes_api.py +6817 -0
  20. vortex/api/receipts_api.py +1111 -0
  21. vortex/api/subscriptions_api.py +1059 -0
  22. vortex/api/tax_api.py +1397 -0
  23. vortex/api/webhooks_api.py +4931 -0
  24. vortex/api_client.py +804 -0
  25. vortex/api_response.py +21 -0
  26. vortex/configuration.py +658 -0
  27. vortex/exceptions.py +218 -0
  28. vortex/models/__init__.py +104 -0
  29. vortex/models/api_error.py +103 -0
  30. vortex/models/api_error_error.py +114 -0
  31. vortex/models/api_write_envelope.py +101 -0
  32. vortex/models/apply_coupon_request.py +97 -0
  33. vortex/models/billing_order_form_sign_request.py +103 -0
  34. vortex/models/billing_order_form_signature_request_request.py +86 -0
  35. vortex/models/billing_order_form_void_request.py +86 -0
  36. vortex/models/billing_order_forms_expire_due_request.py +90 -0
  37. vortex/models/billing_order_update_request.py +99 -0
  38. vortex/models/billing_orders_execute_due_request.py +90 -0
  39. vortex/models/billing_quote_create_request.py +119 -0
  40. vortex/models/billing_quote_line_input.py +93 -0
  41. vortex/models/billing_quote_version_approve_request.py +87 -0
  42. vortex/models/billing_quote_version_create_request.py +103 -0
  43. vortex/models/billing_quote_version_update_request.py +102 -0
  44. vortex/models/billing_quote_version_void_request.py +96 -0
  45. vortex/models/checkout_session_line_item_request.py +91 -0
  46. vortex/models/coupon_targets.py +89 -0
  47. vortex/models/create_checkout_session_request.py +140 -0
  48. vortex/models/create_coupon_request.py +132 -0
  49. vortex/models/create_deposit_balance_payable_request.py +172 -0
  50. vortex/models/create_installment_payable_request.py +170 -0
  51. vortex/models/create_payable_request.py +158 -0
  52. vortex/models/create_recurring_payable_request.py +181 -0
  53. vortex/models/create_recurring_payable_request_cadence.py +96 -0
  54. vortex/models/credit_note_create_line.py +105 -0
  55. vortex/models/credit_note_create_request.py +112 -0
  56. vortex/models/credit_note_reason.py +39 -0
  57. vortex/models/credit_note_refund_reconcile_request.py +86 -0
  58. vortex/models/credit_note_refund_request.py +94 -0
  59. vortex/models/customer_balance_targets.py +102 -0
  60. vortex/models/customer_default_payment_method_request.py +88 -0
  61. vortex/models/customer_payment_method_archive_request.py +88 -0
  62. vortex/models/customer_payment_method_attach_request.py +94 -0
  63. vortex/models/customer_payment_method_setup_request.py +100 -0
  64. vortex/models/customer_upsert_request.py +96 -0
  65. vortex/models/expire_customer_balance_request.py +98 -0
  66. vortex/models/grant_customer_balance_from_payment_request.py +103 -0
  67. vortex/models/grant_customer_balance_request.py +106 -0
  68. vortex/models/grant_entitlement_request.py +106 -0
  69. vortex/models/invoice_collect_request.py +86 -0
  70. vortex/models/invoice_create_request.py +92 -0
  71. vortex/models/invoice_finalize_request.py +86 -0
  72. vortex/models/invoice_mark_uncollectible_request.py +90 -0
  73. vortex/models/invoice_tax.py +142 -0
  74. vortex/models/invoice_void_request.py +88 -0
  75. vortex/models/merchant_account_create_request.py +183 -0
  76. vortex/models/merchant_address.py +96 -0
  77. vortex/models/merchant_associated_identity.py +114 -0
  78. vortex/models/merchant_onboarding_link_request.py +95 -0
  79. vortex/models/merchant_profile_date.py +90 -0
  80. vortex/models/merchant_settlement_bank_account.py +94 -0
  81. vortex/models/merchant_tax_profile_request.py +125 -0
  82. vortex/models/merchant_tax_profile_request_registrations_inner.py +88 -0
  83. vortex/models/merchant_underwriting_data.py +127 -0
  84. vortex/models/merchant_underwriting_data_card_volume_distribution.py +90 -0
  85. vortex/models/merchant_underwriting_data_volume_distribution_by_business_type.py +90 -0
  86. vortex/models/open_api_invoice_tax_response.py +92 -0
  87. vortex/models/open_api_invoice_tax_response_all_of_data.py +92 -0
  88. vortex/models/payment_request_collect_request.py +86 -0
  89. vortex/models/payment_request_create_request.py +100 -0
  90. vortex/models/payment_request_link_create_request.py +89 -0
  91. vortex/models/price_create_request.py +122 -0
  92. vortex/models/product_create_request.py +92 -0
  93. vortex/models/reverse_customer_balance_request.py +98 -0
  94. vortex/models/revoke_entitlement_request.py +106 -0
  95. vortex/models/subscription_change_request.py +111 -0
  96. vortex/models/subscription_create_request.py +122 -0
  97. vortex/models/subscription_item_change_preview_request.py +100 -0
  98. vortex/models/subscription_item_change_request_item.py +91 -0
  99. vortex/models/tax_address.py +96 -0
  100. vortex/models/tax_behavior.py +36 -0
  101. vortex/models/tax_behavior_policy.py +100 -0
  102. vortex/models/tax_behavior_policy_request.py +89 -0
  103. vortex/models/tax_failure.py +104 -0
  104. vortex/models/tax_finalize_request.py +98 -0
  105. vortex/models/tax_jurisdiction_evidence.py +94 -0
  106. vortex/models/tax_line_evidence.py +103 -0
  107. vortex/models/tax_quote_request.py +98 -0
  108. vortex/models/terminate_applied_coupon_request.py +87 -0
  109. vortex/models/terminate_coupon_request.py +87 -0
  110. vortex/models/webhook_deliveries_dispatch_request.py +91 -0
  111. vortex/models/webhook_deliveries_redrive_request.py +107 -0
  112. vortex/models/webhook_delivery_replay_request.py +88 -0
  113. vortex/models/webhook_endpoint_create_request.py +91 -0
  114. vortex/models/webhook_endpoint_secret_rotate_request.py +87 -0
  115. vortex/models/webhook_endpoint_test_request.py +88 -0
  116. vortex/models/webhook_endpoint_update_request.py +103 -0
  117. vortex/models/webhook_event_resend_request.py +86 -0
  118. vortex/rest.py +263 -0
  119. vortex_sdk-0.2.0.dist-info/METADATA +34 -0
  120. vortex_sdk-0.2.0.dist-info/RECORD +123 -0
  121. vortex_sdk-0.2.0.dist-info/WHEEL +5 -0
  122. vortex_sdk-0.2.0.dist-info/licenses/LICENSE +21 -0
  123. vortex_sdk-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2311 @@
1
+ """
2
+ Vortex Payments API
3
+
4
+ Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
5
+
6
+ The version of the OpenAPI document: 2026-08
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
19
+ from typing import Optional
20
+ from typing_extensions import Annotated
21
+ from vortex.models.api_write_envelope import ApiWriteEnvelope
22
+ from vortex.models.merchant_account_create_request import MerchantAccountCreateRequest
23
+ from vortex.models.merchant_onboarding_link_request import MerchantOnboardingLinkRequest
24
+
25
+ from vortex.api_client import ApiClient, RequestSerialized
26
+ from vortex.api_response import ApiResponse
27
+ from vortex.rest import RESTResponseType
28
+
29
+
30
+ class PaymentsReadinessApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def create_merchant_account(
45
+ self,
46
+ environment: StrictStr,
47
+ merchant_account_id: StrictStr,
48
+ merchant_account_create_request: MerchantAccountCreateRequest,
49
+ idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.")] = None,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> ApiWriteEnvelope:
63
+ """Create a sub-merchant account
64
+
65
+
66
+ :param environment: (required)
67
+ :type environment: str
68
+ :param merchant_account_id: (required)
69
+ :type merchant_account_id: str
70
+ :param merchant_account_create_request: (required)
71
+ :type merchant_account_create_request: MerchantAccountCreateRequest
72
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
73
+ :type idempotency_key: str
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._create_merchant_account_serialize(
97
+ environment=environment,
98
+ merchant_account_id=merchant_account_id,
99
+ merchant_account_create_request=merchant_account_create_request,
100
+ idempotency_key=idempotency_key,
101
+ _request_auth=_request_auth,
102
+ _content_type=_content_type,
103
+ _headers=_headers,
104
+ _host_index=_host_index
105
+ )
106
+
107
+ _response_types_map: Dict[str, Optional[str]] = {
108
+ '200': "ApiWriteEnvelope",
109
+ '400': "ApiError",
110
+ '401': "ApiError",
111
+ '409': "ApiError",
112
+ '422': "ApiError",
113
+ '429': "ApiError",
114
+ }
115
+ response_data = self.api_client.call_api(
116
+ *_param,
117
+ _request_timeout=_request_timeout
118
+ )
119
+ response_data.read()
120
+ return self.api_client.response_deserialize(
121
+ response_data=response_data,
122
+ response_types_map=_response_types_map,
123
+ ).data
124
+
125
+
126
+ @validate_call
127
+ def create_merchant_account_with_http_info(
128
+ self,
129
+ environment: StrictStr,
130
+ merchant_account_id: StrictStr,
131
+ merchant_account_create_request: MerchantAccountCreateRequest,
132
+ idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.")] = None,
133
+ _request_timeout: Union[
134
+ None,
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Tuple[
137
+ Annotated[StrictFloat, Field(gt=0)],
138
+ Annotated[StrictFloat, Field(gt=0)]
139
+ ]
140
+ ] = None,
141
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
142
+ _content_type: Optional[StrictStr] = None,
143
+ _headers: Optional[Dict[StrictStr, Any]] = None,
144
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
145
+ ) -> ApiResponse[ApiWriteEnvelope]:
146
+ """Create a sub-merchant account
147
+
148
+
149
+ :param environment: (required)
150
+ :type environment: str
151
+ :param merchant_account_id: (required)
152
+ :type merchant_account_id: str
153
+ :param merchant_account_create_request: (required)
154
+ :type merchant_account_create_request: MerchantAccountCreateRequest
155
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
156
+ :type idempotency_key: str
157
+ :param _request_timeout: timeout setting for this request. If one
158
+ number provided, it will be total request
159
+ timeout. It can also be a pair (tuple) of
160
+ (connection, read) timeouts.
161
+ :type _request_timeout: int, tuple(int, int), optional
162
+ :param _request_auth: set to override the auth_settings for an a single
163
+ request; this effectively ignores the
164
+ authentication in the spec for a single request.
165
+ :type _request_auth: dict, optional
166
+ :param _content_type: force content-type for the request.
167
+ :type _content_type: str, Optional
168
+ :param _headers: set to override the headers for a single
169
+ request; this effectively ignores the headers
170
+ in the spec for a single request.
171
+ :type _headers: dict, optional
172
+ :param _host_index: set to override the host_index for a single
173
+ request; this effectively ignores the host_index
174
+ in the spec for a single request.
175
+ :type _host_index: int, optional
176
+ :return: Returns the result object.
177
+ """ # noqa: E501
178
+
179
+ _param = self._create_merchant_account_serialize(
180
+ environment=environment,
181
+ merchant_account_id=merchant_account_id,
182
+ merchant_account_create_request=merchant_account_create_request,
183
+ idempotency_key=idempotency_key,
184
+ _request_auth=_request_auth,
185
+ _content_type=_content_type,
186
+ _headers=_headers,
187
+ _host_index=_host_index
188
+ )
189
+
190
+ _response_types_map: Dict[str, Optional[str]] = {
191
+ '200': "ApiWriteEnvelope",
192
+ '400': "ApiError",
193
+ '401': "ApiError",
194
+ '409': "ApiError",
195
+ '422': "ApiError",
196
+ '429': "ApiError",
197
+ }
198
+ response_data = self.api_client.call_api(
199
+ *_param,
200
+ _request_timeout=_request_timeout
201
+ )
202
+ response_data.read()
203
+ return self.api_client.response_deserialize(
204
+ response_data=response_data,
205
+ response_types_map=_response_types_map,
206
+ )
207
+
208
+
209
+ @validate_call
210
+ def create_merchant_account_without_preload_content(
211
+ self,
212
+ environment: StrictStr,
213
+ merchant_account_id: StrictStr,
214
+ merchant_account_create_request: MerchantAccountCreateRequest,
215
+ idempotency_key: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.")] = None,
216
+ _request_timeout: Union[
217
+ None,
218
+ Annotated[StrictFloat, Field(gt=0)],
219
+ Tuple[
220
+ Annotated[StrictFloat, Field(gt=0)],
221
+ Annotated[StrictFloat, Field(gt=0)]
222
+ ]
223
+ ] = None,
224
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
225
+ _content_type: Optional[StrictStr] = None,
226
+ _headers: Optional[Dict[StrictStr, Any]] = None,
227
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
228
+ ) -> RESTResponseType:
229
+ """Create a sub-merchant account
230
+
231
+
232
+ :param environment: (required)
233
+ :type environment: str
234
+ :param merchant_account_id: (required)
235
+ :type merchant_account_id: str
236
+ :param merchant_account_create_request: (required)
237
+ :type merchant_account_create_request: MerchantAccountCreateRequest
238
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
239
+ :type idempotency_key: str
240
+ :param _request_timeout: timeout setting for this request. If one
241
+ number provided, it will be total request
242
+ timeout. It can also be a pair (tuple) of
243
+ (connection, read) timeouts.
244
+ :type _request_timeout: int, tuple(int, int), optional
245
+ :param _request_auth: set to override the auth_settings for an a single
246
+ request; this effectively ignores the
247
+ authentication in the spec for a single request.
248
+ :type _request_auth: dict, optional
249
+ :param _content_type: force content-type for the request.
250
+ :type _content_type: str, Optional
251
+ :param _headers: set to override the headers for a single
252
+ request; this effectively ignores the headers
253
+ in the spec for a single request.
254
+ :type _headers: dict, optional
255
+ :param _host_index: set to override the host_index for a single
256
+ request; this effectively ignores the host_index
257
+ in the spec for a single request.
258
+ :type _host_index: int, optional
259
+ :return: Returns the result object.
260
+ """ # noqa: E501
261
+
262
+ _param = self._create_merchant_account_serialize(
263
+ environment=environment,
264
+ merchant_account_id=merchant_account_id,
265
+ merchant_account_create_request=merchant_account_create_request,
266
+ idempotency_key=idempotency_key,
267
+ _request_auth=_request_auth,
268
+ _content_type=_content_type,
269
+ _headers=_headers,
270
+ _host_index=_host_index
271
+ )
272
+
273
+ _response_types_map: Dict[str, Optional[str]] = {
274
+ '200': "ApiWriteEnvelope",
275
+ '400': "ApiError",
276
+ '401': "ApiError",
277
+ '409': "ApiError",
278
+ '422': "ApiError",
279
+ '429': "ApiError",
280
+ }
281
+ response_data = self.api_client.call_api(
282
+ *_param,
283
+ _request_timeout=_request_timeout
284
+ )
285
+ return response_data.response
286
+
287
+
288
+ def _create_merchant_account_serialize(
289
+ self,
290
+ environment,
291
+ merchant_account_id,
292
+ merchant_account_create_request,
293
+ idempotency_key,
294
+ _request_auth,
295
+ _content_type,
296
+ _headers,
297
+ _host_index,
298
+ ) -> RequestSerialized:
299
+
300
+ _host = None
301
+
302
+ _collection_formats: Dict[str, str] = {
303
+ }
304
+
305
+ _path_params: Dict[str, str] = {}
306
+ _query_params: List[Tuple[str, str]] = []
307
+ _header_params: Dict[str, Optional[str]] = _headers or {}
308
+ _form_params: List[Tuple[str, str]] = []
309
+ _files: Dict[
310
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
311
+ ] = {}
312
+ _body_params: Optional[bytes] = None
313
+
314
+ # process the path parameters
315
+ # process the query parameters
316
+ if environment is not None:
317
+
318
+ _query_params.append(('environment', environment))
319
+
320
+ if merchant_account_id is not None:
321
+
322
+ _query_params.append(('merchantAccountId', merchant_account_id))
323
+
324
+ # process the header parameters
325
+ if idempotency_key is not None:
326
+ _header_params['Idempotency-Key'] = idempotency_key
327
+ # process the form parameters
328
+ # process the body parameter
329
+ if merchant_account_create_request is not None:
330
+ _body_params = merchant_account_create_request
331
+
332
+
333
+ # set the HTTP header `Accept`
334
+ if 'Accept' not in _header_params:
335
+ _header_params['Accept'] = self.api_client.select_header_accept(
336
+ [
337
+ 'application/json'
338
+ ]
339
+ )
340
+
341
+ # set the HTTP header `Content-Type`
342
+ if _content_type:
343
+ _header_params['Content-Type'] = _content_type
344
+ else:
345
+ _default_content_type = (
346
+ self.api_client.select_header_content_type(
347
+ [
348
+ 'application/json'
349
+ ]
350
+ )
351
+ )
352
+ if _default_content_type is not None:
353
+ _header_params['Content-Type'] = _default_content_type
354
+
355
+ # authentication setting
356
+ _auth_settings: List[str] = [
357
+ 'api-key'
358
+ ]
359
+
360
+ return self.api_client.param_serialize(
361
+ method='POST',
362
+ resource_path='/v1/merchant-accounts',
363
+ path_params=_path_params,
364
+ query_params=_query_params,
365
+ header_params=_header_params,
366
+ body=_body_params,
367
+ post_params=_form_params,
368
+ files=_files,
369
+ auth_settings=_auth_settings,
370
+ collection_formats=_collection_formats,
371
+ _host=_host,
372
+ _request_auth=_request_auth
373
+ )
374
+
375
+
376
+
377
+
378
+ @validate_call
379
+ def create_merchant_onboarding_link(
380
+ self,
381
+ merchant_account_id: StrictStr,
382
+ environment: StrictStr,
383
+ merchant_account_id2: StrictStr,
384
+ merchant_onboarding_link_request: MerchantOnboardingLinkRequest,
385
+ _request_timeout: Union[
386
+ None,
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Tuple[
389
+ Annotated[StrictFloat, Field(gt=0)],
390
+ Annotated[StrictFloat, Field(gt=0)]
391
+ ]
392
+ ] = None,
393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
394
+ _content_type: Optional[StrictStr] = None,
395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
397
+ ) -> ApiWriteEnvelope:
398
+ """Create a hosted merchant onboarding link
399
+
400
+
401
+ :param merchant_account_id: (required)
402
+ :type merchant_account_id: str
403
+ :param environment: (required)
404
+ :type environment: str
405
+ :param merchant_account_id2: (required)
406
+ :type merchant_account_id2: str
407
+ :param merchant_onboarding_link_request: (required)
408
+ :type merchant_onboarding_link_request: MerchantOnboardingLinkRequest
409
+ :param _request_timeout: timeout setting for this request. If one
410
+ number provided, it will be total request
411
+ timeout. It can also be a pair (tuple) of
412
+ (connection, read) timeouts.
413
+ :type _request_timeout: int, tuple(int, int), optional
414
+ :param _request_auth: set to override the auth_settings for an a single
415
+ request; this effectively ignores the
416
+ authentication in the spec for a single request.
417
+ :type _request_auth: dict, optional
418
+ :param _content_type: force content-type for the request.
419
+ :type _content_type: str, Optional
420
+ :param _headers: set to override the headers for a single
421
+ request; this effectively ignores the headers
422
+ in the spec for a single request.
423
+ :type _headers: dict, optional
424
+ :param _host_index: set to override the host_index for a single
425
+ request; this effectively ignores the host_index
426
+ in the spec for a single request.
427
+ :type _host_index: int, optional
428
+ :return: Returns the result object.
429
+ """ # noqa: E501
430
+
431
+ _param = self._create_merchant_onboarding_link_serialize(
432
+ merchant_account_id=merchant_account_id,
433
+ environment=environment,
434
+ merchant_account_id2=merchant_account_id2,
435
+ merchant_onboarding_link_request=merchant_onboarding_link_request,
436
+ _request_auth=_request_auth,
437
+ _content_type=_content_type,
438
+ _headers=_headers,
439
+ _host_index=_host_index
440
+ )
441
+
442
+ _response_types_map: Dict[str, Optional[str]] = {
443
+ '200': "ApiWriteEnvelope",
444
+ '400': "ApiError",
445
+ '401': "ApiError",
446
+ '409': "ApiError",
447
+ '422': "ApiError",
448
+ '429': "ApiError",
449
+ }
450
+ response_data = self.api_client.call_api(
451
+ *_param,
452
+ _request_timeout=_request_timeout
453
+ )
454
+ response_data.read()
455
+ return self.api_client.response_deserialize(
456
+ response_data=response_data,
457
+ response_types_map=_response_types_map,
458
+ ).data
459
+
460
+
461
+ @validate_call
462
+ def create_merchant_onboarding_link_with_http_info(
463
+ self,
464
+ merchant_account_id: StrictStr,
465
+ environment: StrictStr,
466
+ merchant_account_id2: StrictStr,
467
+ merchant_onboarding_link_request: MerchantOnboardingLinkRequest,
468
+ _request_timeout: Union[
469
+ None,
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Tuple[
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Annotated[StrictFloat, Field(gt=0)]
474
+ ]
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> ApiResponse[ApiWriteEnvelope]:
481
+ """Create a hosted merchant onboarding link
482
+
483
+
484
+ :param merchant_account_id: (required)
485
+ :type merchant_account_id: str
486
+ :param environment: (required)
487
+ :type environment: str
488
+ :param merchant_account_id2: (required)
489
+ :type merchant_account_id2: str
490
+ :param merchant_onboarding_link_request: (required)
491
+ :type merchant_onboarding_link_request: MerchantOnboardingLinkRequest
492
+ :param _request_timeout: timeout setting for this request. If one
493
+ number provided, it will be total request
494
+ timeout. It can also be a pair (tuple) of
495
+ (connection, read) timeouts.
496
+ :type _request_timeout: int, tuple(int, int), optional
497
+ :param _request_auth: set to override the auth_settings for an a single
498
+ request; this effectively ignores the
499
+ authentication in the spec for a single request.
500
+ :type _request_auth: dict, optional
501
+ :param _content_type: force content-type for the request.
502
+ :type _content_type: str, Optional
503
+ :param _headers: set to override the headers for a single
504
+ request; this effectively ignores the headers
505
+ in the spec for a single request.
506
+ :type _headers: dict, optional
507
+ :param _host_index: set to override the host_index for a single
508
+ request; this effectively ignores the host_index
509
+ in the spec for a single request.
510
+ :type _host_index: int, optional
511
+ :return: Returns the result object.
512
+ """ # noqa: E501
513
+
514
+ _param = self._create_merchant_onboarding_link_serialize(
515
+ merchant_account_id=merchant_account_id,
516
+ environment=environment,
517
+ merchant_account_id2=merchant_account_id2,
518
+ merchant_onboarding_link_request=merchant_onboarding_link_request,
519
+ _request_auth=_request_auth,
520
+ _content_type=_content_type,
521
+ _headers=_headers,
522
+ _host_index=_host_index
523
+ )
524
+
525
+ _response_types_map: Dict[str, Optional[str]] = {
526
+ '200': "ApiWriteEnvelope",
527
+ '400': "ApiError",
528
+ '401': "ApiError",
529
+ '409': "ApiError",
530
+ '422': "ApiError",
531
+ '429': "ApiError",
532
+ }
533
+ response_data = self.api_client.call_api(
534
+ *_param,
535
+ _request_timeout=_request_timeout
536
+ )
537
+ response_data.read()
538
+ return self.api_client.response_deserialize(
539
+ response_data=response_data,
540
+ response_types_map=_response_types_map,
541
+ )
542
+
543
+
544
+ @validate_call
545
+ def create_merchant_onboarding_link_without_preload_content(
546
+ self,
547
+ merchant_account_id: StrictStr,
548
+ environment: StrictStr,
549
+ merchant_account_id2: StrictStr,
550
+ merchant_onboarding_link_request: MerchantOnboardingLinkRequest,
551
+ _request_timeout: Union[
552
+ None,
553
+ Annotated[StrictFloat, Field(gt=0)],
554
+ Tuple[
555
+ Annotated[StrictFloat, Field(gt=0)],
556
+ Annotated[StrictFloat, Field(gt=0)]
557
+ ]
558
+ ] = None,
559
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
560
+ _content_type: Optional[StrictStr] = None,
561
+ _headers: Optional[Dict[StrictStr, Any]] = None,
562
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
563
+ ) -> RESTResponseType:
564
+ """Create a hosted merchant onboarding link
565
+
566
+
567
+ :param merchant_account_id: (required)
568
+ :type merchant_account_id: str
569
+ :param environment: (required)
570
+ :type environment: str
571
+ :param merchant_account_id2: (required)
572
+ :type merchant_account_id2: str
573
+ :param merchant_onboarding_link_request: (required)
574
+ :type merchant_onboarding_link_request: MerchantOnboardingLinkRequest
575
+ :param _request_timeout: timeout setting for this request. If one
576
+ number provided, it will be total request
577
+ timeout. It can also be a pair (tuple) of
578
+ (connection, read) timeouts.
579
+ :type _request_timeout: int, tuple(int, int), optional
580
+ :param _request_auth: set to override the auth_settings for an a single
581
+ request; this effectively ignores the
582
+ authentication in the spec for a single request.
583
+ :type _request_auth: dict, optional
584
+ :param _content_type: force content-type for the request.
585
+ :type _content_type: str, Optional
586
+ :param _headers: set to override the headers for a single
587
+ request; this effectively ignores the headers
588
+ in the spec for a single request.
589
+ :type _headers: dict, optional
590
+ :param _host_index: set to override the host_index for a single
591
+ request; this effectively ignores the host_index
592
+ in the spec for a single request.
593
+ :type _host_index: int, optional
594
+ :return: Returns the result object.
595
+ """ # noqa: E501
596
+
597
+ _param = self._create_merchant_onboarding_link_serialize(
598
+ merchant_account_id=merchant_account_id,
599
+ environment=environment,
600
+ merchant_account_id2=merchant_account_id2,
601
+ merchant_onboarding_link_request=merchant_onboarding_link_request,
602
+ _request_auth=_request_auth,
603
+ _content_type=_content_type,
604
+ _headers=_headers,
605
+ _host_index=_host_index
606
+ )
607
+
608
+ _response_types_map: Dict[str, Optional[str]] = {
609
+ '200': "ApiWriteEnvelope",
610
+ '400': "ApiError",
611
+ '401': "ApiError",
612
+ '409': "ApiError",
613
+ '422': "ApiError",
614
+ '429': "ApiError",
615
+ }
616
+ response_data = self.api_client.call_api(
617
+ *_param,
618
+ _request_timeout=_request_timeout
619
+ )
620
+ return response_data.response
621
+
622
+
623
+ def _create_merchant_onboarding_link_serialize(
624
+ self,
625
+ merchant_account_id,
626
+ environment,
627
+ merchant_account_id2,
628
+ merchant_onboarding_link_request,
629
+ _request_auth,
630
+ _content_type,
631
+ _headers,
632
+ _host_index,
633
+ ) -> RequestSerialized:
634
+
635
+ _host = None
636
+
637
+ _collection_formats: Dict[str, str] = {
638
+ }
639
+
640
+ _path_params: Dict[str, str] = {}
641
+ _query_params: List[Tuple[str, str]] = []
642
+ _header_params: Dict[str, Optional[str]] = _headers or {}
643
+ _form_params: List[Tuple[str, str]] = []
644
+ _files: Dict[
645
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
646
+ ] = {}
647
+ _body_params: Optional[bytes] = None
648
+
649
+ # process the path parameters
650
+ if merchant_account_id is not None:
651
+ _path_params['merchantAccountId'] = merchant_account_id
652
+ # process the query parameters
653
+ if environment is not None:
654
+
655
+ _query_params.append(('environment', environment))
656
+
657
+ if merchant_account_id2 is not None:
658
+
659
+ _query_params.append(('merchantAccountId', merchant_account_id2))
660
+
661
+ # process the header parameters
662
+ # process the form parameters
663
+ # process the body parameter
664
+ if merchant_onboarding_link_request is not None:
665
+ _body_params = merchant_onboarding_link_request
666
+
667
+
668
+ # set the HTTP header `Accept`
669
+ if 'Accept' not in _header_params:
670
+ _header_params['Accept'] = self.api_client.select_header_accept(
671
+ [
672
+ 'application/json'
673
+ ]
674
+ )
675
+
676
+ # set the HTTP header `Content-Type`
677
+ if _content_type:
678
+ _header_params['Content-Type'] = _content_type
679
+ else:
680
+ _default_content_type = (
681
+ self.api_client.select_header_content_type(
682
+ [
683
+ 'application/json'
684
+ ]
685
+ )
686
+ )
687
+ if _default_content_type is not None:
688
+ _header_params['Content-Type'] = _default_content_type
689
+
690
+ # authentication setting
691
+ _auth_settings: List[str] = [
692
+ 'api-key'
693
+ ]
694
+
695
+ return self.api_client.param_serialize(
696
+ method='POST',
697
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/onboarding-link',
698
+ path_params=_path_params,
699
+ query_params=_query_params,
700
+ header_params=_header_params,
701
+ body=_body_params,
702
+ post_params=_form_params,
703
+ files=_files,
704
+ auth_settings=_auth_settings,
705
+ collection_formats=_collection_formats,
706
+ _host=_host,
707
+ _request_auth=_request_auth
708
+ )
709
+
710
+
711
+
712
+
713
+ @validate_call
714
+ def get_merchant_account_capabilities(
715
+ self,
716
+ merchant_account_id: StrictStr,
717
+ environment: StrictStr,
718
+ merchant_account_id2: StrictStr,
719
+ _request_timeout: Union[
720
+ None,
721
+ Annotated[StrictFloat, Field(gt=0)],
722
+ Tuple[
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Annotated[StrictFloat, Field(gt=0)]
725
+ ]
726
+ ] = None,
727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
728
+ _content_type: Optional[StrictStr] = None,
729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
731
+ ) -> ApiWriteEnvelope:
732
+ """Get merchant payments capability state
733
+
734
+
735
+ :param merchant_account_id: (required)
736
+ :type merchant_account_id: str
737
+ :param environment: (required)
738
+ :type environment: str
739
+ :param merchant_account_id2: (required)
740
+ :type merchant_account_id2: str
741
+ :param _request_timeout: timeout setting for this request. If one
742
+ number provided, it will be total request
743
+ timeout. It can also be a pair (tuple) of
744
+ (connection, read) timeouts.
745
+ :type _request_timeout: int, tuple(int, int), optional
746
+ :param _request_auth: set to override the auth_settings for an a single
747
+ request; this effectively ignores the
748
+ authentication in the spec for a single request.
749
+ :type _request_auth: dict, optional
750
+ :param _content_type: force content-type for the request.
751
+ :type _content_type: str, Optional
752
+ :param _headers: set to override the headers for a single
753
+ request; this effectively ignores the headers
754
+ in the spec for a single request.
755
+ :type _headers: dict, optional
756
+ :param _host_index: set to override the host_index for a single
757
+ request; this effectively ignores the host_index
758
+ in the spec for a single request.
759
+ :type _host_index: int, optional
760
+ :return: Returns the result object.
761
+ """ # noqa: E501
762
+
763
+ _param = self._get_merchant_account_capabilities_serialize(
764
+ merchant_account_id=merchant_account_id,
765
+ environment=environment,
766
+ merchant_account_id2=merchant_account_id2,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "ApiWriteEnvelope",
775
+ '400': "ApiError",
776
+ '401': "ApiError",
777
+ '409': "ApiError",
778
+ '422': "ApiError",
779
+ '429': "ApiError",
780
+ }
781
+ response_data = self.api_client.call_api(
782
+ *_param,
783
+ _request_timeout=_request_timeout
784
+ )
785
+ response_data.read()
786
+ return self.api_client.response_deserialize(
787
+ response_data=response_data,
788
+ response_types_map=_response_types_map,
789
+ ).data
790
+
791
+
792
+ @validate_call
793
+ def get_merchant_account_capabilities_with_http_info(
794
+ self,
795
+ merchant_account_id: StrictStr,
796
+ environment: StrictStr,
797
+ merchant_account_id2: StrictStr,
798
+ _request_timeout: Union[
799
+ None,
800
+ Annotated[StrictFloat, Field(gt=0)],
801
+ Tuple[
802
+ Annotated[StrictFloat, Field(gt=0)],
803
+ Annotated[StrictFloat, Field(gt=0)]
804
+ ]
805
+ ] = None,
806
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
807
+ _content_type: Optional[StrictStr] = None,
808
+ _headers: Optional[Dict[StrictStr, Any]] = None,
809
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
810
+ ) -> ApiResponse[ApiWriteEnvelope]:
811
+ """Get merchant payments capability state
812
+
813
+
814
+ :param merchant_account_id: (required)
815
+ :type merchant_account_id: str
816
+ :param environment: (required)
817
+ :type environment: str
818
+ :param merchant_account_id2: (required)
819
+ :type merchant_account_id2: str
820
+ :param _request_timeout: timeout setting for this request. If one
821
+ number provided, it will be total request
822
+ timeout. It can also be a pair (tuple) of
823
+ (connection, read) timeouts.
824
+ :type _request_timeout: int, tuple(int, int), optional
825
+ :param _request_auth: set to override the auth_settings for an a single
826
+ request; this effectively ignores the
827
+ authentication in the spec for a single request.
828
+ :type _request_auth: dict, optional
829
+ :param _content_type: force content-type for the request.
830
+ :type _content_type: str, Optional
831
+ :param _headers: set to override the headers for a single
832
+ request; this effectively ignores the headers
833
+ in the spec for a single request.
834
+ :type _headers: dict, optional
835
+ :param _host_index: set to override the host_index for a single
836
+ request; this effectively ignores the host_index
837
+ in the spec for a single request.
838
+ :type _host_index: int, optional
839
+ :return: Returns the result object.
840
+ """ # noqa: E501
841
+
842
+ _param = self._get_merchant_account_capabilities_serialize(
843
+ merchant_account_id=merchant_account_id,
844
+ environment=environment,
845
+ merchant_account_id2=merchant_account_id2,
846
+ _request_auth=_request_auth,
847
+ _content_type=_content_type,
848
+ _headers=_headers,
849
+ _host_index=_host_index
850
+ )
851
+
852
+ _response_types_map: Dict[str, Optional[str]] = {
853
+ '200': "ApiWriteEnvelope",
854
+ '400': "ApiError",
855
+ '401': "ApiError",
856
+ '409': "ApiError",
857
+ '422': "ApiError",
858
+ '429': "ApiError",
859
+ }
860
+ response_data = self.api_client.call_api(
861
+ *_param,
862
+ _request_timeout=_request_timeout
863
+ )
864
+ response_data.read()
865
+ return self.api_client.response_deserialize(
866
+ response_data=response_data,
867
+ response_types_map=_response_types_map,
868
+ )
869
+
870
+
871
+ @validate_call
872
+ def get_merchant_account_capabilities_without_preload_content(
873
+ self,
874
+ merchant_account_id: StrictStr,
875
+ environment: StrictStr,
876
+ merchant_account_id2: StrictStr,
877
+ _request_timeout: Union[
878
+ None,
879
+ Annotated[StrictFloat, Field(gt=0)],
880
+ Tuple[
881
+ Annotated[StrictFloat, Field(gt=0)],
882
+ Annotated[StrictFloat, Field(gt=0)]
883
+ ]
884
+ ] = None,
885
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
886
+ _content_type: Optional[StrictStr] = None,
887
+ _headers: Optional[Dict[StrictStr, Any]] = None,
888
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
889
+ ) -> RESTResponseType:
890
+ """Get merchant payments capability state
891
+
892
+
893
+ :param merchant_account_id: (required)
894
+ :type merchant_account_id: str
895
+ :param environment: (required)
896
+ :type environment: str
897
+ :param merchant_account_id2: (required)
898
+ :type merchant_account_id2: str
899
+ :param _request_timeout: timeout setting for this request. If one
900
+ number provided, it will be total request
901
+ timeout. It can also be a pair (tuple) of
902
+ (connection, read) timeouts.
903
+ :type _request_timeout: int, tuple(int, int), optional
904
+ :param _request_auth: set to override the auth_settings for an a single
905
+ request; this effectively ignores the
906
+ authentication in the spec for a single request.
907
+ :type _request_auth: dict, optional
908
+ :param _content_type: force content-type for the request.
909
+ :type _content_type: str, Optional
910
+ :param _headers: set to override the headers for a single
911
+ request; this effectively ignores the headers
912
+ in the spec for a single request.
913
+ :type _headers: dict, optional
914
+ :param _host_index: set to override the host_index for a single
915
+ request; this effectively ignores the host_index
916
+ in the spec for a single request.
917
+ :type _host_index: int, optional
918
+ :return: Returns the result object.
919
+ """ # noqa: E501
920
+
921
+ _param = self._get_merchant_account_capabilities_serialize(
922
+ merchant_account_id=merchant_account_id,
923
+ environment=environment,
924
+ merchant_account_id2=merchant_account_id2,
925
+ _request_auth=_request_auth,
926
+ _content_type=_content_type,
927
+ _headers=_headers,
928
+ _host_index=_host_index
929
+ )
930
+
931
+ _response_types_map: Dict[str, Optional[str]] = {
932
+ '200': "ApiWriteEnvelope",
933
+ '400': "ApiError",
934
+ '401': "ApiError",
935
+ '409': "ApiError",
936
+ '422': "ApiError",
937
+ '429': "ApiError",
938
+ }
939
+ response_data = self.api_client.call_api(
940
+ *_param,
941
+ _request_timeout=_request_timeout
942
+ )
943
+ return response_data.response
944
+
945
+
946
+ def _get_merchant_account_capabilities_serialize(
947
+ self,
948
+ merchant_account_id,
949
+ environment,
950
+ merchant_account_id2,
951
+ _request_auth,
952
+ _content_type,
953
+ _headers,
954
+ _host_index,
955
+ ) -> RequestSerialized:
956
+
957
+ _host = None
958
+
959
+ _collection_formats: Dict[str, str] = {
960
+ }
961
+
962
+ _path_params: Dict[str, str] = {}
963
+ _query_params: List[Tuple[str, str]] = []
964
+ _header_params: Dict[str, Optional[str]] = _headers or {}
965
+ _form_params: List[Tuple[str, str]] = []
966
+ _files: Dict[
967
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
968
+ ] = {}
969
+ _body_params: Optional[bytes] = None
970
+
971
+ # process the path parameters
972
+ if merchant_account_id is not None:
973
+ _path_params['merchantAccountId'] = merchant_account_id
974
+ # process the query parameters
975
+ if environment is not None:
976
+
977
+ _query_params.append(('environment', environment))
978
+
979
+ if merchant_account_id2 is not None:
980
+
981
+ _query_params.append(('merchantAccountId', merchant_account_id2))
982
+
983
+ # process the header parameters
984
+ # process the form parameters
985
+ # process the body parameter
986
+
987
+
988
+ # set the HTTP header `Accept`
989
+ if 'Accept' not in _header_params:
990
+ _header_params['Accept'] = self.api_client.select_header_accept(
991
+ [
992
+ 'application/json'
993
+ ]
994
+ )
995
+
996
+
997
+ # authentication setting
998
+ _auth_settings: List[str] = [
999
+ 'api-key'
1000
+ ]
1001
+
1002
+ return self.api_client.param_serialize(
1003
+ method='GET',
1004
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/capabilities',
1005
+ path_params=_path_params,
1006
+ query_params=_query_params,
1007
+ header_params=_header_params,
1008
+ body=_body_params,
1009
+ post_params=_form_params,
1010
+ files=_files,
1011
+ auth_settings=_auth_settings,
1012
+ collection_formats=_collection_formats,
1013
+ _host=_host,
1014
+ _request_auth=_request_auth
1015
+ )
1016
+
1017
+
1018
+
1019
+
1020
+ @validate_call
1021
+ def get_merchant_account_payout_profile(
1022
+ self,
1023
+ merchant_account_id: StrictStr,
1024
+ environment: StrictStr,
1025
+ merchant_account_id2: StrictStr,
1026
+ _request_timeout: Union[
1027
+ None,
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Tuple[
1030
+ Annotated[StrictFloat, Field(gt=0)],
1031
+ Annotated[StrictFloat, Field(gt=0)]
1032
+ ]
1033
+ ] = None,
1034
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1035
+ _content_type: Optional[StrictStr] = None,
1036
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1037
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1038
+ ) -> ApiWriteEnvelope:
1039
+ """Get merchant payout profile
1040
+
1041
+
1042
+ :param merchant_account_id: (required)
1043
+ :type merchant_account_id: str
1044
+ :param environment: (required)
1045
+ :type environment: str
1046
+ :param merchant_account_id2: (required)
1047
+ :type merchant_account_id2: str
1048
+ :param _request_timeout: timeout setting for this request. If one
1049
+ number provided, it will be total request
1050
+ timeout. It can also be a pair (tuple) of
1051
+ (connection, read) timeouts.
1052
+ :type _request_timeout: int, tuple(int, int), optional
1053
+ :param _request_auth: set to override the auth_settings for an a single
1054
+ request; this effectively ignores the
1055
+ authentication in the spec for a single request.
1056
+ :type _request_auth: dict, optional
1057
+ :param _content_type: force content-type for the request.
1058
+ :type _content_type: str, Optional
1059
+ :param _headers: set to override the headers for a single
1060
+ request; this effectively ignores the headers
1061
+ in the spec for a single request.
1062
+ :type _headers: dict, optional
1063
+ :param _host_index: set to override the host_index for a single
1064
+ request; this effectively ignores the host_index
1065
+ in the spec for a single request.
1066
+ :type _host_index: int, optional
1067
+ :return: Returns the result object.
1068
+ """ # noqa: E501
1069
+
1070
+ _param = self._get_merchant_account_payout_profile_serialize(
1071
+ merchant_account_id=merchant_account_id,
1072
+ environment=environment,
1073
+ merchant_account_id2=merchant_account_id2,
1074
+ _request_auth=_request_auth,
1075
+ _content_type=_content_type,
1076
+ _headers=_headers,
1077
+ _host_index=_host_index
1078
+ )
1079
+
1080
+ _response_types_map: Dict[str, Optional[str]] = {
1081
+ '200': "ApiWriteEnvelope",
1082
+ '400': "ApiError",
1083
+ '401': "ApiError",
1084
+ '409': "ApiError",
1085
+ '422': "ApiError",
1086
+ '429': "ApiError",
1087
+ }
1088
+ response_data = self.api_client.call_api(
1089
+ *_param,
1090
+ _request_timeout=_request_timeout
1091
+ )
1092
+ response_data.read()
1093
+ return self.api_client.response_deserialize(
1094
+ response_data=response_data,
1095
+ response_types_map=_response_types_map,
1096
+ ).data
1097
+
1098
+
1099
+ @validate_call
1100
+ def get_merchant_account_payout_profile_with_http_info(
1101
+ self,
1102
+ merchant_account_id: StrictStr,
1103
+ environment: StrictStr,
1104
+ merchant_account_id2: StrictStr,
1105
+ _request_timeout: Union[
1106
+ None,
1107
+ Annotated[StrictFloat, Field(gt=0)],
1108
+ Tuple[
1109
+ Annotated[StrictFloat, Field(gt=0)],
1110
+ Annotated[StrictFloat, Field(gt=0)]
1111
+ ]
1112
+ ] = None,
1113
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1114
+ _content_type: Optional[StrictStr] = None,
1115
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1116
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1117
+ ) -> ApiResponse[ApiWriteEnvelope]:
1118
+ """Get merchant payout profile
1119
+
1120
+
1121
+ :param merchant_account_id: (required)
1122
+ :type merchant_account_id: str
1123
+ :param environment: (required)
1124
+ :type environment: str
1125
+ :param merchant_account_id2: (required)
1126
+ :type merchant_account_id2: str
1127
+ :param _request_timeout: timeout setting for this request. If one
1128
+ number provided, it will be total request
1129
+ timeout. It can also be a pair (tuple) of
1130
+ (connection, read) timeouts.
1131
+ :type _request_timeout: int, tuple(int, int), optional
1132
+ :param _request_auth: set to override the auth_settings for an a single
1133
+ request; this effectively ignores the
1134
+ authentication in the spec for a single request.
1135
+ :type _request_auth: dict, optional
1136
+ :param _content_type: force content-type for the request.
1137
+ :type _content_type: str, Optional
1138
+ :param _headers: set to override the headers for a single
1139
+ request; this effectively ignores the headers
1140
+ in the spec for a single request.
1141
+ :type _headers: dict, optional
1142
+ :param _host_index: set to override the host_index for a single
1143
+ request; this effectively ignores the host_index
1144
+ in the spec for a single request.
1145
+ :type _host_index: int, optional
1146
+ :return: Returns the result object.
1147
+ """ # noqa: E501
1148
+
1149
+ _param = self._get_merchant_account_payout_profile_serialize(
1150
+ merchant_account_id=merchant_account_id,
1151
+ environment=environment,
1152
+ merchant_account_id2=merchant_account_id2,
1153
+ _request_auth=_request_auth,
1154
+ _content_type=_content_type,
1155
+ _headers=_headers,
1156
+ _host_index=_host_index
1157
+ )
1158
+
1159
+ _response_types_map: Dict[str, Optional[str]] = {
1160
+ '200': "ApiWriteEnvelope",
1161
+ '400': "ApiError",
1162
+ '401': "ApiError",
1163
+ '409': "ApiError",
1164
+ '422': "ApiError",
1165
+ '429': "ApiError",
1166
+ }
1167
+ response_data = self.api_client.call_api(
1168
+ *_param,
1169
+ _request_timeout=_request_timeout
1170
+ )
1171
+ response_data.read()
1172
+ return self.api_client.response_deserialize(
1173
+ response_data=response_data,
1174
+ response_types_map=_response_types_map,
1175
+ )
1176
+
1177
+
1178
+ @validate_call
1179
+ def get_merchant_account_payout_profile_without_preload_content(
1180
+ self,
1181
+ merchant_account_id: StrictStr,
1182
+ environment: StrictStr,
1183
+ merchant_account_id2: StrictStr,
1184
+ _request_timeout: Union[
1185
+ None,
1186
+ Annotated[StrictFloat, Field(gt=0)],
1187
+ Tuple[
1188
+ Annotated[StrictFloat, Field(gt=0)],
1189
+ Annotated[StrictFloat, Field(gt=0)]
1190
+ ]
1191
+ ] = None,
1192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1193
+ _content_type: Optional[StrictStr] = None,
1194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1196
+ ) -> RESTResponseType:
1197
+ """Get merchant payout profile
1198
+
1199
+
1200
+ :param merchant_account_id: (required)
1201
+ :type merchant_account_id: str
1202
+ :param environment: (required)
1203
+ :type environment: str
1204
+ :param merchant_account_id2: (required)
1205
+ :type merchant_account_id2: str
1206
+ :param _request_timeout: timeout setting for this request. If one
1207
+ number provided, it will be total request
1208
+ timeout. It can also be a pair (tuple) of
1209
+ (connection, read) timeouts.
1210
+ :type _request_timeout: int, tuple(int, int), optional
1211
+ :param _request_auth: set to override the auth_settings for an a single
1212
+ request; this effectively ignores the
1213
+ authentication in the spec for a single request.
1214
+ :type _request_auth: dict, optional
1215
+ :param _content_type: force content-type for the request.
1216
+ :type _content_type: str, Optional
1217
+ :param _headers: set to override the headers for a single
1218
+ request; this effectively ignores the headers
1219
+ in the spec for a single request.
1220
+ :type _headers: dict, optional
1221
+ :param _host_index: set to override the host_index for a single
1222
+ request; this effectively ignores the host_index
1223
+ in the spec for a single request.
1224
+ :type _host_index: int, optional
1225
+ :return: Returns the result object.
1226
+ """ # noqa: E501
1227
+
1228
+ _param = self._get_merchant_account_payout_profile_serialize(
1229
+ merchant_account_id=merchant_account_id,
1230
+ environment=environment,
1231
+ merchant_account_id2=merchant_account_id2,
1232
+ _request_auth=_request_auth,
1233
+ _content_type=_content_type,
1234
+ _headers=_headers,
1235
+ _host_index=_host_index
1236
+ )
1237
+
1238
+ _response_types_map: Dict[str, Optional[str]] = {
1239
+ '200': "ApiWriteEnvelope",
1240
+ '400': "ApiError",
1241
+ '401': "ApiError",
1242
+ '409': "ApiError",
1243
+ '422': "ApiError",
1244
+ '429': "ApiError",
1245
+ }
1246
+ response_data = self.api_client.call_api(
1247
+ *_param,
1248
+ _request_timeout=_request_timeout
1249
+ )
1250
+ return response_data.response
1251
+
1252
+
1253
+ def _get_merchant_account_payout_profile_serialize(
1254
+ self,
1255
+ merchant_account_id,
1256
+ environment,
1257
+ merchant_account_id2,
1258
+ _request_auth,
1259
+ _content_type,
1260
+ _headers,
1261
+ _host_index,
1262
+ ) -> RequestSerialized:
1263
+
1264
+ _host = None
1265
+
1266
+ _collection_formats: Dict[str, str] = {
1267
+ }
1268
+
1269
+ _path_params: Dict[str, str] = {}
1270
+ _query_params: List[Tuple[str, str]] = []
1271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1272
+ _form_params: List[Tuple[str, str]] = []
1273
+ _files: Dict[
1274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1275
+ ] = {}
1276
+ _body_params: Optional[bytes] = None
1277
+
1278
+ # process the path parameters
1279
+ if merchant_account_id is not None:
1280
+ _path_params['merchantAccountId'] = merchant_account_id
1281
+ # process the query parameters
1282
+ if environment is not None:
1283
+
1284
+ _query_params.append(('environment', environment))
1285
+
1286
+ if merchant_account_id2 is not None:
1287
+
1288
+ _query_params.append(('merchantAccountId', merchant_account_id2))
1289
+
1290
+ # process the header parameters
1291
+ # process the form parameters
1292
+ # process the body parameter
1293
+
1294
+
1295
+ # set the HTTP header `Accept`
1296
+ if 'Accept' not in _header_params:
1297
+ _header_params['Accept'] = self.api_client.select_header_accept(
1298
+ [
1299
+ 'application/json'
1300
+ ]
1301
+ )
1302
+
1303
+
1304
+ # authentication setting
1305
+ _auth_settings: List[str] = [
1306
+ 'api-key'
1307
+ ]
1308
+
1309
+ return self.api_client.param_serialize(
1310
+ method='GET',
1311
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/payout-profile',
1312
+ path_params=_path_params,
1313
+ query_params=_query_params,
1314
+ header_params=_header_params,
1315
+ body=_body_params,
1316
+ post_params=_form_params,
1317
+ files=_files,
1318
+ auth_settings=_auth_settings,
1319
+ collection_formats=_collection_formats,
1320
+ _host=_host,
1321
+ _request_auth=_request_auth
1322
+ )
1323
+
1324
+
1325
+
1326
+
1327
+ @validate_call
1328
+ def get_merchant_account_payouts(
1329
+ self,
1330
+ merchant_account_id: StrictStr,
1331
+ environment: StrictStr,
1332
+ merchant_account_id2: StrictStr,
1333
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1334
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1335
+ _request_timeout: Union[
1336
+ None,
1337
+ Annotated[StrictFloat, Field(gt=0)],
1338
+ Tuple[
1339
+ Annotated[StrictFloat, Field(gt=0)],
1340
+ Annotated[StrictFloat, Field(gt=0)]
1341
+ ]
1342
+ ] = None,
1343
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1344
+ _content_type: Optional[StrictStr] = None,
1345
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1346
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1347
+ ) -> ApiWriteEnvelope:
1348
+ """List merchant payouts
1349
+
1350
+
1351
+ :param merchant_account_id: (required)
1352
+ :type merchant_account_id: str
1353
+ :param environment: (required)
1354
+ :type environment: str
1355
+ :param merchant_account_id2: (required)
1356
+ :type merchant_account_id2: str
1357
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1358
+ :type limit: int
1359
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1360
+ :type cursor: str
1361
+ :param _request_timeout: timeout setting for this request. If one
1362
+ number provided, it will be total request
1363
+ timeout. It can also be a pair (tuple) of
1364
+ (connection, read) timeouts.
1365
+ :type _request_timeout: int, tuple(int, int), optional
1366
+ :param _request_auth: set to override the auth_settings for an a single
1367
+ request; this effectively ignores the
1368
+ authentication in the spec for a single request.
1369
+ :type _request_auth: dict, optional
1370
+ :param _content_type: force content-type for the request.
1371
+ :type _content_type: str, Optional
1372
+ :param _headers: set to override the headers for a single
1373
+ request; this effectively ignores the headers
1374
+ in the spec for a single request.
1375
+ :type _headers: dict, optional
1376
+ :param _host_index: set to override the host_index for a single
1377
+ request; this effectively ignores the host_index
1378
+ in the spec for a single request.
1379
+ :type _host_index: int, optional
1380
+ :return: Returns the result object.
1381
+ """ # noqa: E501
1382
+
1383
+ _param = self._get_merchant_account_payouts_serialize(
1384
+ merchant_account_id=merchant_account_id,
1385
+ environment=environment,
1386
+ merchant_account_id2=merchant_account_id2,
1387
+ limit=limit,
1388
+ cursor=cursor,
1389
+ _request_auth=_request_auth,
1390
+ _content_type=_content_type,
1391
+ _headers=_headers,
1392
+ _host_index=_host_index
1393
+ )
1394
+
1395
+ _response_types_map: Dict[str, Optional[str]] = {
1396
+ '200': "ApiWriteEnvelope",
1397
+ '400': "ApiError",
1398
+ '401': "ApiError",
1399
+ '409': "ApiError",
1400
+ '422': "ApiError",
1401
+ '429': "ApiError",
1402
+ }
1403
+ response_data = self.api_client.call_api(
1404
+ *_param,
1405
+ _request_timeout=_request_timeout
1406
+ )
1407
+ response_data.read()
1408
+ return self.api_client.response_deserialize(
1409
+ response_data=response_data,
1410
+ response_types_map=_response_types_map,
1411
+ ).data
1412
+
1413
+
1414
+ @validate_call
1415
+ def get_merchant_account_payouts_with_http_info(
1416
+ self,
1417
+ merchant_account_id: StrictStr,
1418
+ environment: StrictStr,
1419
+ merchant_account_id2: StrictStr,
1420
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1421
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1422
+ _request_timeout: Union[
1423
+ None,
1424
+ Annotated[StrictFloat, Field(gt=0)],
1425
+ Tuple[
1426
+ Annotated[StrictFloat, Field(gt=0)],
1427
+ Annotated[StrictFloat, Field(gt=0)]
1428
+ ]
1429
+ ] = None,
1430
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1431
+ _content_type: Optional[StrictStr] = None,
1432
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1433
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1434
+ ) -> ApiResponse[ApiWriteEnvelope]:
1435
+ """List merchant payouts
1436
+
1437
+
1438
+ :param merchant_account_id: (required)
1439
+ :type merchant_account_id: str
1440
+ :param environment: (required)
1441
+ :type environment: str
1442
+ :param merchant_account_id2: (required)
1443
+ :type merchant_account_id2: str
1444
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1445
+ :type limit: int
1446
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1447
+ :type cursor: str
1448
+ :param _request_timeout: timeout setting for this request. If one
1449
+ number provided, it will be total request
1450
+ timeout. It can also be a pair (tuple) of
1451
+ (connection, read) timeouts.
1452
+ :type _request_timeout: int, tuple(int, int), optional
1453
+ :param _request_auth: set to override the auth_settings for an a single
1454
+ request; this effectively ignores the
1455
+ authentication in the spec for a single request.
1456
+ :type _request_auth: dict, optional
1457
+ :param _content_type: force content-type for the request.
1458
+ :type _content_type: str, Optional
1459
+ :param _headers: set to override the headers for a single
1460
+ request; this effectively ignores the headers
1461
+ in the spec for a single request.
1462
+ :type _headers: dict, optional
1463
+ :param _host_index: set to override the host_index for a single
1464
+ request; this effectively ignores the host_index
1465
+ in the spec for a single request.
1466
+ :type _host_index: int, optional
1467
+ :return: Returns the result object.
1468
+ """ # noqa: E501
1469
+
1470
+ _param = self._get_merchant_account_payouts_serialize(
1471
+ merchant_account_id=merchant_account_id,
1472
+ environment=environment,
1473
+ merchant_account_id2=merchant_account_id2,
1474
+ limit=limit,
1475
+ cursor=cursor,
1476
+ _request_auth=_request_auth,
1477
+ _content_type=_content_type,
1478
+ _headers=_headers,
1479
+ _host_index=_host_index
1480
+ )
1481
+
1482
+ _response_types_map: Dict[str, Optional[str]] = {
1483
+ '200': "ApiWriteEnvelope",
1484
+ '400': "ApiError",
1485
+ '401': "ApiError",
1486
+ '409': "ApiError",
1487
+ '422': "ApiError",
1488
+ '429': "ApiError",
1489
+ }
1490
+ response_data = self.api_client.call_api(
1491
+ *_param,
1492
+ _request_timeout=_request_timeout
1493
+ )
1494
+ response_data.read()
1495
+ return self.api_client.response_deserialize(
1496
+ response_data=response_data,
1497
+ response_types_map=_response_types_map,
1498
+ )
1499
+
1500
+
1501
+ @validate_call
1502
+ def get_merchant_account_payouts_without_preload_content(
1503
+ self,
1504
+ merchant_account_id: StrictStr,
1505
+ environment: StrictStr,
1506
+ merchant_account_id2: StrictStr,
1507
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1508
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1509
+ _request_timeout: Union[
1510
+ None,
1511
+ Annotated[StrictFloat, Field(gt=0)],
1512
+ Tuple[
1513
+ Annotated[StrictFloat, Field(gt=0)],
1514
+ Annotated[StrictFloat, Field(gt=0)]
1515
+ ]
1516
+ ] = None,
1517
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1518
+ _content_type: Optional[StrictStr] = None,
1519
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1520
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1521
+ ) -> RESTResponseType:
1522
+ """List merchant payouts
1523
+
1524
+
1525
+ :param merchant_account_id: (required)
1526
+ :type merchant_account_id: str
1527
+ :param environment: (required)
1528
+ :type environment: str
1529
+ :param merchant_account_id2: (required)
1530
+ :type merchant_account_id2: str
1531
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1532
+ :type limit: int
1533
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1534
+ :type cursor: str
1535
+ :param _request_timeout: timeout setting for this request. If one
1536
+ number provided, it will be total request
1537
+ timeout. It can also be a pair (tuple) of
1538
+ (connection, read) timeouts.
1539
+ :type _request_timeout: int, tuple(int, int), optional
1540
+ :param _request_auth: set to override the auth_settings for an a single
1541
+ request; this effectively ignores the
1542
+ authentication in the spec for a single request.
1543
+ :type _request_auth: dict, optional
1544
+ :param _content_type: force content-type for the request.
1545
+ :type _content_type: str, Optional
1546
+ :param _headers: set to override the headers for a single
1547
+ request; this effectively ignores the headers
1548
+ in the spec for a single request.
1549
+ :type _headers: dict, optional
1550
+ :param _host_index: set to override the host_index for a single
1551
+ request; this effectively ignores the host_index
1552
+ in the spec for a single request.
1553
+ :type _host_index: int, optional
1554
+ :return: Returns the result object.
1555
+ """ # noqa: E501
1556
+
1557
+ _param = self._get_merchant_account_payouts_serialize(
1558
+ merchant_account_id=merchant_account_id,
1559
+ environment=environment,
1560
+ merchant_account_id2=merchant_account_id2,
1561
+ limit=limit,
1562
+ cursor=cursor,
1563
+ _request_auth=_request_auth,
1564
+ _content_type=_content_type,
1565
+ _headers=_headers,
1566
+ _host_index=_host_index
1567
+ )
1568
+
1569
+ _response_types_map: Dict[str, Optional[str]] = {
1570
+ '200': "ApiWriteEnvelope",
1571
+ '400': "ApiError",
1572
+ '401': "ApiError",
1573
+ '409': "ApiError",
1574
+ '422': "ApiError",
1575
+ '429': "ApiError",
1576
+ }
1577
+ response_data = self.api_client.call_api(
1578
+ *_param,
1579
+ _request_timeout=_request_timeout
1580
+ )
1581
+ return response_data.response
1582
+
1583
+
1584
+ def _get_merchant_account_payouts_serialize(
1585
+ self,
1586
+ merchant_account_id,
1587
+ environment,
1588
+ merchant_account_id2,
1589
+ limit,
1590
+ cursor,
1591
+ _request_auth,
1592
+ _content_type,
1593
+ _headers,
1594
+ _host_index,
1595
+ ) -> RequestSerialized:
1596
+
1597
+ _host = None
1598
+
1599
+ _collection_formats: Dict[str, str] = {
1600
+ }
1601
+
1602
+ _path_params: Dict[str, str] = {}
1603
+ _query_params: List[Tuple[str, str]] = []
1604
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1605
+ _form_params: List[Tuple[str, str]] = []
1606
+ _files: Dict[
1607
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1608
+ ] = {}
1609
+ _body_params: Optional[bytes] = None
1610
+
1611
+ # process the path parameters
1612
+ if merchant_account_id is not None:
1613
+ _path_params['merchantAccountId'] = merchant_account_id
1614
+ # process the query parameters
1615
+ if environment is not None:
1616
+
1617
+ _query_params.append(('environment', environment))
1618
+
1619
+ if merchant_account_id2 is not None:
1620
+
1621
+ _query_params.append(('merchantAccountId', merchant_account_id2))
1622
+
1623
+ if limit is not None:
1624
+
1625
+ _query_params.append(('limit', limit))
1626
+
1627
+ if cursor is not None:
1628
+
1629
+ _query_params.append(('cursor', cursor))
1630
+
1631
+ # process the header parameters
1632
+ # process the form parameters
1633
+ # process the body parameter
1634
+
1635
+
1636
+ # set the HTTP header `Accept`
1637
+ if 'Accept' not in _header_params:
1638
+ _header_params['Accept'] = self.api_client.select_header_accept(
1639
+ [
1640
+ 'application/json'
1641
+ ]
1642
+ )
1643
+
1644
+
1645
+ # authentication setting
1646
+ _auth_settings: List[str] = [
1647
+ 'api-key'
1648
+ ]
1649
+
1650
+ return self.api_client.param_serialize(
1651
+ method='GET',
1652
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/payouts',
1653
+ path_params=_path_params,
1654
+ query_params=_query_params,
1655
+ header_params=_header_params,
1656
+ body=_body_params,
1657
+ post_params=_form_params,
1658
+ files=_files,
1659
+ auth_settings=_auth_settings,
1660
+ collection_formats=_collection_formats,
1661
+ _host=_host,
1662
+ _request_auth=_request_auth
1663
+ )
1664
+
1665
+
1666
+
1667
+
1668
+ @validate_call
1669
+ def get_merchant_account_settlements(
1670
+ self,
1671
+ merchant_account_id: StrictStr,
1672
+ environment: StrictStr,
1673
+ merchant_account_id2: StrictStr,
1674
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1675
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1676
+ _request_timeout: Union[
1677
+ None,
1678
+ Annotated[StrictFloat, Field(gt=0)],
1679
+ Tuple[
1680
+ Annotated[StrictFloat, Field(gt=0)],
1681
+ Annotated[StrictFloat, Field(gt=0)]
1682
+ ]
1683
+ ] = None,
1684
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1685
+ _content_type: Optional[StrictStr] = None,
1686
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1687
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1688
+ ) -> ApiWriteEnvelope:
1689
+ """List merchant settlements
1690
+
1691
+
1692
+ :param merchant_account_id: (required)
1693
+ :type merchant_account_id: str
1694
+ :param environment: (required)
1695
+ :type environment: str
1696
+ :param merchant_account_id2: (required)
1697
+ :type merchant_account_id2: str
1698
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1699
+ :type limit: int
1700
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1701
+ :type cursor: str
1702
+ :param _request_timeout: timeout setting for this request. If one
1703
+ number provided, it will be total request
1704
+ timeout. It can also be a pair (tuple) of
1705
+ (connection, read) timeouts.
1706
+ :type _request_timeout: int, tuple(int, int), optional
1707
+ :param _request_auth: set to override the auth_settings for an a single
1708
+ request; this effectively ignores the
1709
+ authentication in the spec for a single request.
1710
+ :type _request_auth: dict, optional
1711
+ :param _content_type: force content-type for the request.
1712
+ :type _content_type: str, Optional
1713
+ :param _headers: set to override the headers for a single
1714
+ request; this effectively ignores the headers
1715
+ in the spec for a single request.
1716
+ :type _headers: dict, optional
1717
+ :param _host_index: set to override the host_index for a single
1718
+ request; this effectively ignores the host_index
1719
+ in the spec for a single request.
1720
+ :type _host_index: int, optional
1721
+ :return: Returns the result object.
1722
+ """ # noqa: E501
1723
+
1724
+ _param = self._get_merchant_account_settlements_serialize(
1725
+ merchant_account_id=merchant_account_id,
1726
+ environment=environment,
1727
+ merchant_account_id2=merchant_account_id2,
1728
+ limit=limit,
1729
+ cursor=cursor,
1730
+ _request_auth=_request_auth,
1731
+ _content_type=_content_type,
1732
+ _headers=_headers,
1733
+ _host_index=_host_index
1734
+ )
1735
+
1736
+ _response_types_map: Dict[str, Optional[str]] = {
1737
+ '200': "ApiWriteEnvelope",
1738
+ '400': "ApiError",
1739
+ '401': "ApiError",
1740
+ '409': "ApiError",
1741
+ '422': "ApiError",
1742
+ '429': "ApiError",
1743
+ }
1744
+ response_data = self.api_client.call_api(
1745
+ *_param,
1746
+ _request_timeout=_request_timeout
1747
+ )
1748
+ response_data.read()
1749
+ return self.api_client.response_deserialize(
1750
+ response_data=response_data,
1751
+ response_types_map=_response_types_map,
1752
+ ).data
1753
+
1754
+
1755
+ @validate_call
1756
+ def get_merchant_account_settlements_with_http_info(
1757
+ self,
1758
+ merchant_account_id: StrictStr,
1759
+ environment: StrictStr,
1760
+ merchant_account_id2: StrictStr,
1761
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1762
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1763
+ _request_timeout: Union[
1764
+ None,
1765
+ Annotated[StrictFloat, Field(gt=0)],
1766
+ Tuple[
1767
+ Annotated[StrictFloat, Field(gt=0)],
1768
+ Annotated[StrictFloat, Field(gt=0)]
1769
+ ]
1770
+ ] = None,
1771
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1772
+ _content_type: Optional[StrictStr] = None,
1773
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1774
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1775
+ ) -> ApiResponse[ApiWriteEnvelope]:
1776
+ """List merchant settlements
1777
+
1778
+
1779
+ :param merchant_account_id: (required)
1780
+ :type merchant_account_id: str
1781
+ :param environment: (required)
1782
+ :type environment: str
1783
+ :param merchant_account_id2: (required)
1784
+ :type merchant_account_id2: str
1785
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1786
+ :type limit: int
1787
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1788
+ :type cursor: str
1789
+ :param _request_timeout: timeout setting for this request. If one
1790
+ number provided, it will be total request
1791
+ timeout. It can also be a pair (tuple) of
1792
+ (connection, read) timeouts.
1793
+ :type _request_timeout: int, tuple(int, int), optional
1794
+ :param _request_auth: set to override the auth_settings for an a single
1795
+ request; this effectively ignores the
1796
+ authentication in the spec for a single request.
1797
+ :type _request_auth: dict, optional
1798
+ :param _content_type: force content-type for the request.
1799
+ :type _content_type: str, Optional
1800
+ :param _headers: set to override the headers for a single
1801
+ request; this effectively ignores the headers
1802
+ in the spec for a single request.
1803
+ :type _headers: dict, optional
1804
+ :param _host_index: set to override the host_index for a single
1805
+ request; this effectively ignores the host_index
1806
+ in the spec for a single request.
1807
+ :type _host_index: int, optional
1808
+ :return: Returns the result object.
1809
+ """ # noqa: E501
1810
+
1811
+ _param = self._get_merchant_account_settlements_serialize(
1812
+ merchant_account_id=merchant_account_id,
1813
+ environment=environment,
1814
+ merchant_account_id2=merchant_account_id2,
1815
+ limit=limit,
1816
+ cursor=cursor,
1817
+ _request_auth=_request_auth,
1818
+ _content_type=_content_type,
1819
+ _headers=_headers,
1820
+ _host_index=_host_index
1821
+ )
1822
+
1823
+ _response_types_map: Dict[str, Optional[str]] = {
1824
+ '200': "ApiWriteEnvelope",
1825
+ '400': "ApiError",
1826
+ '401': "ApiError",
1827
+ '409': "ApiError",
1828
+ '422': "ApiError",
1829
+ '429': "ApiError",
1830
+ }
1831
+ response_data = self.api_client.call_api(
1832
+ *_param,
1833
+ _request_timeout=_request_timeout
1834
+ )
1835
+ response_data.read()
1836
+ return self.api_client.response_deserialize(
1837
+ response_data=response_data,
1838
+ response_types_map=_response_types_map,
1839
+ )
1840
+
1841
+
1842
+ @validate_call
1843
+ def get_merchant_account_settlements_without_preload_content(
1844
+ self,
1845
+ merchant_account_id: StrictStr,
1846
+ environment: StrictStr,
1847
+ merchant_account_id2: StrictStr,
1848
+ limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.")] = None,
1849
+ cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.")] = None,
1850
+ _request_timeout: Union[
1851
+ None,
1852
+ Annotated[StrictFloat, Field(gt=0)],
1853
+ Tuple[
1854
+ Annotated[StrictFloat, Field(gt=0)],
1855
+ Annotated[StrictFloat, Field(gt=0)]
1856
+ ]
1857
+ ] = None,
1858
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1859
+ _content_type: Optional[StrictStr] = None,
1860
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1861
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1862
+ ) -> RESTResponseType:
1863
+ """List merchant settlements
1864
+
1865
+
1866
+ :param merchant_account_id: (required)
1867
+ :type merchant_account_id: str
1868
+ :param environment: (required)
1869
+ :type environment: str
1870
+ :param merchant_account_id2: (required)
1871
+ :type merchant_account_id2: str
1872
+ :param limit: Page size, 1-100. Omitting both limit and cursor returns the full unpaginated list.
1873
+ :type limit: int
1874
+ :param cursor: Opaque cursor from the previous page's nextCursor. Pass it back verbatim to fetch the next page.
1875
+ :type cursor: str
1876
+ :param _request_timeout: timeout setting for this request. If one
1877
+ number provided, it will be total request
1878
+ timeout. It can also be a pair (tuple) of
1879
+ (connection, read) timeouts.
1880
+ :type _request_timeout: int, tuple(int, int), optional
1881
+ :param _request_auth: set to override the auth_settings for an a single
1882
+ request; this effectively ignores the
1883
+ authentication in the spec for a single request.
1884
+ :type _request_auth: dict, optional
1885
+ :param _content_type: force content-type for the request.
1886
+ :type _content_type: str, Optional
1887
+ :param _headers: set to override the headers for a single
1888
+ request; this effectively ignores the headers
1889
+ in the spec for a single request.
1890
+ :type _headers: dict, optional
1891
+ :param _host_index: set to override the host_index for a single
1892
+ request; this effectively ignores the host_index
1893
+ in the spec for a single request.
1894
+ :type _host_index: int, optional
1895
+ :return: Returns the result object.
1896
+ """ # noqa: E501
1897
+
1898
+ _param = self._get_merchant_account_settlements_serialize(
1899
+ merchant_account_id=merchant_account_id,
1900
+ environment=environment,
1901
+ merchant_account_id2=merchant_account_id2,
1902
+ limit=limit,
1903
+ cursor=cursor,
1904
+ _request_auth=_request_auth,
1905
+ _content_type=_content_type,
1906
+ _headers=_headers,
1907
+ _host_index=_host_index
1908
+ )
1909
+
1910
+ _response_types_map: Dict[str, Optional[str]] = {
1911
+ '200': "ApiWriteEnvelope",
1912
+ '400': "ApiError",
1913
+ '401': "ApiError",
1914
+ '409': "ApiError",
1915
+ '422': "ApiError",
1916
+ '429': "ApiError",
1917
+ }
1918
+ response_data = self.api_client.call_api(
1919
+ *_param,
1920
+ _request_timeout=_request_timeout
1921
+ )
1922
+ return response_data.response
1923
+
1924
+
1925
+ def _get_merchant_account_settlements_serialize(
1926
+ self,
1927
+ merchant_account_id,
1928
+ environment,
1929
+ merchant_account_id2,
1930
+ limit,
1931
+ cursor,
1932
+ _request_auth,
1933
+ _content_type,
1934
+ _headers,
1935
+ _host_index,
1936
+ ) -> RequestSerialized:
1937
+
1938
+ _host = None
1939
+
1940
+ _collection_formats: Dict[str, str] = {
1941
+ }
1942
+
1943
+ _path_params: Dict[str, str] = {}
1944
+ _query_params: List[Tuple[str, str]] = []
1945
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1946
+ _form_params: List[Tuple[str, str]] = []
1947
+ _files: Dict[
1948
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1949
+ ] = {}
1950
+ _body_params: Optional[bytes] = None
1951
+
1952
+ # process the path parameters
1953
+ if merchant_account_id is not None:
1954
+ _path_params['merchantAccountId'] = merchant_account_id
1955
+ # process the query parameters
1956
+ if environment is not None:
1957
+
1958
+ _query_params.append(('environment', environment))
1959
+
1960
+ if merchant_account_id2 is not None:
1961
+
1962
+ _query_params.append(('merchantAccountId', merchant_account_id2))
1963
+
1964
+ if limit is not None:
1965
+
1966
+ _query_params.append(('limit', limit))
1967
+
1968
+ if cursor is not None:
1969
+
1970
+ _query_params.append(('cursor', cursor))
1971
+
1972
+ # process the header parameters
1973
+ # process the form parameters
1974
+ # process the body parameter
1975
+
1976
+
1977
+ # set the HTTP header `Accept`
1978
+ if 'Accept' not in _header_params:
1979
+ _header_params['Accept'] = self.api_client.select_header_accept(
1980
+ [
1981
+ 'application/json'
1982
+ ]
1983
+ )
1984
+
1985
+
1986
+ # authentication setting
1987
+ _auth_settings: List[str] = [
1988
+ 'api-key'
1989
+ ]
1990
+
1991
+ return self.api_client.param_serialize(
1992
+ method='GET',
1993
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/settlements',
1994
+ path_params=_path_params,
1995
+ query_params=_query_params,
1996
+ header_params=_header_params,
1997
+ body=_body_params,
1998
+ post_params=_form_params,
1999
+ files=_files,
2000
+ auth_settings=_auth_settings,
2001
+ collection_formats=_collection_formats,
2002
+ _host=_host,
2003
+ _request_auth=_request_auth
2004
+ )
2005
+
2006
+
2007
+
2008
+
2009
+ @validate_call
2010
+ def get_merchant_account_state(
2011
+ self,
2012
+ merchant_account_id: StrictStr,
2013
+ environment: StrictStr,
2014
+ merchant_account_id2: StrictStr,
2015
+ _request_timeout: Union[
2016
+ None,
2017
+ Annotated[StrictFloat, Field(gt=0)],
2018
+ Tuple[
2019
+ Annotated[StrictFloat, Field(gt=0)],
2020
+ Annotated[StrictFloat, Field(gt=0)]
2021
+ ]
2022
+ ] = None,
2023
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2024
+ _content_type: Optional[StrictStr] = None,
2025
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2026
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2027
+ ) -> ApiWriteEnvelope:
2028
+ """Get merchant payments readiness state
2029
+
2030
+
2031
+ :param merchant_account_id: (required)
2032
+ :type merchant_account_id: str
2033
+ :param environment: (required)
2034
+ :type environment: str
2035
+ :param merchant_account_id2: (required)
2036
+ :type merchant_account_id2: str
2037
+ :param _request_timeout: timeout setting for this request. If one
2038
+ number provided, it will be total request
2039
+ timeout. It can also be a pair (tuple) of
2040
+ (connection, read) timeouts.
2041
+ :type _request_timeout: int, tuple(int, int), optional
2042
+ :param _request_auth: set to override the auth_settings for an a single
2043
+ request; this effectively ignores the
2044
+ authentication in the spec for a single request.
2045
+ :type _request_auth: dict, optional
2046
+ :param _content_type: force content-type for the request.
2047
+ :type _content_type: str, Optional
2048
+ :param _headers: set to override the headers for a single
2049
+ request; this effectively ignores the headers
2050
+ in the spec for a single request.
2051
+ :type _headers: dict, optional
2052
+ :param _host_index: set to override the host_index for a single
2053
+ request; this effectively ignores the host_index
2054
+ in the spec for a single request.
2055
+ :type _host_index: int, optional
2056
+ :return: Returns the result object.
2057
+ """ # noqa: E501
2058
+
2059
+ _param = self._get_merchant_account_state_serialize(
2060
+ merchant_account_id=merchant_account_id,
2061
+ environment=environment,
2062
+ merchant_account_id2=merchant_account_id2,
2063
+ _request_auth=_request_auth,
2064
+ _content_type=_content_type,
2065
+ _headers=_headers,
2066
+ _host_index=_host_index
2067
+ )
2068
+
2069
+ _response_types_map: Dict[str, Optional[str]] = {
2070
+ '200': "ApiWriteEnvelope",
2071
+ '400': "ApiError",
2072
+ '401': "ApiError",
2073
+ '409': "ApiError",
2074
+ '422': "ApiError",
2075
+ '429': "ApiError",
2076
+ }
2077
+ response_data = self.api_client.call_api(
2078
+ *_param,
2079
+ _request_timeout=_request_timeout
2080
+ )
2081
+ response_data.read()
2082
+ return self.api_client.response_deserialize(
2083
+ response_data=response_data,
2084
+ response_types_map=_response_types_map,
2085
+ ).data
2086
+
2087
+
2088
+ @validate_call
2089
+ def get_merchant_account_state_with_http_info(
2090
+ self,
2091
+ merchant_account_id: StrictStr,
2092
+ environment: StrictStr,
2093
+ merchant_account_id2: StrictStr,
2094
+ _request_timeout: Union[
2095
+ None,
2096
+ Annotated[StrictFloat, Field(gt=0)],
2097
+ Tuple[
2098
+ Annotated[StrictFloat, Field(gt=0)],
2099
+ Annotated[StrictFloat, Field(gt=0)]
2100
+ ]
2101
+ ] = None,
2102
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2103
+ _content_type: Optional[StrictStr] = None,
2104
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2105
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2106
+ ) -> ApiResponse[ApiWriteEnvelope]:
2107
+ """Get merchant payments readiness state
2108
+
2109
+
2110
+ :param merchant_account_id: (required)
2111
+ :type merchant_account_id: str
2112
+ :param environment: (required)
2113
+ :type environment: str
2114
+ :param merchant_account_id2: (required)
2115
+ :type merchant_account_id2: str
2116
+ :param _request_timeout: timeout setting for this request. If one
2117
+ number provided, it will be total request
2118
+ timeout. It can also be a pair (tuple) of
2119
+ (connection, read) timeouts.
2120
+ :type _request_timeout: int, tuple(int, int), optional
2121
+ :param _request_auth: set to override the auth_settings for an a single
2122
+ request; this effectively ignores the
2123
+ authentication in the spec for a single request.
2124
+ :type _request_auth: dict, optional
2125
+ :param _content_type: force content-type for the request.
2126
+ :type _content_type: str, Optional
2127
+ :param _headers: set to override the headers for a single
2128
+ request; this effectively ignores the headers
2129
+ in the spec for a single request.
2130
+ :type _headers: dict, optional
2131
+ :param _host_index: set to override the host_index for a single
2132
+ request; this effectively ignores the host_index
2133
+ in the spec for a single request.
2134
+ :type _host_index: int, optional
2135
+ :return: Returns the result object.
2136
+ """ # noqa: E501
2137
+
2138
+ _param = self._get_merchant_account_state_serialize(
2139
+ merchant_account_id=merchant_account_id,
2140
+ environment=environment,
2141
+ merchant_account_id2=merchant_account_id2,
2142
+ _request_auth=_request_auth,
2143
+ _content_type=_content_type,
2144
+ _headers=_headers,
2145
+ _host_index=_host_index
2146
+ )
2147
+
2148
+ _response_types_map: Dict[str, Optional[str]] = {
2149
+ '200': "ApiWriteEnvelope",
2150
+ '400': "ApiError",
2151
+ '401': "ApiError",
2152
+ '409': "ApiError",
2153
+ '422': "ApiError",
2154
+ '429': "ApiError",
2155
+ }
2156
+ response_data = self.api_client.call_api(
2157
+ *_param,
2158
+ _request_timeout=_request_timeout
2159
+ )
2160
+ response_data.read()
2161
+ return self.api_client.response_deserialize(
2162
+ response_data=response_data,
2163
+ response_types_map=_response_types_map,
2164
+ )
2165
+
2166
+
2167
+ @validate_call
2168
+ def get_merchant_account_state_without_preload_content(
2169
+ self,
2170
+ merchant_account_id: StrictStr,
2171
+ environment: StrictStr,
2172
+ merchant_account_id2: StrictStr,
2173
+ _request_timeout: Union[
2174
+ None,
2175
+ Annotated[StrictFloat, Field(gt=0)],
2176
+ Tuple[
2177
+ Annotated[StrictFloat, Field(gt=0)],
2178
+ Annotated[StrictFloat, Field(gt=0)]
2179
+ ]
2180
+ ] = None,
2181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2182
+ _content_type: Optional[StrictStr] = None,
2183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2185
+ ) -> RESTResponseType:
2186
+ """Get merchant payments readiness state
2187
+
2188
+
2189
+ :param merchant_account_id: (required)
2190
+ :type merchant_account_id: str
2191
+ :param environment: (required)
2192
+ :type environment: str
2193
+ :param merchant_account_id2: (required)
2194
+ :type merchant_account_id2: str
2195
+ :param _request_timeout: timeout setting for this request. If one
2196
+ number provided, it will be total request
2197
+ timeout. It can also be a pair (tuple) of
2198
+ (connection, read) timeouts.
2199
+ :type _request_timeout: int, tuple(int, int), optional
2200
+ :param _request_auth: set to override the auth_settings for an a single
2201
+ request; this effectively ignores the
2202
+ authentication in the spec for a single request.
2203
+ :type _request_auth: dict, optional
2204
+ :param _content_type: force content-type for the request.
2205
+ :type _content_type: str, Optional
2206
+ :param _headers: set to override the headers for a single
2207
+ request; this effectively ignores the headers
2208
+ in the spec for a single request.
2209
+ :type _headers: dict, optional
2210
+ :param _host_index: set to override the host_index for a single
2211
+ request; this effectively ignores the host_index
2212
+ in the spec for a single request.
2213
+ :type _host_index: int, optional
2214
+ :return: Returns the result object.
2215
+ """ # noqa: E501
2216
+
2217
+ _param = self._get_merchant_account_state_serialize(
2218
+ merchant_account_id=merchant_account_id,
2219
+ environment=environment,
2220
+ merchant_account_id2=merchant_account_id2,
2221
+ _request_auth=_request_auth,
2222
+ _content_type=_content_type,
2223
+ _headers=_headers,
2224
+ _host_index=_host_index
2225
+ )
2226
+
2227
+ _response_types_map: Dict[str, Optional[str]] = {
2228
+ '200': "ApiWriteEnvelope",
2229
+ '400': "ApiError",
2230
+ '401': "ApiError",
2231
+ '409': "ApiError",
2232
+ '422': "ApiError",
2233
+ '429': "ApiError",
2234
+ }
2235
+ response_data = self.api_client.call_api(
2236
+ *_param,
2237
+ _request_timeout=_request_timeout
2238
+ )
2239
+ return response_data.response
2240
+
2241
+
2242
+ def _get_merchant_account_state_serialize(
2243
+ self,
2244
+ merchant_account_id,
2245
+ environment,
2246
+ merchant_account_id2,
2247
+ _request_auth,
2248
+ _content_type,
2249
+ _headers,
2250
+ _host_index,
2251
+ ) -> RequestSerialized:
2252
+
2253
+ _host = None
2254
+
2255
+ _collection_formats: Dict[str, str] = {
2256
+ }
2257
+
2258
+ _path_params: Dict[str, str] = {}
2259
+ _query_params: List[Tuple[str, str]] = []
2260
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2261
+ _form_params: List[Tuple[str, str]] = []
2262
+ _files: Dict[
2263
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2264
+ ] = {}
2265
+ _body_params: Optional[bytes] = None
2266
+
2267
+ # process the path parameters
2268
+ if merchant_account_id is not None:
2269
+ _path_params['merchantAccountId'] = merchant_account_id
2270
+ # process the query parameters
2271
+ if environment is not None:
2272
+
2273
+ _query_params.append(('environment', environment))
2274
+
2275
+ if merchant_account_id2 is not None:
2276
+
2277
+ _query_params.append(('merchantAccountId', merchant_account_id2))
2278
+
2279
+ # process the header parameters
2280
+ # process the form parameters
2281
+ # process the body parameter
2282
+
2283
+
2284
+ # set the HTTP header `Accept`
2285
+ if 'Accept' not in _header_params:
2286
+ _header_params['Accept'] = self.api_client.select_header_accept(
2287
+ [
2288
+ 'application/json'
2289
+ ]
2290
+ )
2291
+
2292
+
2293
+ # authentication setting
2294
+ _auth_settings: List[str] = [
2295
+ 'api-key'
2296
+ ]
2297
+
2298
+ return self.api_client.param_serialize(
2299
+ method='GET',
2300
+ resource_path='/v1/merchant-accounts/{merchantAccountId}/state',
2301
+ path_params=_path_params,
2302
+ query_params=_query_params,
2303
+ header_params=_header_params,
2304
+ body=_body_params,
2305
+ post_params=_form_params,
2306
+ files=_files,
2307
+ auth_settings=_auth_settings,
2308
+ collection_formats=_collection_formats,
2309
+ _host=_host,
2310
+ _request_auth=_request_auth
2311
+ )