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.
- vortex/__init__.py +265 -0
- vortex/api/__init__.py +24 -0
- vortex/api/billing_api.py +34608 -0
- vortex/api/catalog_api.py +708 -0
- vortex/api/checkout_api.py +372 -0
- vortex/api/credit_notes_api.py +1688 -0
- vortex/api/customer_balance_api.py +1747 -0
- vortex/api/customers_api.py +387 -0
- vortex/api/discounts_api.py +2623 -0
- vortex/api/entitlements_api.py +1646 -0
- vortex/api/hosted_api.py +2855 -0
- vortex/api/invoices_api.py +2402 -0
- vortex/api/payables_api.py +1380 -0
- vortex/api/payment_methods_api.py +2069 -0
- vortex/api/payment_requests_api.py +1877 -0
- vortex/api/payments_api.py +694 -0
- vortex/api/payments_readiness_api.py +2311 -0
- vortex/api/public_api.py +6931 -0
- vortex/api/quotes_api.py +6817 -0
- vortex/api/receipts_api.py +1111 -0
- vortex/api/subscriptions_api.py +1059 -0
- vortex/api/tax_api.py +1397 -0
- vortex/api/webhooks_api.py +4931 -0
- vortex/api_client.py +804 -0
- vortex/api_response.py +21 -0
- vortex/configuration.py +658 -0
- vortex/exceptions.py +218 -0
- vortex/models/__init__.py +104 -0
- vortex/models/api_error.py +103 -0
- vortex/models/api_error_error.py +114 -0
- vortex/models/api_write_envelope.py +101 -0
- vortex/models/apply_coupon_request.py +97 -0
- vortex/models/billing_order_form_sign_request.py +103 -0
- vortex/models/billing_order_form_signature_request_request.py +86 -0
- vortex/models/billing_order_form_void_request.py +86 -0
- vortex/models/billing_order_forms_expire_due_request.py +90 -0
- vortex/models/billing_order_update_request.py +99 -0
- vortex/models/billing_orders_execute_due_request.py +90 -0
- vortex/models/billing_quote_create_request.py +119 -0
- vortex/models/billing_quote_line_input.py +93 -0
- vortex/models/billing_quote_version_approve_request.py +87 -0
- vortex/models/billing_quote_version_create_request.py +103 -0
- vortex/models/billing_quote_version_update_request.py +102 -0
- vortex/models/billing_quote_version_void_request.py +96 -0
- vortex/models/checkout_session_line_item_request.py +91 -0
- vortex/models/coupon_targets.py +89 -0
- vortex/models/create_checkout_session_request.py +140 -0
- vortex/models/create_coupon_request.py +132 -0
- vortex/models/create_deposit_balance_payable_request.py +172 -0
- vortex/models/create_installment_payable_request.py +170 -0
- vortex/models/create_payable_request.py +158 -0
- vortex/models/create_recurring_payable_request.py +181 -0
- vortex/models/create_recurring_payable_request_cadence.py +96 -0
- vortex/models/credit_note_create_line.py +105 -0
- vortex/models/credit_note_create_request.py +112 -0
- vortex/models/credit_note_reason.py +39 -0
- vortex/models/credit_note_refund_reconcile_request.py +86 -0
- vortex/models/credit_note_refund_request.py +94 -0
- vortex/models/customer_balance_targets.py +102 -0
- vortex/models/customer_default_payment_method_request.py +88 -0
- vortex/models/customer_payment_method_archive_request.py +88 -0
- vortex/models/customer_payment_method_attach_request.py +94 -0
- vortex/models/customer_payment_method_setup_request.py +100 -0
- vortex/models/customer_upsert_request.py +96 -0
- vortex/models/expire_customer_balance_request.py +98 -0
- vortex/models/grant_customer_balance_from_payment_request.py +103 -0
- vortex/models/grant_customer_balance_request.py +106 -0
- vortex/models/grant_entitlement_request.py +106 -0
- vortex/models/invoice_collect_request.py +86 -0
- vortex/models/invoice_create_request.py +92 -0
- vortex/models/invoice_finalize_request.py +86 -0
- vortex/models/invoice_mark_uncollectible_request.py +90 -0
- vortex/models/invoice_tax.py +142 -0
- vortex/models/invoice_void_request.py +88 -0
- vortex/models/merchant_account_create_request.py +183 -0
- vortex/models/merchant_address.py +96 -0
- vortex/models/merchant_associated_identity.py +114 -0
- vortex/models/merchant_onboarding_link_request.py +95 -0
- vortex/models/merchant_profile_date.py +90 -0
- vortex/models/merchant_settlement_bank_account.py +94 -0
- vortex/models/merchant_tax_profile_request.py +125 -0
- vortex/models/merchant_tax_profile_request_registrations_inner.py +88 -0
- vortex/models/merchant_underwriting_data.py +127 -0
- vortex/models/merchant_underwriting_data_card_volume_distribution.py +90 -0
- vortex/models/merchant_underwriting_data_volume_distribution_by_business_type.py +90 -0
- vortex/models/open_api_invoice_tax_response.py +92 -0
- vortex/models/open_api_invoice_tax_response_all_of_data.py +92 -0
- vortex/models/payment_request_collect_request.py +86 -0
- vortex/models/payment_request_create_request.py +100 -0
- vortex/models/payment_request_link_create_request.py +89 -0
- vortex/models/price_create_request.py +122 -0
- vortex/models/product_create_request.py +92 -0
- vortex/models/reverse_customer_balance_request.py +98 -0
- vortex/models/revoke_entitlement_request.py +106 -0
- vortex/models/subscription_change_request.py +111 -0
- vortex/models/subscription_create_request.py +122 -0
- vortex/models/subscription_item_change_preview_request.py +100 -0
- vortex/models/subscription_item_change_request_item.py +91 -0
- vortex/models/tax_address.py +96 -0
- vortex/models/tax_behavior.py +36 -0
- vortex/models/tax_behavior_policy.py +100 -0
- vortex/models/tax_behavior_policy_request.py +89 -0
- vortex/models/tax_failure.py +104 -0
- vortex/models/tax_finalize_request.py +98 -0
- vortex/models/tax_jurisdiction_evidence.py +94 -0
- vortex/models/tax_line_evidence.py +103 -0
- vortex/models/tax_quote_request.py +98 -0
- vortex/models/terminate_applied_coupon_request.py +87 -0
- vortex/models/terminate_coupon_request.py +87 -0
- vortex/models/webhook_deliveries_dispatch_request.py +91 -0
- vortex/models/webhook_deliveries_redrive_request.py +107 -0
- vortex/models/webhook_delivery_replay_request.py +88 -0
- vortex/models/webhook_endpoint_create_request.py +91 -0
- vortex/models/webhook_endpoint_secret_rotate_request.py +87 -0
- vortex/models/webhook_endpoint_test_request.py +88 -0
- vortex/models/webhook_endpoint_update_request.py +103 -0
- vortex/models/webhook_event_resend_request.py +86 -0
- vortex/rest.py +263 -0
- vortex_sdk-0.2.0.dist-info/METADATA +34 -0
- vortex_sdk-0.2.0.dist-info/RECORD +123 -0
- vortex_sdk-0.2.0.dist-info/WHEEL +5 -0
- vortex_sdk-0.2.0.dist-info/licenses/LICENSE +21 -0
- vortex_sdk-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1877 @@
|
|
|
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.payment_request_collect_request import PaymentRequestCollectRequest
|
|
23
|
+
from vortex.models.payment_request_create_request import PaymentRequestCreateRequest
|
|
24
|
+
from vortex.models.payment_request_link_create_request import PaymentRequestLinkCreateRequest
|
|
25
|
+
|
|
26
|
+
from vortex.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from vortex.api_response import ApiResponse
|
|
28
|
+
from vortex.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PaymentRequestsApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def collect_payment_request(
|
|
46
|
+
self,
|
|
47
|
+
payment_request_id: StrictStr,
|
|
48
|
+
environment: StrictStr,
|
|
49
|
+
merchant_account_id: StrictStr,
|
|
50
|
+
payment_request_collect_request: PaymentRequestCollectRequest,
|
|
51
|
+
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,
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> ApiWriteEnvelope:
|
|
65
|
+
"""Collect all eligible invoices in a payment request
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:param payment_request_id: (required)
|
|
69
|
+
:type payment_request_id: str
|
|
70
|
+
:param environment: (required)
|
|
71
|
+
:type environment: str
|
|
72
|
+
:param merchant_account_id: (required)
|
|
73
|
+
:type merchant_account_id: str
|
|
74
|
+
:param payment_request_collect_request: (required)
|
|
75
|
+
:type payment_request_collect_request: PaymentRequestCollectRequest
|
|
76
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
77
|
+
:type idempotency_key: str
|
|
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._collect_payment_request_serialize(
|
|
101
|
+
payment_request_id=payment_request_id,
|
|
102
|
+
environment=environment,
|
|
103
|
+
merchant_account_id=merchant_account_id,
|
|
104
|
+
payment_request_collect_request=payment_request_collect_request,
|
|
105
|
+
idempotency_key=idempotency_key,
|
|
106
|
+
_request_auth=_request_auth,
|
|
107
|
+
_content_type=_content_type,
|
|
108
|
+
_headers=_headers,
|
|
109
|
+
_host_index=_host_index
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
113
|
+
'200': "ApiWriteEnvelope",
|
|
114
|
+
'400': "ApiError",
|
|
115
|
+
'401': "ApiError",
|
|
116
|
+
'409': "ApiError",
|
|
117
|
+
'422': "ApiError",
|
|
118
|
+
'429': "ApiError",
|
|
119
|
+
}
|
|
120
|
+
response_data = self.api_client.call_api(
|
|
121
|
+
*_param,
|
|
122
|
+
_request_timeout=_request_timeout
|
|
123
|
+
)
|
|
124
|
+
response_data.read()
|
|
125
|
+
return self.api_client.response_deserialize(
|
|
126
|
+
response_data=response_data,
|
|
127
|
+
response_types_map=_response_types_map,
|
|
128
|
+
).data
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@validate_call
|
|
132
|
+
def collect_payment_request_with_http_info(
|
|
133
|
+
self,
|
|
134
|
+
payment_request_id: StrictStr,
|
|
135
|
+
environment: StrictStr,
|
|
136
|
+
merchant_account_id: StrictStr,
|
|
137
|
+
payment_request_collect_request: PaymentRequestCollectRequest,
|
|
138
|
+
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,
|
|
139
|
+
_request_timeout: Union[
|
|
140
|
+
None,
|
|
141
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
142
|
+
Tuple[
|
|
143
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
144
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
145
|
+
]
|
|
146
|
+
] = None,
|
|
147
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
148
|
+
_content_type: Optional[StrictStr] = None,
|
|
149
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
150
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
151
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
152
|
+
"""Collect all eligible invoices in a payment request
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
:param payment_request_id: (required)
|
|
156
|
+
:type payment_request_id: str
|
|
157
|
+
:param environment: (required)
|
|
158
|
+
:type environment: str
|
|
159
|
+
:param merchant_account_id: (required)
|
|
160
|
+
:type merchant_account_id: str
|
|
161
|
+
:param payment_request_collect_request: (required)
|
|
162
|
+
:type payment_request_collect_request: PaymentRequestCollectRequest
|
|
163
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
164
|
+
:type idempotency_key: str
|
|
165
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
166
|
+
number provided, it will be total request
|
|
167
|
+
timeout. It can also be a pair (tuple) of
|
|
168
|
+
(connection, read) timeouts.
|
|
169
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
170
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
171
|
+
request; this effectively ignores the
|
|
172
|
+
authentication in the spec for a single request.
|
|
173
|
+
:type _request_auth: dict, optional
|
|
174
|
+
:param _content_type: force content-type for the request.
|
|
175
|
+
:type _content_type: str, Optional
|
|
176
|
+
:param _headers: set to override the headers for a single
|
|
177
|
+
request; this effectively ignores the headers
|
|
178
|
+
in the spec for a single request.
|
|
179
|
+
:type _headers: dict, optional
|
|
180
|
+
:param _host_index: set to override the host_index for a single
|
|
181
|
+
request; this effectively ignores the host_index
|
|
182
|
+
in the spec for a single request.
|
|
183
|
+
:type _host_index: int, optional
|
|
184
|
+
:return: Returns the result object.
|
|
185
|
+
""" # noqa: E501
|
|
186
|
+
|
|
187
|
+
_param = self._collect_payment_request_serialize(
|
|
188
|
+
payment_request_id=payment_request_id,
|
|
189
|
+
environment=environment,
|
|
190
|
+
merchant_account_id=merchant_account_id,
|
|
191
|
+
payment_request_collect_request=payment_request_collect_request,
|
|
192
|
+
idempotency_key=idempotency_key,
|
|
193
|
+
_request_auth=_request_auth,
|
|
194
|
+
_content_type=_content_type,
|
|
195
|
+
_headers=_headers,
|
|
196
|
+
_host_index=_host_index
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
200
|
+
'200': "ApiWriteEnvelope",
|
|
201
|
+
'400': "ApiError",
|
|
202
|
+
'401': "ApiError",
|
|
203
|
+
'409': "ApiError",
|
|
204
|
+
'422': "ApiError",
|
|
205
|
+
'429': "ApiError",
|
|
206
|
+
}
|
|
207
|
+
response_data = self.api_client.call_api(
|
|
208
|
+
*_param,
|
|
209
|
+
_request_timeout=_request_timeout
|
|
210
|
+
)
|
|
211
|
+
response_data.read()
|
|
212
|
+
return self.api_client.response_deserialize(
|
|
213
|
+
response_data=response_data,
|
|
214
|
+
response_types_map=_response_types_map,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
@validate_call
|
|
219
|
+
def collect_payment_request_without_preload_content(
|
|
220
|
+
self,
|
|
221
|
+
payment_request_id: StrictStr,
|
|
222
|
+
environment: StrictStr,
|
|
223
|
+
merchant_account_id: StrictStr,
|
|
224
|
+
payment_request_collect_request: PaymentRequestCollectRequest,
|
|
225
|
+
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,
|
|
226
|
+
_request_timeout: Union[
|
|
227
|
+
None,
|
|
228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
229
|
+
Tuple[
|
|
230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
231
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
232
|
+
]
|
|
233
|
+
] = None,
|
|
234
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
235
|
+
_content_type: Optional[StrictStr] = None,
|
|
236
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
237
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
238
|
+
) -> RESTResponseType:
|
|
239
|
+
"""Collect all eligible invoices in a payment request
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
:param payment_request_id: (required)
|
|
243
|
+
:type payment_request_id: str
|
|
244
|
+
:param environment: (required)
|
|
245
|
+
:type environment: str
|
|
246
|
+
:param merchant_account_id: (required)
|
|
247
|
+
:type merchant_account_id: str
|
|
248
|
+
:param payment_request_collect_request: (required)
|
|
249
|
+
:type payment_request_collect_request: PaymentRequestCollectRequest
|
|
250
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
251
|
+
:type idempotency_key: str
|
|
252
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
253
|
+
number provided, it will be total request
|
|
254
|
+
timeout. It can also be a pair (tuple) of
|
|
255
|
+
(connection, read) timeouts.
|
|
256
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
257
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
258
|
+
request; this effectively ignores the
|
|
259
|
+
authentication in the spec for a single request.
|
|
260
|
+
:type _request_auth: dict, optional
|
|
261
|
+
:param _content_type: force content-type for the request.
|
|
262
|
+
:type _content_type: str, Optional
|
|
263
|
+
:param _headers: set to override the headers for a single
|
|
264
|
+
request; this effectively ignores the headers
|
|
265
|
+
in the spec for a single request.
|
|
266
|
+
:type _headers: dict, optional
|
|
267
|
+
:param _host_index: set to override the host_index for a single
|
|
268
|
+
request; this effectively ignores the host_index
|
|
269
|
+
in the spec for a single request.
|
|
270
|
+
:type _host_index: int, optional
|
|
271
|
+
:return: Returns the result object.
|
|
272
|
+
""" # noqa: E501
|
|
273
|
+
|
|
274
|
+
_param = self._collect_payment_request_serialize(
|
|
275
|
+
payment_request_id=payment_request_id,
|
|
276
|
+
environment=environment,
|
|
277
|
+
merchant_account_id=merchant_account_id,
|
|
278
|
+
payment_request_collect_request=payment_request_collect_request,
|
|
279
|
+
idempotency_key=idempotency_key,
|
|
280
|
+
_request_auth=_request_auth,
|
|
281
|
+
_content_type=_content_type,
|
|
282
|
+
_headers=_headers,
|
|
283
|
+
_host_index=_host_index
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
287
|
+
'200': "ApiWriteEnvelope",
|
|
288
|
+
'400': "ApiError",
|
|
289
|
+
'401': "ApiError",
|
|
290
|
+
'409': "ApiError",
|
|
291
|
+
'422': "ApiError",
|
|
292
|
+
'429': "ApiError",
|
|
293
|
+
}
|
|
294
|
+
response_data = self.api_client.call_api(
|
|
295
|
+
*_param,
|
|
296
|
+
_request_timeout=_request_timeout
|
|
297
|
+
)
|
|
298
|
+
return response_data.response
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def _collect_payment_request_serialize(
|
|
302
|
+
self,
|
|
303
|
+
payment_request_id,
|
|
304
|
+
environment,
|
|
305
|
+
merchant_account_id,
|
|
306
|
+
payment_request_collect_request,
|
|
307
|
+
idempotency_key,
|
|
308
|
+
_request_auth,
|
|
309
|
+
_content_type,
|
|
310
|
+
_headers,
|
|
311
|
+
_host_index,
|
|
312
|
+
) -> RequestSerialized:
|
|
313
|
+
|
|
314
|
+
_host = None
|
|
315
|
+
|
|
316
|
+
_collection_formats: Dict[str, str] = {
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
_path_params: Dict[str, str] = {}
|
|
320
|
+
_query_params: List[Tuple[str, str]] = []
|
|
321
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
322
|
+
_form_params: List[Tuple[str, str]] = []
|
|
323
|
+
_files: Dict[
|
|
324
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
325
|
+
] = {}
|
|
326
|
+
_body_params: Optional[bytes] = None
|
|
327
|
+
|
|
328
|
+
# process the path parameters
|
|
329
|
+
if payment_request_id is not None:
|
|
330
|
+
_path_params['paymentRequestId'] = payment_request_id
|
|
331
|
+
# process the query parameters
|
|
332
|
+
if environment is not None:
|
|
333
|
+
|
|
334
|
+
_query_params.append(('environment', environment))
|
|
335
|
+
|
|
336
|
+
if merchant_account_id is not None:
|
|
337
|
+
|
|
338
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
339
|
+
|
|
340
|
+
# process the header parameters
|
|
341
|
+
if idempotency_key is not None:
|
|
342
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
343
|
+
# process the form parameters
|
|
344
|
+
# process the body parameter
|
|
345
|
+
if payment_request_collect_request is not None:
|
|
346
|
+
_body_params = payment_request_collect_request
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
# set the HTTP header `Accept`
|
|
350
|
+
if 'Accept' not in _header_params:
|
|
351
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
352
|
+
[
|
|
353
|
+
'application/json'
|
|
354
|
+
]
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
# set the HTTP header `Content-Type`
|
|
358
|
+
if _content_type:
|
|
359
|
+
_header_params['Content-Type'] = _content_type
|
|
360
|
+
else:
|
|
361
|
+
_default_content_type = (
|
|
362
|
+
self.api_client.select_header_content_type(
|
|
363
|
+
[
|
|
364
|
+
'application/json'
|
|
365
|
+
]
|
|
366
|
+
)
|
|
367
|
+
)
|
|
368
|
+
if _default_content_type is not None:
|
|
369
|
+
_header_params['Content-Type'] = _default_content_type
|
|
370
|
+
|
|
371
|
+
# authentication setting
|
|
372
|
+
_auth_settings: List[str] = [
|
|
373
|
+
'api-key'
|
|
374
|
+
]
|
|
375
|
+
|
|
376
|
+
return self.api_client.param_serialize(
|
|
377
|
+
method='POST',
|
|
378
|
+
resource_path='/v1/payment-requests/{paymentRequestId}/collect',
|
|
379
|
+
path_params=_path_params,
|
|
380
|
+
query_params=_query_params,
|
|
381
|
+
header_params=_header_params,
|
|
382
|
+
body=_body_params,
|
|
383
|
+
post_params=_form_params,
|
|
384
|
+
files=_files,
|
|
385
|
+
auth_settings=_auth_settings,
|
|
386
|
+
collection_formats=_collection_formats,
|
|
387
|
+
_host=_host,
|
|
388
|
+
_request_auth=_request_auth
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
@validate_call
|
|
395
|
+
def create_payment_request(
|
|
396
|
+
self,
|
|
397
|
+
environment: StrictStr,
|
|
398
|
+
merchant_account_id: StrictStr,
|
|
399
|
+
payment_request_create_request: PaymentRequestCreateRequest,
|
|
400
|
+
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,
|
|
401
|
+
_request_timeout: Union[
|
|
402
|
+
None,
|
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
404
|
+
Tuple[
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
407
|
+
]
|
|
408
|
+
] = None,
|
|
409
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
410
|
+
_content_type: Optional[StrictStr] = None,
|
|
411
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
413
|
+
) -> ApiWriteEnvelope:
|
|
414
|
+
"""Create a hosted payment request for one or more recoverable invoices
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
:param environment: (required)
|
|
418
|
+
:type environment: str
|
|
419
|
+
:param merchant_account_id: (required)
|
|
420
|
+
:type merchant_account_id: str
|
|
421
|
+
:param payment_request_create_request: (required)
|
|
422
|
+
:type payment_request_create_request: PaymentRequestCreateRequest
|
|
423
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
424
|
+
:type idempotency_key: str
|
|
425
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
426
|
+
number provided, it will be total request
|
|
427
|
+
timeout. It can also be a pair (tuple) of
|
|
428
|
+
(connection, read) timeouts.
|
|
429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
431
|
+
request; this effectively ignores the
|
|
432
|
+
authentication in the spec for a single request.
|
|
433
|
+
:type _request_auth: dict, optional
|
|
434
|
+
:param _content_type: force content-type for the request.
|
|
435
|
+
:type _content_type: str, Optional
|
|
436
|
+
:param _headers: set to override the headers for a single
|
|
437
|
+
request; this effectively ignores the headers
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _headers: dict, optional
|
|
440
|
+
:param _host_index: set to override the host_index for a single
|
|
441
|
+
request; this effectively ignores the host_index
|
|
442
|
+
in the spec for a single request.
|
|
443
|
+
:type _host_index: int, optional
|
|
444
|
+
:return: Returns the result object.
|
|
445
|
+
""" # noqa: E501
|
|
446
|
+
|
|
447
|
+
_param = self._create_payment_request_serialize(
|
|
448
|
+
environment=environment,
|
|
449
|
+
merchant_account_id=merchant_account_id,
|
|
450
|
+
payment_request_create_request=payment_request_create_request,
|
|
451
|
+
idempotency_key=idempotency_key,
|
|
452
|
+
_request_auth=_request_auth,
|
|
453
|
+
_content_type=_content_type,
|
|
454
|
+
_headers=_headers,
|
|
455
|
+
_host_index=_host_index
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
459
|
+
'201': "ApiWriteEnvelope",
|
|
460
|
+
'400': "ApiError",
|
|
461
|
+
'401': "ApiError",
|
|
462
|
+
'409': "ApiError",
|
|
463
|
+
'422': "ApiError",
|
|
464
|
+
'429': "ApiError",
|
|
465
|
+
}
|
|
466
|
+
response_data = self.api_client.call_api(
|
|
467
|
+
*_param,
|
|
468
|
+
_request_timeout=_request_timeout
|
|
469
|
+
)
|
|
470
|
+
response_data.read()
|
|
471
|
+
return self.api_client.response_deserialize(
|
|
472
|
+
response_data=response_data,
|
|
473
|
+
response_types_map=_response_types_map,
|
|
474
|
+
).data
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
@validate_call
|
|
478
|
+
def create_payment_request_with_http_info(
|
|
479
|
+
self,
|
|
480
|
+
environment: StrictStr,
|
|
481
|
+
merchant_account_id: StrictStr,
|
|
482
|
+
payment_request_create_request: PaymentRequestCreateRequest,
|
|
483
|
+
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,
|
|
484
|
+
_request_timeout: Union[
|
|
485
|
+
None,
|
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
487
|
+
Tuple[
|
|
488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
490
|
+
]
|
|
491
|
+
] = None,
|
|
492
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_content_type: Optional[StrictStr] = None,
|
|
494
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
495
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
496
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
497
|
+
"""Create a hosted payment request for one or more recoverable invoices
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
:param environment: (required)
|
|
501
|
+
:type environment: str
|
|
502
|
+
:param merchant_account_id: (required)
|
|
503
|
+
:type merchant_account_id: str
|
|
504
|
+
:param payment_request_create_request: (required)
|
|
505
|
+
:type payment_request_create_request: PaymentRequestCreateRequest
|
|
506
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
507
|
+
:type idempotency_key: str
|
|
508
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
509
|
+
number provided, it will be total request
|
|
510
|
+
timeout. It can also be a pair (tuple) of
|
|
511
|
+
(connection, read) timeouts.
|
|
512
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
513
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
514
|
+
request; this effectively ignores the
|
|
515
|
+
authentication in the spec for a single request.
|
|
516
|
+
:type _request_auth: dict, optional
|
|
517
|
+
:param _content_type: force content-type for the request.
|
|
518
|
+
:type _content_type: str, Optional
|
|
519
|
+
:param _headers: set to override the headers for a single
|
|
520
|
+
request; this effectively ignores the headers
|
|
521
|
+
in the spec for a single request.
|
|
522
|
+
:type _headers: dict, optional
|
|
523
|
+
:param _host_index: set to override the host_index for a single
|
|
524
|
+
request; this effectively ignores the host_index
|
|
525
|
+
in the spec for a single request.
|
|
526
|
+
:type _host_index: int, optional
|
|
527
|
+
:return: Returns the result object.
|
|
528
|
+
""" # noqa: E501
|
|
529
|
+
|
|
530
|
+
_param = self._create_payment_request_serialize(
|
|
531
|
+
environment=environment,
|
|
532
|
+
merchant_account_id=merchant_account_id,
|
|
533
|
+
payment_request_create_request=payment_request_create_request,
|
|
534
|
+
idempotency_key=idempotency_key,
|
|
535
|
+
_request_auth=_request_auth,
|
|
536
|
+
_content_type=_content_type,
|
|
537
|
+
_headers=_headers,
|
|
538
|
+
_host_index=_host_index
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
542
|
+
'201': "ApiWriteEnvelope",
|
|
543
|
+
'400': "ApiError",
|
|
544
|
+
'401': "ApiError",
|
|
545
|
+
'409': "ApiError",
|
|
546
|
+
'422': "ApiError",
|
|
547
|
+
'429': "ApiError",
|
|
548
|
+
}
|
|
549
|
+
response_data = self.api_client.call_api(
|
|
550
|
+
*_param,
|
|
551
|
+
_request_timeout=_request_timeout
|
|
552
|
+
)
|
|
553
|
+
response_data.read()
|
|
554
|
+
return self.api_client.response_deserialize(
|
|
555
|
+
response_data=response_data,
|
|
556
|
+
response_types_map=_response_types_map,
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
@validate_call
|
|
561
|
+
def create_payment_request_without_preload_content(
|
|
562
|
+
self,
|
|
563
|
+
environment: StrictStr,
|
|
564
|
+
merchant_account_id: StrictStr,
|
|
565
|
+
payment_request_create_request: PaymentRequestCreateRequest,
|
|
566
|
+
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,
|
|
567
|
+
_request_timeout: Union[
|
|
568
|
+
None,
|
|
569
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
570
|
+
Tuple[
|
|
571
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
572
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
573
|
+
]
|
|
574
|
+
] = None,
|
|
575
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
576
|
+
_content_type: Optional[StrictStr] = None,
|
|
577
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
578
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
579
|
+
) -> RESTResponseType:
|
|
580
|
+
"""Create a hosted payment request for one or more recoverable invoices
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
:param environment: (required)
|
|
584
|
+
:type environment: str
|
|
585
|
+
:param merchant_account_id: (required)
|
|
586
|
+
:type merchant_account_id: str
|
|
587
|
+
:param payment_request_create_request: (required)
|
|
588
|
+
:type payment_request_create_request: PaymentRequestCreateRequest
|
|
589
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
590
|
+
:type idempotency_key: str
|
|
591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
592
|
+
number provided, it will be total request
|
|
593
|
+
timeout. It can also be a pair (tuple) of
|
|
594
|
+
(connection, read) timeouts.
|
|
595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
597
|
+
request; this effectively ignores the
|
|
598
|
+
authentication in the spec for a single request.
|
|
599
|
+
:type _request_auth: dict, optional
|
|
600
|
+
:param _content_type: force content-type for the request.
|
|
601
|
+
:type _content_type: str, Optional
|
|
602
|
+
:param _headers: set to override the headers for a single
|
|
603
|
+
request; this effectively ignores the headers
|
|
604
|
+
in the spec for a single request.
|
|
605
|
+
:type _headers: dict, optional
|
|
606
|
+
:param _host_index: set to override the host_index for a single
|
|
607
|
+
request; this effectively ignores the host_index
|
|
608
|
+
in the spec for a single request.
|
|
609
|
+
:type _host_index: int, optional
|
|
610
|
+
:return: Returns the result object.
|
|
611
|
+
""" # noqa: E501
|
|
612
|
+
|
|
613
|
+
_param = self._create_payment_request_serialize(
|
|
614
|
+
environment=environment,
|
|
615
|
+
merchant_account_id=merchant_account_id,
|
|
616
|
+
payment_request_create_request=payment_request_create_request,
|
|
617
|
+
idempotency_key=idempotency_key,
|
|
618
|
+
_request_auth=_request_auth,
|
|
619
|
+
_content_type=_content_type,
|
|
620
|
+
_headers=_headers,
|
|
621
|
+
_host_index=_host_index
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
625
|
+
'201': "ApiWriteEnvelope",
|
|
626
|
+
'400': "ApiError",
|
|
627
|
+
'401': "ApiError",
|
|
628
|
+
'409': "ApiError",
|
|
629
|
+
'422': "ApiError",
|
|
630
|
+
'429': "ApiError",
|
|
631
|
+
}
|
|
632
|
+
response_data = self.api_client.call_api(
|
|
633
|
+
*_param,
|
|
634
|
+
_request_timeout=_request_timeout
|
|
635
|
+
)
|
|
636
|
+
return response_data.response
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
def _create_payment_request_serialize(
|
|
640
|
+
self,
|
|
641
|
+
environment,
|
|
642
|
+
merchant_account_id,
|
|
643
|
+
payment_request_create_request,
|
|
644
|
+
idempotency_key,
|
|
645
|
+
_request_auth,
|
|
646
|
+
_content_type,
|
|
647
|
+
_headers,
|
|
648
|
+
_host_index,
|
|
649
|
+
) -> RequestSerialized:
|
|
650
|
+
|
|
651
|
+
_host = None
|
|
652
|
+
|
|
653
|
+
_collection_formats: Dict[str, str] = {
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
_path_params: Dict[str, str] = {}
|
|
657
|
+
_query_params: List[Tuple[str, str]] = []
|
|
658
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
659
|
+
_form_params: List[Tuple[str, str]] = []
|
|
660
|
+
_files: Dict[
|
|
661
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
662
|
+
] = {}
|
|
663
|
+
_body_params: Optional[bytes] = None
|
|
664
|
+
|
|
665
|
+
# process the path parameters
|
|
666
|
+
# process the query parameters
|
|
667
|
+
if environment is not None:
|
|
668
|
+
|
|
669
|
+
_query_params.append(('environment', environment))
|
|
670
|
+
|
|
671
|
+
if merchant_account_id is not None:
|
|
672
|
+
|
|
673
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
674
|
+
|
|
675
|
+
# process the header parameters
|
|
676
|
+
if idempotency_key is not None:
|
|
677
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
678
|
+
# process the form parameters
|
|
679
|
+
# process the body parameter
|
|
680
|
+
if payment_request_create_request is not None:
|
|
681
|
+
_body_params = payment_request_create_request
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
# set the HTTP header `Accept`
|
|
685
|
+
if 'Accept' not in _header_params:
|
|
686
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
687
|
+
[
|
|
688
|
+
'application/json'
|
|
689
|
+
]
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
# set the HTTP header `Content-Type`
|
|
693
|
+
if _content_type:
|
|
694
|
+
_header_params['Content-Type'] = _content_type
|
|
695
|
+
else:
|
|
696
|
+
_default_content_type = (
|
|
697
|
+
self.api_client.select_header_content_type(
|
|
698
|
+
[
|
|
699
|
+
'application/json'
|
|
700
|
+
]
|
|
701
|
+
)
|
|
702
|
+
)
|
|
703
|
+
if _default_content_type is not None:
|
|
704
|
+
_header_params['Content-Type'] = _default_content_type
|
|
705
|
+
|
|
706
|
+
# authentication setting
|
|
707
|
+
_auth_settings: List[str] = [
|
|
708
|
+
'api-key'
|
|
709
|
+
]
|
|
710
|
+
|
|
711
|
+
return self.api_client.param_serialize(
|
|
712
|
+
method='POST',
|
|
713
|
+
resource_path='/v1/payment-requests',
|
|
714
|
+
path_params=_path_params,
|
|
715
|
+
query_params=_query_params,
|
|
716
|
+
header_params=_header_params,
|
|
717
|
+
body=_body_params,
|
|
718
|
+
post_params=_form_params,
|
|
719
|
+
files=_files,
|
|
720
|
+
auth_settings=_auth_settings,
|
|
721
|
+
collection_formats=_collection_formats,
|
|
722
|
+
_host=_host,
|
|
723
|
+
_request_auth=_request_auth
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
@validate_call
|
|
730
|
+
def create_payment_request_link(
|
|
731
|
+
self,
|
|
732
|
+
payment_request_id: StrictStr,
|
|
733
|
+
environment: StrictStr,
|
|
734
|
+
merchant_account_id: StrictStr,
|
|
735
|
+
payment_request_link_create_request: PaymentRequestLinkCreateRequest,
|
|
736
|
+
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,
|
|
737
|
+
_request_timeout: Union[
|
|
738
|
+
None,
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Tuple[
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
743
|
+
]
|
|
744
|
+
] = None,
|
|
745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_content_type: Optional[StrictStr] = None,
|
|
747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
749
|
+
) -> ApiWriteEnvelope:
|
|
750
|
+
"""Create an expiring hosted payment link for a payment request
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
:param payment_request_id: (required)
|
|
754
|
+
:type payment_request_id: str
|
|
755
|
+
:param environment: (required)
|
|
756
|
+
:type environment: str
|
|
757
|
+
:param merchant_account_id: (required)
|
|
758
|
+
:type merchant_account_id: str
|
|
759
|
+
:param payment_request_link_create_request: (required)
|
|
760
|
+
:type payment_request_link_create_request: PaymentRequestLinkCreateRequest
|
|
761
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
762
|
+
:type idempotency_key: str
|
|
763
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
764
|
+
number provided, it will be total request
|
|
765
|
+
timeout. It can also be a pair (tuple) of
|
|
766
|
+
(connection, read) timeouts.
|
|
767
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
768
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
769
|
+
request; this effectively ignores the
|
|
770
|
+
authentication in the spec for a single request.
|
|
771
|
+
:type _request_auth: dict, optional
|
|
772
|
+
:param _content_type: force content-type for the request.
|
|
773
|
+
:type _content_type: str, Optional
|
|
774
|
+
:param _headers: set to override the headers for a single
|
|
775
|
+
request; this effectively ignores the headers
|
|
776
|
+
in the spec for a single request.
|
|
777
|
+
:type _headers: dict, optional
|
|
778
|
+
:param _host_index: set to override the host_index for a single
|
|
779
|
+
request; this effectively ignores the host_index
|
|
780
|
+
in the spec for a single request.
|
|
781
|
+
:type _host_index: int, optional
|
|
782
|
+
:return: Returns the result object.
|
|
783
|
+
""" # noqa: E501
|
|
784
|
+
|
|
785
|
+
_param = self._create_payment_request_link_serialize(
|
|
786
|
+
payment_request_id=payment_request_id,
|
|
787
|
+
environment=environment,
|
|
788
|
+
merchant_account_id=merchant_account_id,
|
|
789
|
+
payment_request_link_create_request=payment_request_link_create_request,
|
|
790
|
+
idempotency_key=idempotency_key,
|
|
791
|
+
_request_auth=_request_auth,
|
|
792
|
+
_content_type=_content_type,
|
|
793
|
+
_headers=_headers,
|
|
794
|
+
_host_index=_host_index
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
798
|
+
'201': "ApiWriteEnvelope",
|
|
799
|
+
'400': "ApiError",
|
|
800
|
+
'401': "ApiError",
|
|
801
|
+
'409': "ApiError",
|
|
802
|
+
'422': "ApiError",
|
|
803
|
+
'429': "ApiError",
|
|
804
|
+
}
|
|
805
|
+
response_data = self.api_client.call_api(
|
|
806
|
+
*_param,
|
|
807
|
+
_request_timeout=_request_timeout
|
|
808
|
+
)
|
|
809
|
+
response_data.read()
|
|
810
|
+
return self.api_client.response_deserialize(
|
|
811
|
+
response_data=response_data,
|
|
812
|
+
response_types_map=_response_types_map,
|
|
813
|
+
).data
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
@validate_call
|
|
817
|
+
def create_payment_request_link_with_http_info(
|
|
818
|
+
self,
|
|
819
|
+
payment_request_id: StrictStr,
|
|
820
|
+
environment: StrictStr,
|
|
821
|
+
merchant_account_id: StrictStr,
|
|
822
|
+
payment_request_link_create_request: PaymentRequestLinkCreateRequest,
|
|
823
|
+
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,
|
|
824
|
+
_request_timeout: Union[
|
|
825
|
+
None,
|
|
826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
827
|
+
Tuple[
|
|
828
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
829
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
830
|
+
]
|
|
831
|
+
] = None,
|
|
832
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
833
|
+
_content_type: Optional[StrictStr] = None,
|
|
834
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
835
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
836
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
837
|
+
"""Create an expiring hosted payment link for a payment request
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
:param payment_request_id: (required)
|
|
841
|
+
:type payment_request_id: str
|
|
842
|
+
:param environment: (required)
|
|
843
|
+
:type environment: str
|
|
844
|
+
:param merchant_account_id: (required)
|
|
845
|
+
:type merchant_account_id: str
|
|
846
|
+
:param payment_request_link_create_request: (required)
|
|
847
|
+
:type payment_request_link_create_request: PaymentRequestLinkCreateRequest
|
|
848
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
849
|
+
:type idempotency_key: str
|
|
850
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
851
|
+
number provided, it will be total request
|
|
852
|
+
timeout. It can also be a pair (tuple) of
|
|
853
|
+
(connection, read) timeouts.
|
|
854
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
855
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
856
|
+
request; this effectively ignores the
|
|
857
|
+
authentication in the spec for a single request.
|
|
858
|
+
:type _request_auth: dict, optional
|
|
859
|
+
:param _content_type: force content-type for the request.
|
|
860
|
+
:type _content_type: str, Optional
|
|
861
|
+
:param _headers: set to override the headers for a single
|
|
862
|
+
request; this effectively ignores the headers
|
|
863
|
+
in the spec for a single request.
|
|
864
|
+
:type _headers: dict, optional
|
|
865
|
+
:param _host_index: set to override the host_index for a single
|
|
866
|
+
request; this effectively ignores the host_index
|
|
867
|
+
in the spec for a single request.
|
|
868
|
+
:type _host_index: int, optional
|
|
869
|
+
:return: Returns the result object.
|
|
870
|
+
""" # noqa: E501
|
|
871
|
+
|
|
872
|
+
_param = self._create_payment_request_link_serialize(
|
|
873
|
+
payment_request_id=payment_request_id,
|
|
874
|
+
environment=environment,
|
|
875
|
+
merchant_account_id=merchant_account_id,
|
|
876
|
+
payment_request_link_create_request=payment_request_link_create_request,
|
|
877
|
+
idempotency_key=idempotency_key,
|
|
878
|
+
_request_auth=_request_auth,
|
|
879
|
+
_content_type=_content_type,
|
|
880
|
+
_headers=_headers,
|
|
881
|
+
_host_index=_host_index
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
885
|
+
'201': "ApiWriteEnvelope",
|
|
886
|
+
'400': "ApiError",
|
|
887
|
+
'401': "ApiError",
|
|
888
|
+
'409': "ApiError",
|
|
889
|
+
'422': "ApiError",
|
|
890
|
+
'429': "ApiError",
|
|
891
|
+
}
|
|
892
|
+
response_data = self.api_client.call_api(
|
|
893
|
+
*_param,
|
|
894
|
+
_request_timeout=_request_timeout
|
|
895
|
+
)
|
|
896
|
+
response_data.read()
|
|
897
|
+
return self.api_client.response_deserialize(
|
|
898
|
+
response_data=response_data,
|
|
899
|
+
response_types_map=_response_types_map,
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
@validate_call
|
|
904
|
+
def create_payment_request_link_without_preload_content(
|
|
905
|
+
self,
|
|
906
|
+
payment_request_id: StrictStr,
|
|
907
|
+
environment: StrictStr,
|
|
908
|
+
merchant_account_id: StrictStr,
|
|
909
|
+
payment_request_link_create_request: PaymentRequestLinkCreateRequest,
|
|
910
|
+
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,
|
|
911
|
+
_request_timeout: Union[
|
|
912
|
+
None,
|
|
913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
914
|
+
Tuple[
|
|
915
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
916
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
917
|
+
]
|
|
918
|
+
] = None,
|
|
919
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
920
|
+
_content_type: Optional[StrictStr] = None,
|
|
921
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
922
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
923
|
+
) -> RESTResponseType:
|
|
924
|
+
"""Create an expiring hosted payment link for a payment request
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
:param payment_request_id: (required)
|
|
928
|
+
:type payment_request_id: str
|
|
929
|
+
:param environment: (required)
|
|
930
|
+
:type environment: str
|
|
931
|
+
:param merchant_account_id: (required)
|
|
932
|
+
:type merchant_account_id: str
|
|
933
|
+
:param payment_request_link_create_request: (required)
|
|
934
|
+
:type payment_request_link_create_request: PaymentRequestLinkCreateRequest
|
|
935
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
936
|
+
:type idempotency_key: str
|
|
937
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
938
|
+
number provided, it will be total request
|
|
939
|
+
timeout. It can also be a pair (tuple) of
|
|
940
|
+
(connection, read) timeouts.
|
|
941
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
942
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
943
|
+
request; this effectively ignores the
|
|
944
|
+
authentication in the spec for a single request.
|
|
945
|
+
:type _request_auth: dict, optional
|
|
946
|
+
:param _content_type: force content-type for the request.
|
|
947
|
+
:type _content_type: str, Optional
|
|
948
|
+
:param _headers: set to override the headers for a single
|
|
949
|
+
request; this effectively ignores the headers
|
|
950
|
+
in the spec for a single request.
|
|
951
|
+
:type _headers: dict, optional
|
|
952
|
+
:param _host_index: set to override the host_index for a single
|
|
953
|
+
request; this effectively ignores the host_index
|
|
954
|
+
in the spec for a single request.
|
|
955
|
+
:type _host_index: int, optional
|
|
956
|
+
:return: Returns the result object.
|
|
957
|
+
""" # noqa: E501
|
|
958
|
+
|
|
959
|
+
_param = self._create_payment_request_link_serialize(
|
|
960
|
+
payment_request_id=payment_request_id,
|
|
961
|
+
environment=environment,
|
|
962
|
+
merchant_account_id=merchant_account_id,
|
|
963
|
+
payment_request_link_create_request=payment_request_link_create_request,
|
|
964
|
+
idempotency_key=idempotency_key,
|
|
965
|
+
_request_auth=_request_auth,
|
|
966
|
+
_content_type=_content_type,
|
|
967
|
+
_headers=_headers,
|
|
968
|
+
_host_index=_host_index
|
|
969
|
+
)
|
|
970
|
+
|
|
971
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
972
|
+
'201': "ApiWriteEnvelope",
|
|
973
|
+
'400': "ApiError",
|
|
974
|
+
'401': "ApiError",
|
|
975
|
+
'409': "ApiError",
|
|
976
|
+
'422': "ApiError",
|
|
977
|
+
'429': "ApiError",
|
|
978
|
+
}
|
|
979
|
+
response_data = self.api_client.call_api(
|
|
980
|
+
*_param,
|
|
981
|
+
_request_timeout=_request_timeout
|
|
982
|
+
)
|
|
983
|
+
return response_data.response
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
def _create_payment_request_link_serialize(
|
|
987
|
+
self,
|
|
988
|
+
payment_request_id,
|
|
989
|
+
environment,
|
|
990
|
+
merchant_account_id,
|
|
991
|
+
payment_request_link_create_request,
|
|
992
|
+
idempotency_key,
|
|
993
|
+
_request_auth,
|
|
994
|
+
_content_type,
|
|
995
|
+
_headers,
|
|
996
|
+
_host_index,
|
|
997
|
+
) -> RequestSerialized:
|
|
998
|
+
|
|
999
|
+
_host = None
|
|
1000
|
+
|
|
1001
|
+
_collection_formats: Dict[str, str] = {
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
_path_params: Dict[str, str] = {}
|
|
1005
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1006
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1007
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1008
|
+
_files: Dict[
|
|
1009
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1010
|
+
] = {}
|
|
1011
|
+
_body_params: Optional[bytes] = None
|
|
1012
|
+
|
|
1013
|
+
# process the path parameters
|
|
1014
|
+
if payment_request_id is not None:
|
|
1015
|
+
_path_params['paymentRequestId'] = payment_request_id
|
|
1016
|
+
# process the query parameters
|
|
1017
|
+
if environment is not None:
|
|
1018
|
+
|
|
1019
|
+
_query_params.append(('environment', environment))
|
|
1020
|
+
|
|
1021
|
+
if merchant_account_id is not None:
|
|
1022
|
+
|
|
1023
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1024
|
+
|
|
1025
|
+
# process the header parameters
|
|
1026
|
+
if idempotency_key is not None:
|
|
1027
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1028
|
+
# process the form parameters
|
|
1029
|
+
# process the body parameter
|
|
1030
|
+
if payment_request_link_create_request is not None:
|
|
1031
|
+
_body_params = payment_request_link_create_request
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
# set the HTTP header `Accept`
|
|
1035
|
+
if 'Accept' not in _header_params:
|
|
1036
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1037
|
+
[
|
|
1038
|
+
'application/json'
|
|
1039
|
+
]
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
# set the HTTP header `Content-Type`
|
|
1043
|
+
if _content_type:
|
|
1044
|
+
_header_params['Content-Type'] = _content_type
|
|
1045
|
+
else:
|
|
1046
|
+
_default_content_type = (
|
|
1047
|
+
self.api_client.select_header_content_type(
|
|
1048
|
+
[
|
|
1049
|
+
'application/json'
|
|
1050
|
+
]
|
|
1051
|
+
)
|
|
1052
|
+
)
|
|
1053
|
+
if _default_content_type is not None:
|
|
1054
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1055
|
+
|
|
1056
|
+
# authentication setting
|
|
1057
|
+
_auth_settings: List[str] = [
|
|
1058
|
+
'api-key'
|
|
1059
|
+
]
|
|
1060
|
+
|
|
1061
|
+
return self.api_client.param_serialize(
|
|
1062
|
+
method='POST',
|
|
1063
|
+
resource_path='/v1/payment-requests/{paymentRequestId}/links',
|
|
1064
|
+
path_params=_path_params,
|
|
1065
|
+
query_params=_query_params,
|
|
1066
|
+
header_params=_header_params,
|
|
1067
|
+
body=_body_params,
|
|
1068
|
+
post_params=_form_params,
|
|
1069
|
+
files=_files,
|
|
1070
|
+
auth_settings=_auth_settings,
|
|
1071
|
+
collection_formats=_collection_formats,
|
|
1072
|
+
_host=_host,
|
|
1073
|
+
_request_auth=_request_auth
|
|
1074
|
+
)
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
@validate_call
|
|
1080
|
+
def get_payment_request(
|
|
1081
|
+
self,
|
|
1082
|
+
payment_request_id: StrictStr,
|
|
1083
|
+
environment: StrictStr,
|
|
1084
|
+
merchant_account_id: StrictStr,
|
|
1085
|
+
_request_timeout: Union[
|
|
1086
|
+
None,
|
|
1087
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1088
|
+
Tuple[
|
|
1089
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1090
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1091
|
+
]
|
|
1092
|
+
] = None,
|
|
1093
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1094
|
+
_content_type: Optional[StrictStr] = None,
|
|
1095
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1096
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1097
|
+
) -> ApiWriteEnvelope:
|
|
1098
|
+
"""Inspect a payment request and its grouped invoices
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
:param payment_request_id: (required)
|
|
1102
|
+
:type payment_request_id: str
|
|
1103
|
+
:param environment: (required)
|
|
1104
|
+
:type environment: str
|
|
1105
|
+
:param merchant_account_id: (required)
|
|
1106
|
+
:type merchant_account_id: str
|
|
1107
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1108
|
+
number provided, it will be total request
|
|
1109
|
+
timeout. It can also be a pair (tuple) of
|
|
1110
|
+
(connection, read) timeouts.
|
|
1111
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1112
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1113
|
+
request; this effectively ignores the
|
|
1114
|
+
authentication in the spec for a single request.
|
|
1115
|
+
:type _request_auth: dict, optional
|
|
1116
|
+
:param _content_type: force content-type for the request.
|
|
1117
|
+
:type _content_type: str, Optional
|
|
1118
|
+
:param _headers: set to override the headers for a single
|
|
1119
|
+
request; this effectively ignores the headers
|
|
1120
|
+
in the spec for a single request.
|
|
1121
|
+
:type _headers: dict, optional
|
|
1122
|
+
:param _host_index: set to override the host_index for a single
|
|
1123
|
+
request; this effectively ignores the host_index
|
|
1124
|
+
in the spec for a single request.
|
|
1125
|
+
:type _host_index: int, optional
|
|
1126
|
+
:return: Returns the result object.
|
|
1127
|
+
""" # noqa: E501
|
|
1128
|
+
|
|
1129
|
+
_param = self._get_payment_request_serialize(
|
|
1130
|
+
payment_request_id=payment_request_id,
|
|
1131
|
+
environment=environment,
|
|
1132
|
+
merchant_account_id=merchant_account_id,
|
|
1133
|
+
_request_auth=_request_auth,
|
|
1134
|
+
_content_type=_content_type,
|
|
1135
|
+
_headers=_headers,
|
|
1136
|
+
_host_index=_host_index
|
|
1137
|
+
)
|
|
1138
|
+
|
|
1139
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1140
|
+
'200': "ApiWriteEnvelope",
|
|
1141
|
+
'400': "ApiError",
|
|
1142
|
+
'401': "ApiError",
|
|
1143
|
+
'409': "ApiError",
|
|
1144
|
+
'422': "ApiError",
|
|
1145
|
+
'429': "ApiError",
|
|
1146
|
+
}
|
|
1147
|
+
response_data = self.api_client.call_api(
|
|
1148
|
+
*_param,
|
|
1149
|
+
_request_timeout=_request_timeout
|
|
1150
|
+
)
|
|
1151
|
+
response_data.read()
|
|
1152
|
+
return self.api_client.response_deserialize(
|
|
1153
|
+
response_data=response_data,
|
|
1154
|
+
response_types_map=_response_types_map,
|
|
1155
|
+
).data
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
@validate_call
|
|
1159
|
+
def get_payment_request_with_http_info(
|
|
1160
|
+
self,
|
|
1161
|
+
payment_request_id: StrictStr,
|
|
1162
|
+
environment: StrictStr,
|
|
1163
|
+
merchant_account_id: StrictStr,
|
|
1164
|
+
_request_timeout: Union[
|
|
1165
|
+
None,
|
|
1166
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1167
|
+
Tuple[
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1169
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1170
|
+
]
|
|
1171
|
+
] = None,
|
|
1172
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1173
|
+
_content_type: Optional[StrictStr] = None,
|
|
1174
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1175
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1176
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1177
|
+
"""Inspect a payment request and its grouped invoices
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
:param payment_request_id: (required)
|
|
1181
|
+
:type payment_request_id: str
|
|
1182
|
+
:param environment: (required)
|
|
1183
|
+
:type environment: str
|
|
1184
|
+
:param merchant_account_id: (required)
|
|
1185
|
+
:type merchant_account_id: str
|
|
1186
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1187
|
+
number provided, it will be total request
|
|
1188
|
+
timeout. It can also be a pair (tuple) of
|
|
1189
|
+
(connection, read) timeouts.
|
|
1190
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1191
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1192
|
+
request; this effectively ignores the
|
|
1193
|
+
authentication in the spec for a single request.
|
|
1194
|
+
:type _request_auth: dict, optional
|
|
1195
|
+
:param _content_type: force content-type for the request.
|
|
1196
|
+
:type _content_type: str, Optional
|
|
1197
|
+
:param _headers: set to override the headers for a single
|
|
1198
|
+
request; this effectively ignores the headers
|
|
1199
|
+
in the spec for a single request.
|
|
1200
|
+
:type _headers: dict, optional
|
|
1201
|
+
:param _host_index: set to override the host_index for a single
|
|
1202
|
+
request; this effectively ignores the host_index
|
|
1203
|
+
in the spec for a single request.
|
|
1204
|
+
:type _host_index: int, optional
|
|
1205
|
+
:return: Returns the result object.
|
|
1206
|
+
""" # noqa: E501
|
|
1207
|
+
|
|
1208
|
+
_param = self._get_payment_request_serialize(
|
|
1209
|
+
payment_request_id=payment_request_id,
|
|
1210
|
+
environment=environment,
|
|
1211
|
+
merchant_account_id=merchant_account_id,
|
|
1212
|
+
_request_auth=_request_auth,
|
|
1213
|
+
_content_type=_content_type,
|
|
1214
|
+
_headers=_headers,
|
|
1215
|
+
_host_index=_host_index
|
|
1216
|
+
)
|
|
1217
|
+
|
|
1218
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1219
|
+
'200': "ApiWriteEnvelope",
|
|
1220
|
+
'400': "ApiError",
|
|
1221
|
+
'401': "ApiError",
|
|
1222
|
+
'409': "ApiError",
|
|
1223
|
+
'422': "ApiError",
|
|
1224
|
+
'429': "ApiError",
|
|
1225
|
+
}
|
|
1226
|
+
response_data = self.api_client.call_api(
|
|
1227
|
+
*_param,
|
|
1228
|
+
_request_timeout=_request_timeout
|
|
1229
|
+
)
|
|
1230
|
+
response_data.read()
|
|
1231
|
+
return self.api_client.response_deserialize(
|
|
1232
|
+
response_data=response_data,
|
|
1233
|
+
response_types_map=_response_types_map,
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
@validate_call
|
|
1238
|
+
def get_payment_request_without_preload_content(
|
|
1239
|
+
self,
|
|
1240
|
+
payment_request_id: StrictStr,
|
|
1241
|
+
environment: StrictStr,
|
|
1242
|
+
merchant_account_id: StrictStr,
|
|
1243
|
+
_request_timeout: Union[
|
|
1244
|
+
None,
|
|
1245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1246
|
+
Tuple[
|
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1248
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1249
|
+
]
|
|
1250
|
+
] = None,
|
|
1251
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1252
|
+
_content_type: Optional[StrictStr] = None,
|
|
1253
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1254
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1255
|
+
) -> RESTResponseType:
|
|
1256
|
+
"""Inspect a payment request and its grouped invoices
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
:param payment_request_id: (required)
|
|
1260
|
+
:type payment_request_id: str
|
|
1261
|
+
:param environment: (required)
|
|
1262
|
+
:type environment: str
|
|
1263
|
+
:param merchant_account_id: (required)
|
|
1264
|
+
:type merchant_account_id: str
|
|
1265
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1266
|
+
number provided, it will be total request
|
|
1267
|
+
timeout. It can also be a pair (tuple) of
|
|
1268
|
+
(connection, read) timeouts.
|
|
1269
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1270
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1271
|
+
request; this effectively ignores the
|
|
1272
|
+
authentication in the spec for a single request.
|
|
1273
|
+
:type _request_auth: dict, optional
|
|
1274
|
+
:param _content_type: force content-type for the request.
|
|
1275
|
+
:type _content_type: str, Optional
|
|
1276
|
+
:param _headers: set to override the headers for a single
|
|
1277
|
+
request; this effectively ignores the headers
|
|
1278
|
+
in the spec for a single request.
|
|
1279
|
+
:type _headers: dict, optional
|
|
1280
|
+
:param _host_index: set to override the host_index for a single
|
|
1281
|
+
request; this effectively ignores the host_index
|
|
1282
|
+
in the spec for a single request.
|
|
1283
|
+
:type _host_index: int, optional
|
|
1284
|
+
:return: Returns the result object.
|
|
1285
|
+
""" # noqa: E501
|
|
1286
|
+
|
|
1287
|
+
_param = self._get_payment_request_serialize(
|
|
1288
|
+
payment_request_id=payment_request_id,
|
|
1289
|
+
environment=environment,
|
|
1290
|
+
merchant_account_id=merchant_account_id,
|
|
1291
|
+
_request_auth=_request_auth,
|
|
1292
|
+
_content_type=_content_type,
|
|
1293
|
+
_headers=_headers,
|
|
1294
|
+
_host_index=_host_index
|
|
1295
|
+
)
|
|
1296
|
+
|
|
1297
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1298
|
+
'200': "ApiWriteEnvelope",
|
|
1299
|
+
'400': "ApiError",
|
|
1300
|
+
'401': "ApiError",
|
|
1301
|
+
'409': "ApiError",
|
|
1302
|
+
'422': "ApiError",
|
|
1303
|
+
'429': "ApiError",
|
|
1304
|
+
}
|
|
1305
|
+
response_data = self.api_client.call_api(
|
|
1306
|
+
*_param,
|
|
1307
|
+
_request_timeout=_request_timeout
|
|
1308
|
+
)
|
|
1309
|
+
return response_data.response
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
def _get_payment_request_serialize(
|
|
1313
|
+
self,
|
|
1314
|
+
payment_request_id,
|
|
1315
|
+
environment,
|
|
1316
|
+
merchant_account_id,
|
|
1317
|
+
_request_auth,
|
|
1318
|
+
_content_type,
|
|
1319
|
+
_headers,
|
|
1320
|
+
_host_index,
|
|
1321
|
+
) -> RequestSerialized:
|
|
1322
|
+
|
|
1323
|
+
_host = None
|
|
1324
|
+
|
|
1325
|
+
_collection_formats: Dict[str, str] = {
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
_path_params: Dict[str, str] = {}
|
|
1329
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1330
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1331
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1332
|
+
_files: Dict[
|
|
1333
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1334
|
+
] = {}
|
|
1335
|
+
_body_params: Optional[bytes] = None
|
|
1336
|
+
|
|
1337
|
+
# process the path parameters
|
|
1338
|
+
if payment_request_id is not None:
|
|
1339
|
+
_path_params['paymentRequestId'] = payment_request_id
|
|
1340
|
+
# process the query parameters
|
|
1341
|
+
if environment is not None:
|
|
1342
|
+
|
|
1343
|
+
_query_params.append(('environment', environment))
|
|
1344
|
+
|
|
1345
|
+
if merchant_account_id is not None:
|
|
1346
|
+
|
|
1347
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1348
|
+
|
|
1349
|
+
# process the header parameters
|
|
1350
|
+
# process the form parameters
|
|
1351
|
+
# process the body parameter
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
# set the HTTP header `Accept`
|
|
1355
|
+
if 'Accept' not in _header_params:
|
|
1356
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1357
|
+
[
|
|
1358
|
+
'application/json'
|
|
1359
|
+
]
|
|
1360
|
+
)
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
# authentication setting
|
|
1364
|
+
_auth_settings: List[str] = [
|
|
1365
|
+
'api-key'
|
|
1366
|
+
]
|
|
1367
|
+
|
|
1368
|
+
return self.api_client.param_serialize(
|
|
1369
|
+
method='GET',
|
|
1370
|
+
resource_path='/v1/payment-requests/{paymentRequestId}',
|
|
1371
|
+
path_params=_path_params,
|
|
1372
|
+
query_params=_query_params,
|
|
1373
|
+
header_params=_header_params,
|
|
1374
|
+
body=_body_params,
|
|
1375
|
+
post_params=_form_params,
|
|
1376
|
+
files=_files,
|
|
1377
|
+
auth_settings=_auth_settings,
|
|
1378
|
+
collection_formats=_collection_formats,
|
|
1379
|
+
_host=_host,
|
|
1380
|
+
_request_auth=_request_auth
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
@validate_call
|
|
1387
|
+
def list_payment_requests(
|
|
1388
|
+
self,
|
|
1389
|
+
environment: StrictStr,
|
|
1390
|
+
merchant_account_id: StrictStr,
|
|
1391
|
+
customer: Optional[StrictStr] = None,
|
|
1392
|
+
customer_external_id: Optional[StrictStr] = None,
|
|
1393
|
+
billing_account_id: Optional[StrictStr] = None,
|
|
1394
|
+
invoice: Optional[StrictStr] = None,
|
|
1395
|
+
invoice_id: Optional[StrictStr] = None,
|
|
1396
|
+
payment_intent_id: Optional[StrictStr] = None,
|
|
1397
|
+
payment_id: Optional[StrictStr] = None,
|
|
1398
|
+
created_by_ref: Optional[StrictStr] = None,
|
|
1399
|
+
status: Optional[StrictStr] = None,
|
|
1400
|
+
last_attempt_status: Optional[StrictStr] = None,
|
|
1401
|
+
limit: Optional[StrictStr] = None,
|
|
1402
|
+
offset: Optional[StrictStr] = None,
|
|
1403
|
+
_request_timeout: Union[
|
|
1404
|
+
None,
|
|
1405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1406
|
+
Tuple[
|
|
1407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1409
|
+
]
|
|
1410
|
+
] = None,
|
|
1411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1412
|
+
_content_type: Optional[StrictStr] = None,
|
|
1413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1415
|
+
) -> ApiWriteEnvelope:
|
|
1416
|
+
"""List payment requests by customer, account, request status, or latest attempt status
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
:param environment: (required)
|
|
1420
|
+
:type environment: str
|
|
1421
|
+
:param merchant_account_id: (required)
|
|
1422
|
+
:type merchant_account_id: str
|
|
1423
|
+
:param customer:
|
|
1424
|
+
:type customer: str
|
|
1425
|
+
:param customer_external_id:
|
|
1426
|
+
:type customer_external_id: str
|
|
1427
|
+
:param billing_account_id:
|
|
1428
|
+
:type billing_account_id: str
|
|
1429
|
+
:param invoice:
|
|
1430
|
+
:type invoice: str
|
|
1431
|
+
:param invoice_id:
|
|
1432
|
+
:type invoice_id: str
|
|
1433
|
+
:param payment_intent_id:
|
|
1434
|
+
:type payment_intent_id: str
|
|
1435
|
+
:param payment_id:
|
|
1436
|
+
:type payment_id: str
|
|
1437
|
+
:param created_by_ref:
|
|
1438
|
+
:type created_by_ref: str
|
|
1439
|
+
:param status:
|
|
1440
|
+
:type status: str
|
|
1441
|
+
:param last_attempt_status:
|
|
1442
|
+
:type last_attempt_status: str
|
|
1443
|
+
:param limit:
|
|
1444
|
+
:type limit: str
|
|
1445
|
+
:param offset:
|
|
1446
|
+
:type offset: str
|
|
1447
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1448
|
+
number provided, it will be total request
|
|
1449
|
+
timeout. It can also be a pair (tuple) of
|
|
1450
|
+
(connection, read) timeouts.
|
|
1451
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1452
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1453
|
+
request; this effectively ignores the
|
|
1454
|
+
authentication in the spec for a single request.
|
|
1455
|
+
:type _request_auth: dict, optional
|
|
1456
|
+
:param _content_type: force content-type for the request.
|
|
1457
|
+
:type _content_type: str, Optional
|
|
1458
|
+
:param _headers: set to override the headers for a single
|
|
1459
|
+
request; this effectively ignores the headers
|
|
1460
|
+
in the spec for a single request.
|
|
1461
|
+
:type _headers: dict, optional
|
|
1462
|
+
:param _host_index: set to override the host_index for a single
|
|
1463
|
+
request; this effectively ignores the host_index
|
|
1464
|
+
in the spec for a single request.
|
|
1465
|
+
:type _host_index: int, optional
|
|
1466
|
+
:return: Returns the result object.
|
|
1467
|
+
""" # noqa: E501
|
|
1468
|
+
|
|
1469
|
+
_param = self._list_payment_requests_serialize(
|
|
1470
|
+
environment=environment,
|
|
1471
|
+
merchant_account_id=merchant_account_id,
|
|
1472
|
+
customer=customer,
|
|
1473
|
+
customer_external_id=customer_external_id,
|
|
1474
|
+
billing_account_id=billing_account_id,
|
|
1475
|
+
invoice=invoice,
|
|
1476
|
+
invoice_id=invoice_id,
|
|
1477
|
+
payment_intent_id=payment_intent_id,
|
|
1478
|
+
payment_id=payment_id,
|
|
1479
|
+
created_by_ref=created_by_ref,
|
|
1480
|
+
status=status,
|
|
1481
|
+
last_attempt_status=last_attempt_status,
|
|
1482
|
+
limit=limit,
|
|
1483
|
+
offset=offset,
|
|
1484
|
+
_request_auth=_request_auth,
|
|
1485
|
+
_content_type=_content_type,
|
|
1486
|
+
_headers=_headers,
|
|
1487
|
+
_host_index=_host_index
|
|
1488
|
+
)
|
|
1489
|
+
|
|
1490
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1491
|
+
'200': "ApiWriteEnvelope",
|
|
1492
|
+
'400': "ApiError",
|
|
1493
|
+
'401': "ApiError",
|
|
1494
|
+
'409': "ApiError",
|
|
1495
|
+
'422': "ApiError",
|
|
1496
|
+
'429': "ApiError",
|
|
1497
|
+
}
|
|
1498
|
+
response_data = self.api_client.call_api(
|
|
1499
|
+
*_param,
|
|
1500
|
+
_request_timeout=_request_timeout
|
|
1501
|
+
)
|
|
1502
|
+
response_data.read()
|
|
1503
|
+
return self.api_client.response_deserialize(
|
|
1504
|
+
response_data=response_data,
|
|
1505
|
+
response_types_map=_response_types_map,
|
|
1506
|
+
).data
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
@validate_call
|
|
1510
|
+
def list_payment_requests_with_http_info(
|
|
1511
|
+
self,
|
|
1512
|
+
environment: StrictStr,
|
|
1513
|
+
merchant_account_id: StrictStr,
|
|
1514
|
+
customer: Optional[StrictStr] = None,
|
|
1515
|
+
customer_external_id: Optional[StrictStr] = None,
|
|
1516
|
+
billing_account_id: Optional[StrictStr] = None,
|
|
1517
|
+
invoice: Optional[StrictStr] = None,
|
|
1518
|
+
invoice_id: Optional[StrictStr] = None,
|
|
1519
|
+
payment_intent_id: Optional[StrictStr] = None,
|
|
1520
|
+
payment_id: Optional[StrictStr] = None,
|
|
1521
|
+
created_by_ref: Optional[StrictStr] = None,
|
|
1522
|
+
status: Optional[StrictStr] = None,
|
|
1523
|
+
last_attempt_status: Optional[StrictStr] = None,
|
|
1524
|
+
limit: Optional[StrictStr] = None,
|
|
1525
|
+
offset: Optional[StrictStr] = None,
|
|
1526
|
+
_request_timeout: Union[
|
|
1527
|
+
None,
|
|
1528
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1529
|
+
Tuple[
|
|
1530
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1531
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1532
|
+
]
|
|
1533
|
+
] = None,
|
|
1534
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1535
|
+
_content_type: Optional[StrictStr] = None,
|
|
1536
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1537
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1538
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1539
|
+
"""List payment requests by customer, account, request status, or latest attempt status
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
:param environment: (required)
|
|
1543
|
+
:type environment: str
|
|
1544
|
+
:param merchant_account_id: (required)
|
|
1545
|
+
:type merchant_account_id: str
|
|
1546
|
+
:param customer:
|
|
1547
|
+
:type customer: str
|
|
1548
|
+
:param customer_external_id:
|
|
1549
|
+
:type customer_external_id: str
|
|
1550
|
+
:param billing_account_id:
|
|
1551
|
+
:type billing_account_id: str
|
|
1552
|
+
:param invoice:
|
|
1553
|
+
:type invoice: str
|
|
1554
|
+
:param invoice_id:
|
|
1555
|
+
:type invoice_id: str
|
|
1556
|
+
:param payment_intent_id:
|
|
1557
|
+
:type payment_intent_id: str
|
|
1558
|
+
:param payment_id:
|
|
1559
|
+
:type payment_id: str
|
|
1560
|
+
:param created_by_ref:
|
|
1561
|
+
:type created_by_ref: str
|
|
1562
|
+
:param status:
|
|
1563
|
+
:type status: str
|
|
1564
|
+
:param last_attempt_status:
|
|
1565
|
+
:type last_attempt_status: str
|
|
1566
|
+
:param limit:
|
|
1567
|
+
:type limit: str
|
|
1568
|
+
:param offset:
|
|
1569
|
+
:type offset: str
|
|
1570
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1571
|
+
number provided, it will be total request
|
|
1572
|
+
timeout. It can also be a pair (tuple) of
|
|
1573
|
+
(connection, read) timeouts.
|
|
1574
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1575
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1576
|
+
request; this effectively ignores the
|
|
1577
|
+
authentication in the spec for a single request.
|
|
1578
|
+
:type _request_auth: dict, optional
|
|
1579
|
+
:param _content_type: force content-type for the request.
|
|
1580
|
+
:type _content_type: str, Optional
|
|
1581
|
+
:param _headers: set to override the headers for a single
|
|
1582
|
+
request; this effectively ignores the headers
|
|
1583
|
+
in the spec for a single request.
|
|
1584
|
+
:type _headers: dict, optional
|
|
1585
|
+
:param _host_index: set to override the host_index for a single
|
|
1586
|
+
request; this effectively ignores the host_index
|
|
1587
|
+
in the spec for a single request.
|
|
1588
|
+
:type _host_index: int, optional
|
|
1589
|
+
:return: Returns the result object.
|
|
1590
|
+
""" # noqa: E501
|
|
1591
|
+
|
|
1592
|
+
_param = self._list_payment_requests_serialize(
|
|
1593
|
+
environment=environment,
|
|
1594
|
+
merchant_account_id=merchant_account_id,
|
|
1595
|
+
customer=customer,
|
|
1596
|
+
customer_external_id=customer_external_id,
|
|
1597
|
+
billing_account_id=billing_account_id,
|
|
1598
|
+
invoice=invoice,
|
|
1599
|
+
invoice_id=invoice_id,
|
|
1600
|
+
payment_intent_id=payment_intent_id,
|
|
1601
|
+
payment_id=payment_id,
|
|
1602
|
+
created_by_ref=created_by_ref,
|
|
1603
|
+
status=status,
|
|
1604
|
+
last_attempt_status=last_attempt_status,
|
|
1605
|
+
limit=limit,
|
|
1606
|
+
offset=offset,
|
|
1607
|
+
_request_auth=_request_auth,
|
|
1608
|
+
_content_type=_content_type,
|
|
1609
|
+
_headers=_headers,
|
|
1610
|
+
_host_index=_host_index
|
|
1611
|
+
)
|
|
1612
|
+
|
|
1613
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1614
|
+
'200': "ApiWriteEnvelope",
|
|
1615
|
+
'400': "ApiError",
|
|
1616
|
+
'401': "ApiError",
|
|
1617
|
+
'409': "ApiError",
|
|
1618
|
+
'422': "ApiError",
|
|
1619
|
+
'429': "ApiError",
|
|
1620
|
+
}
|
|
1621
|
+
response_data = self.api_client.call_api(
|
|
1622
|
+
*_param,
|
|
1623
|
+
_request_timeout=_request_timeout
|
|
1624
|
+
)
|
|
1625
|
+
response_data.read()
|
|
1626
|
+
return self.api_client.response_deserialize(
|
|
1627
|
+
response_data=response_data,
|
|
1628
|
+
response_types_map=_response_types_map,
|
|
1629
|
+
)
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
@validate_call
|
|
1633
|
+
def list_payment_requests_without_preload_content(
|
|
1634
|
+
self,
|
|
1635
|
+
environment: StrictStr,
|
|
1636
|
+
merchant_account_id: StrictStr,
|
|
1637
|
+
customer: Optional[StrictStr] = None,
|
|
1638
|
+
customer_external_id: Optional[StrictStr] = None,
|
|
1639
|
+
billing_account_id: Optional[StrictStr] = None,
|
|
1640
|
+
invoice: Optional[StrictStr] = None,
|
|
1641
|
+
invoice_id: Optional[StrictStr] = None,
|
|
1642
|
+
payment_intent_id: Optional[StrictStr] = None,
|
|
1643
|
+
payment_id: Optional[StrictStr] = None,
|
|
1644
|
+
created_by_ref: Optional[StrictStr] = None,
|
|
1645
|
+
status: Optional[StrictStr] = None,
|
|
1646
|
+
last_attempt_status: Optional[StrictStr] = None,
|
|
1647
|
+
limit: Optional[StrictStr] = None,
|
|
1648
|
+
offset: Optional[StrictStr] = None,
|
|
1649
|
+
_request_timeout: Union[
|
|
1650
|
+
None,
|
|
1651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1652
|
+
Tuple[
|
|
1653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1654
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1655
|
+
]
|
|
1656
|
+
] = None,
|
|
1657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1658
|
+
_content_type: Optional[StrictStr] = None,
|
|
1659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1661
|
+
) -> RESTResponseType:
|
|
1662
|
+
"""List payment requests by customer, account, request status, or latest attempt status
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
:param environment: (required)
|
|
1666
|
+
:type environment: str
|
|
1667
|
+
:param merchant_account_id: (required)
|
|
1668
|
+
:type merchant_account_id: str
|
|
1669
|
+
:param customer:
|
|
1670
|
+
:type customer: str
|
|
1671
|
+
:param customer_external_id:
|
|
1672
|
+
:type customer_external_id: str
|
|
1673
|
+
:param billing_account_id:
|
|
1674
|
+
:type billing_account_id: str
|
|
1675
|
+
:param invoice:
|
|
1676
|
+
:type invoice: str
|
|
1677
|
+
:param invoice_id:
|
|
1678
|
+
:type invoice_id: str
|
|
1679
|
+
:param payment_intent_id:
|
|
1680
|
+
:type payment_intent_id: str
|
|
1681
|
+
:param payment_id:
|
|
1682
|
+
:type payment_id: str
|
|
1683
|
+
:param created_by_ref:
|
|
1684
|
+
:type created_by_ref: str
|
|
1685
|
+
:param status:
|
|
1686
|
+
:type status: str
|
|
1687
|
+
:param last_attempt_status:
|
|
1688
|
+
:type last_attempt_status: str
|
|
1689
|
+
:param limit:
|
|
1690
|
+
:type limit: str
|
|
1691
|
+
:param offset:
|
|
1692
|
+
:type offset: str
|
|
1693
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1694
|
+
number provided, it will be total request
|
|
1695
|
+
timeout. It can also be a pair (tuple) of
|
|
1696
|
+
(connection, read) timeouts.
|
|
1697
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1698
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1699
|
+
request; this effectively ignores the
|
|
1700
|
+
authentication in the spec for a single request.
|
|
1701
|
+
:type _request_auth: dict, optional
|
|
1702
|
+
:param _content_type: force content-type for the request.
|
|
1703
|
+
:type _content_type: str, Optional
|
|
1704
|
+
:param _headers: set to override the headers for a single
|
|
1705
|
+
request; this effectively ignores the headers
|
|
1706
|
+
in the spec for a single request.
|
|
1707
|
+
:type _headers: dict, optional
|
|
1708
|
+
:param _host_index: set to override the host_index for a single
|
|
1709
|
+
request; this effectively ignores the host_index
|
|
1710
|
+
in the spec for a single request.
|
|
1711
|
+
:type _host_index: int, optional
|
|
1712
|
+
:return: Returns the result object.
|
|
1713
|
+
""" # noqa: E501
|
|
1714
|
+
|
|
1715
|
+
_param = self._list_payment_requests_serialize(
|
|
1716
|
+
environment=environment,
|
|
1717
|
+
merchant_account_id=merchant_account_id,
|
|
1718
|
+
customer=customer,
|
|
1719
|
+
customer_external_id=customer_external_id,
|
|
1720
|
+
billing_account_id=billing_account_id,
|
|
1721
|
+
invoice=invoice,
|
|
1722
|
+
invoice_id=invoice_id,
|
|
1723
|
+
payment_intent_id=payment_intent_id,
|
|
1724
|
+
payment_id=payment_id,
|
|
1725
|
+
created_by_ref=created_by_ref,
|
|
1726
|
+
status=status,
|
|
1727
|
+
last_attempt_status=last_attempt_status,
|
|
1728
|
+
limit=limit,
|
|
1729
|
+
offset=offset,
|
|
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
|
+
return response_data.response
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
def _list_payment_requests_serialize(
|
|
1752
|
+
self,
|
|
1753
|
+
environment,
|
|
1754
|
+
merchant_account_id,
|
|
1755
|
+
customer,
|
|
1756
|
+
customer_external_id,
|
|
1757
|
+
billing_account_id,
|
|
1758
|
+
invoice,
|
|
1759
|
+
invoice_id,
|
|
1760
|
+
payment_intent_id,
|
|
1761
|
+
payment_id,
|
|
1762
|
+
created_by_ref,
|
|
1763
|
+
status,
|
|
1764
|
+
last_attempt_status,
|
|
1765
|
+
limit,
|
|
1766
|
+
offset,
|
|
1767
|
+
_request_auth,
|
|
1768
|
+
_content_type,
|
|
1769
|
+
_headers,
|
|
1770
|
+
_host_index,
|
|
1771
|
+
) -> RequestSerialized:
|
|
1772
|
+
|
|
1773
|
+
_host = None
|
|
1774
|
+
|
|
1775
|
+
_collection_formats: Dict[str, str] = {
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
_path_params: Dict[str, str] = {}
|
|
1779
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1780
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1781
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1782
|
+
_files: Dict[
|
|
1783
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1784
|
+
] = {}
|
|
1785
|
+
_body_params: Optional[bytes] = None
|
|
1786
|
+
|
|
1787
|
+
# process the path parameters
|
|
1788
|
+
# process the query parameters
|
|
1789
|
+
if environment is not None:
|
|
1790
|
+
|
|
1791
|
+
_query_params.append(('environment', environment))
|
|
1792
|
+
|
|
1793
|
+
if merchant_account_id is not None:
|
|
1794
|
+
|
|
1795
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1796
|
+
|
|
1797
|
+
if customer is not None:
|
|
1798
|
+
|
|
1799
|
+
_query_params.append(('customer', customer))
|
|
1800
|
+
|
|
1801
|
+
if customer_external_id is not None:
|
|
1802
|
+
|
|
1803
|
+
_query_params.append(('customerExternalId', customer_external_id))
|
|
1804
|
+
|
|
1805
|
+
if billing_account_id is not None:
|
|
1806
|
+
|
|
1807
|
+
_query_params.append(('billingAccountId', billing_account_id))
|
|
1808
|
+
|
|
1809
|
+
if invoice is not None:
|
|
1810
|
+
|
|
1811
|
+
_query_params.append(('invoice', invoice))
|
|
1812
|
+
|
|
1813
|
+
if invoice_id is not None:
|
|
1814
|
+
|
|
1815
|
+
_query_params.append(('invoiceId', invoice_id))
|
|
1816
|
+
|
|
1817
|
+
if payment_intent_id is not None:
|
|
1818
|
+
|
|
1819
|
+
_query_params.append(('paymentIntentId', payment_intent_id))
|
|
1820
|
+
|
|
1821
|
+
if payment_id is not None:
|
|
1822
|
+
|
|
1823
|
+
_query_params.append(('paymentId', payment_id))
|
|
1824
|
+
|
|
1825
|
+
if created_by_ref is not None:
|
|
1826
|
+
|
|
1827
|
+
_query_params.append(('createdByRef', created_by_ref))
|
|
1828
|
+
|
|
1829
|
+
if status is not None:
|
|
1830
|
+
|
|
1831
|
+
_query_params.append(('status', status))
|
|
1832
|
+
|
|
1833
|
+
if last_attempt_status is not None:
|
|
1834
|
+
|
|
1835
|
+
_query_params.append(('lastAttemptStatus', last_attempt_status))
|
|
1836
|
+
|
|
1837
|
+
if limit is not None:
|
|
1838
|
+
|
|
1839
|
+
_query_params.append(('limit', limit))
|
|
1840
|
+
|
|
1841
|
+
if offset is not None:
|
|
1842
|
+
|
|
1843
|
+
_query_params.append(('offset', offset))
|
|
1844
|
+
|
|
1845
|
+
# process the header parameters
|
|
1846
|
+
# process the form parameters
|
|
1847
|
+
# process the body parameter
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
# set the HTTP header `Accept`
|
|
1851
|
+
if 'Accept' not in _header_params:
|
|
1852
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1853
|
+
[
|
|
1854
|
+
'application/json'
|
|
1855
|
+
]
|
|
1856
|
+
)
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
# authentication setting
|
|
1860
|
+
_auth_settings: List[str] = [
|
|
1861
|
+
'api-key'
|
|
1862
|
+
]
|
|
1863
|
+
|
|
1864
|
+
return self.api_client.param_serialize(
|
|
1865
|
+
method='GET',
|
|
1866
|
+
resource_path='/v1/payment-requests',
|
|
1867
|
+
path_params=_path_params,
|
|
1868
|
+
query_params=_query_params,
|
|
1869
|
+
header_params=_header_params,
|
|
1870
|
+
body=_body_params,
|
|
1871
|
+
post_params=_form_params,
|
|
1872
|
+
files=_files,
|
|
1873
|
+
auth_settings=_auth_settings,
|
|
1874
|
+
collection_formats=_collection_formats,
|
|
1875
|
+
_host=_host,
|
|
1876
|
+
_request_auth=_request_auth
|
|
1877
|
+
)
|