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,1688 @@
|
|
|
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.credit_note_create_request import CreditNoteCreateRequest
|
|
23
|
+
from vortex.models.credit_note_refund_reconcile_request import CreditNoteRefundReconcileRequest
|
|
24
|
+
from vortex.models.credit_note_refund_request import CreditNoteRefundRequest
|
|
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 CreditNotesApi:
|
|
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 create_credit_note(
|
|
46
|
+
self,
|
|
47
|
+
environment: StrictStr,
|
|
48
|
+
merchant_account_id: StrictStr,
|
|
49
|
+
credit_note_create_request: CreditNoteCreateRequest,
|
|
50
|
+
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,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> ApiWriteEnvelope:
|
|
64
|
+
"""Create a credit note with explicit line attribution
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
:param environment: (required)
|
|
68
|
+
:type environment: str
|
|
69
|
+
:param merchant_account_id: (required)
|
|
70
|
+
:type merchant_account_id: str
|
|
71
|
+
:param credit_note_create_request: (required)
|
|
72
|
+
:type credit_note_create_request: CreditNoteCreateRequest
|
|
73
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
74
|
+
:type idempotency_key: str
|
|
75
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
76
|
+
number provided, it will be total request
|
|
77
|
+
timeout. It can also be a pair (tuple) of
|
|
78
|
+
(connection, read) timeouts.
|
|
79
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
80
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
81
|
+
request; this effectively ignores the
|
|
82
|
+
authentication in the spec for a single request.
|
|
83
|
+
:type _request_auth: dict, optional
|
|
84
|
+
:param _content_type: force content-type for the request.
|
|
85
|
+
:type _content_type: str, Optional
|
|
86
|
+
:param _headers: set to override the headers for a single
|
|
87
|
+
request; this effectively ignores the headers
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _headers: dict, optional
|
|
90
|
+
:param _host_index: set to override the host_index for a single
|
|
91
|
+
request; this effectively ignores the host_index
|
|
92
|
+
in the spec for a single request.
|
|
93
|
+
:type _host_index: int, optional
|
|
94
|
+
:return: Returns the result object.
|
|
95
|
+
""" # noqa: E501
|
|
96
|
+
|
|
97
|
+
_param = self._create_credit_note_serialize(
|
|
98
|
+
environment=environment,
|
|
99
|
+
merchant_account_id=merchant_account_id,
|
|
100
|
+
credit_note_create_request=credit_note_create_request,
|
|
101
|
+
idempotency_key=idempotency_key,
|
|
102
|
+
_request_auth=_request_auth,
|
|
103
|
+
_content_type=_content_type,
|
|
104
|
+
_headers=_headers,
|
|
105
|
+
_host_index=_host_index
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
109
|
+
'200': "ApiWriteEnvelope",
|
|
110
|
+
'400': "ApiError",
|
|
111
|
+
'401': "ApiError",
|
|
112
|
+
'409': "ApiError",
|
|
113
|
+
'422': "ApiError",
|
|
114
|
+
'429': "ApiError",
|
|
115
|
+
}
|
|
116
|
+
response_data = self.api_client.call_api(
|
|
117
|
+
*_param,
|
|
118
|
+
_request_timeout=_request_timeout
|
|
119
|
+
)
|
|
120
|
+
response_data.read()
|
|
121
|
+
return self.api_client.response_deserialize(
|
|
122
|
+
response_data=response_data,
|
|
123
|
+
response_types_map=_response_types_map,
|
|
124
|
+
).data
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@validate_call
|
|
128
|
+
def create_credit_note_with_http_info(
|
|
129
|
+
self,
|
|
130
|
+
environment: StrictStr,
|
|
131
|
+
merchant_account_id: StrictStr,
|
|
132
|
+
credit_note_create_request: CreditNoteCreateRequest,
|
|
133
|
+
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,
|
|
134
|
+
_request_timeout: Union[
|
|
135
|
+
None,
|
|
136
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
137
|
+
Tuple[
|
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
140
|
+
]
|
|
141
|
+
] = None,
|
|
142
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
143
|
+
_content_type: Optional[StrictStr] = None,
|
|
144
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
145
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
146
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
147
|
+
"""Create a credit note with explicit line attribution
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
:param environment: (required)
|
|
151
|
+
:type environment: str
|
|
152
|
+
:param merchant_account_id: (required)
|
|
153
|
+
:type merchant_account_id: str
|
|
154
|
+
:param credit_note_create_request: (required)
|
|
155
|
+
:type credit_note_create_request: CreditNoteCreateRequest
|
|
156
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
157
|
+
:type idempotency_key: str
|
|
158
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
159
|
+
number provided, it will be total request
|
|
160
|
+
timeout. It can also be a pair (tuple) of
|
|
161
|
+
(connection, read) timeouts.
|
|
162
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
163
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
164
|
+
request; this effectively ignores the
|
|
165
|
+
authentication in the spec for a single request.
|
|
166
|
+
:type _request_auth: dict, optional
|
|
167
|
+
:param _content_type: force content-type for the request.
|
|
168
|
+
:type _content_type: str, Optional
|
|
169
|
+
:param _headers: set to override the headers for a single
|
|
170
|
+
request; this effectively ignores the headers
|
|
171
|
+
in the spec for a single request.
|
|
172
|
+
:type _headers: dict, optional
|
|
173
|
+
:param _host_index: set to override the host_index for a single
|
|
174
|
+
request; this effectively ignores the host_index
|
|
175
|
+
in the spec for a single request.
|
|
176
|
+
:type _host_index: int, optional
|
|
177
|
+
:return: Returns the result object.
|
|
178
|
+
""" # noqa: E501
|
|
179
|
+
|
|
180
|
+
_param = self._create_credit_note_serialize(
|
|
181
|
+
environment=environment,
|
|
182
|
+
merchant_account_id=merchant_account_id,
|
|
183
|
+
credit_note_create_request=credit_note_create_request,
|
|
184
|
+
idempotency_key=idempotency_key,
|
|
185
|
+
_request_auth=_request_auth,
|
|
186
|
+
_content_type=_content_type,
|
|
187
|
+
_headers=_headers,
|
|
188
|
+
_host_index=_host_index
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
192
|
+
'200': "ApiWriteEnvelope",
|
|
193
|
+
'400': "ApiError",
|
|
194
|
+
'401': "ApiError",
|
|
195
|
+
'409': "ApiError",
|
|
196
|
+
'422': "ApiError",
|
|
197
|
+
'429': "ApiError",
|
|
198
|
+
}
|
|
199
|
+
response_data = self.api_client.call_api(
|
|
200
|
+
*_param,
|
|
201
|
+
_request_timeout=_request_timeout
|
|
202
|
+
)
|
|
203
|
+
response_data.read()
|
|
204
|
+
return self.api_client.response_deserialize(
|
|
205
|
+
response_data=response_data,
|
|
206
|
+
response_types_map=_response_types_map,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
@validate_call
|
|
211
|
+
def create_credit_note_without_preload_content(
|
|
212
|
+
self,
|
|
213
|
+
environment: StrictStr,
|
|
214
|
+
merchant_account_id: StrictStr,
|
|
215
|
+
credit_note_create_request: CreditNoteCreateRequest,
|
|
216
|
+
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,
|
|
217
|
+
_request_timeout: Union[
|
|
218
|
+
None,
|
|
219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
220
|
+
Tuple[
|
|
221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
222
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
223
|
+
]
|
|
224
|
+
] = None,
|
|
225
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
226
|
+
_content_type: Optional[StrictStr] = None,
|
|
227
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
228
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
229
|
+
) -> RESTResponseType:
|
|
230
|
+
"""Create a credit note with explicit line attribution
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
:param environment: (required)
|
|
234
|
+
:type environment: str
|
|
235
|
+
:param merchant_account_id: (required)
|
|
236
|
+
:type merchant_account_id: str
|
|
237
|
+
:param credit_note_create_request: (required)
|
|
238
|
+
:type credit_note_create_request: CreditNoteCreateRequest
|
|
239
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
240
|
+
:type idempotency_key: str
|
|
241
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
242
|
+
number provided, it will be total request
|
|
243
|
+
timeout. It can also be a pair (tuple) of
|
|
244
|
+
(connection, read) timeouts.
|
|
245
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
246
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
247
|
+
request; this effectively ignores the
|
|
248
|
+
authentication in the spec for a single request.
|
|
249
|
+
:type _request_auth: dict, optional
|
|
250
|
+
:param _content_type: force content-type for the request.
|
|
251
|
+
:type _content_type: str, Optional
|
|
252
|
+
:param _headers: set to override the headers for a single
|
|
253
|
+
request; this effectively ignores the headers
|
|
254
|
+
in the spec for a single request.
|
|
255
|
+
:type _headers: dict, optional
|
|
256
|
+
:param _host_index: set to override the host_index for a single
|
|
257
|
+
request; this effectively ignores the host_index
|
|
258
|
+
in the spec for a single request.
|
|
259
|
+
:type _host_index: int, optional
|
|
260
|
+
:return: Returns the result object.
|
|
261
|
+
""" # noqa: E501
|
|
262
|
+
|
|
263
|
+
_param = self._create_credit_note_serialize(
|
|
264
|
+
environment=environment,
|
|
265
|
+
merchant_account_id=merchant_account_id,
|
|
266
|
+
credit_note_create_request=credit_note_create_request,
|
|
267
|
+
idempotency_key=idempotency_key,
|
|
268
|
+
_request_auth=_request_auth,
|
|
269
|
+
_content_type=_content_type,
|
|
270
|
+
_headers=_headers,
|
|
271
|
+
_host_index=_host_index
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
275
|
+
'200': "ApiWriteEnvelope",
|
|
276
|
+
'400': "ApiError",
|
|
277
|
+
'401': "ApiError",
|
|
278
|
+
'409': "ApiError",
|
|
279
|
+
'422': "ApiError",
|
|
280
|
+
'429': "ApiError",
|
|
281
|
+
}
|
|
282
|
+
response_data = self.api_client.call_api(
|
|
283
|
+
*_param,
|
|
284
|
+
_request_timeout=_request_timeout
|
|
285
|
+
)
|
|
286
|
+
return response_data.response
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def _create_credit_note_serialize(
|
|
290
|
+
self,
|
|
291
|
+
environment,
|
|
292
|
+
merchant_account_id,
|
|
293
|
+
credit_note_create_request,
|
|
294
|
+
idempotency_key,
|
|
295
|
+
_request_auth,
|
|
296
|
+
_content_type,
|
|
297
|
+
_headers,
|
|
298
|
+
_host_index,
|
|
299
|
+
) -> RequestSerialized:
|
|
300
|
+
|
|
301
|
+
_host = None
|
|
302
|
+
|
|
303
|
+
_collection_formats: Dict[str, str] = {
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
_path_params: Dict[str, str] = {}
|
|
307
|
+
_query_params: List[Tuple[str, str]] = []
|
|
308
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
309
|
+
_form_params: List[Tuple[str, str]] = []
|
|
310
|
+
_files: Dict[
|
|
311
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
312
|
+
] = {}
|
|
313
|
+
_body_params: Optional[bytes] = None
|
|
314
|
+
|
|
315
|
+
# process the path parameters
|
|
316
|
+
# process the query parameters
|
|
317
|
+
if environment is not None:
|
|
318
|
+
|
|
319
|
+
_query_params.append(('environment', environment))
|
|
320
|
+
|
|
321
|
+
if merchant_account_id is not None:
|
|
322
|
+
|
|
323
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
324
|
+
|
|
325
|
+
# process the header parameters
|
|
326
|
+
if idempotency_key is not None:
|
|
327
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
328
|
+
# process the form parameters
|
|
329
|
+
# process the body parameter
|
|
330
|
+
if credit_note_create_request is not None:
|
|
331
|
+
_body_params = credit_note_create_request
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
# set the HTTP header `Accept`
|
|
335
|
+
if 'Accept' not in _header_params:
|
|
336
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
337
|
+
[
|
|
338
|
+
'application/json'
|
|
339
|
+
]
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
# set the HTTP header `Content-Type`
|
|
343
|
+
if _content_type:
|
|
344
|
+
_header_params['Content-Type'] = _content_type
|
|
345
|
+
else:
|
|
346
|
+
_default_content_type = (
|
|
347
|
+
self.api_client.select_header_content_type(
|
|
348
|
+
[
|
|
349
|
+
'application/json'
|
|
350
|
+
]
|
|
351
|
+
)
|
|
352
|
+
)
|
|
353
|
+
if _default_content_type is not None:
|
|
354
|
+
_header_params['Content-Type'] = _default_content_type
|
|
355
|
+
|
|
356
|
+
# authentication setting
|
|
357
|
+
_auth_settings: List[str] = [
|
|
358
|
+
'api-key'
|
|
359
|
+
]
|
|
360
|
+
|
|
361
|
+
return self.api_client.param_serialize(
|
|
362
|
+
method='POST',
|
|
363
|
+
resource_path='/v1/credit-notes',
|
|
364
|
+
path_params=_path_params,
|
|
365
|
+
query_params=_query_params,
|
|
366
|
+
header_params=_header_params,
|
|
367
|
+
body=_body_params,
|
|
368
|
+
post_params=_form_params,
|
|
369
|
+
files=_files,
|
|
370
|
+
auth_settings=_auth_settings,
|
|
371
|
+
collection_formats=_collection_formats,
|
|
372
|
+
_host=_host,
|
|
373
|
+
_request_auth=_request_auth
|
|
374
|
+
)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
@validate_call
|
|
380
|
+
def get_credit_note(
|
|
381
|
+
self,
|
|
382
|
+
credit_note_id: StrictStr,
|
|
383
|
+
environment: StrictStr,
|
|
384
|
+
merchant_account_id: StrictStr,
|
|
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
|
+
"""Inspect a credit note and its tax reversal evidence
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
:param credit_note_id: (required)
|
|
402
|
+
:type credit_note_id: str
|
|
403
|
+
:param environment: (required)
|
|
404
|
+
:type environment: str
|
|
405
|
+
:param merchant_account_id: (required)
|
|
406
|
+
:type merchant_account_id: str
|
|
407
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
408
|
+
number provided, it will be total request
|
|
409
|
+
timeout. It can also be a pair (tuple) of
|
|
410
|
+
(connection, read) timeouts.
|
|
411
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
412
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
413
|
+
request; this effectively ignores the
|
|
414
|
+
authentication in the spec for a single request.
|
|
415
|
+
:type _request_auth: dict, optional
|
|
416
|
+
:param _content_type: force content-type for the request.
|
|
417
|
+
:type _content_type: str, Optional
|
|
418
|
+
:param _headers: set to override the headers for a single
|
|
419
|
+
request; this effectively ignores the headers
|
|
420
|
+
in the spec for a single request.
|
|
421
|
+
:type _headers: dict, optional
|
|
422
|
+
:param _host_index: set to override the host_index for a single
|
|
423
|
+
request; this effectively ignores the host_index
|
|
424
|
+
in the spec for a single request.
|
|
425
|
+
:type _host_index: int, optional
|
|
426
|
+
:return: Returns the result object.
|
|
427
|
+
""" # noqa: E501
|
|
428
|
+
|
|
429
|
+
_param = self._get_credit_note_serialize(
|
|
430
|
+
credit_note_id=credit_note_id,
|
|
431
|
+
environment=environment,
|
|
432
|
+
merchant_account_id=merchant_account_id,
|
|
433
|
+
_request_auth=_request_auth,
|
|
434
|
+
_content_type=_content_type,
|
|
435
|
+
_headers=_headers,
|
|
436
|
+
_host_index=_host_index
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
440
|
+
'200': "ApiWriteEnvelope",
|
|
441
|
+
'400': "ApiError",
|
|
442
|
+
'401': "ApiError",
|
|
443
|
+
'409': "ApiError",
|
|
444
|
+
'422': "ApiError",
|
|
445
|
+
'429': "ApiError",
|
|
446
|
+
}
|
|
447
|
+
response_data = self.api_client.call_api(
|
|
448
|
+
*_param,
|
|
449
|
+
_request_timeout=_request_timeout
|
|
450
|
+
)
|
|
451
|
+
response_data.read()
|
|
452
|
+
return self.api_client.response_deserialize(
|
|
453
|
+
response_data=response_data,
|
|
454
|
+
response_types_map=_response_types_map,
|
|
455
|
+
).data
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
@validate_call
|
|
459
|
+
def get_credit_note_with_http_info(
|
|
460
|
+
self,
|
|
461
|
+
credit_note_id: StrictStr,
|
|
462
|
+
environment: StrictStr,
|
|
463
|
+
merchant_account_id: StrictStr,
|
|
464
|
+
_request_timeout: Union[
|
|
465
|
+
None,
|
|
466
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
467
|
+
Tuple[
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
469
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
470
|
+
]
|
|
471
|
+
] = None,
|
|
472
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
473
|
+
_content_type: Optional[StrictStr] = None,
|
|
474
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
475
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
476
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
477
|
+
"""Inspect a credit note and its tax reversal evidence
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
:param credit_note_id: (required)
|
|
481
|
+
:type credit_note_id: str
|
|
482
|
+
:param environment: (required)
|
|
483
|
+
:type environment: str
|
|
484
|
+
:param merchant_account_id: (required)
|
|
485
|
+
:type merchant_account_id: str
|
|
486
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
487
|
+
number provided, it will be total request
|
|
488
|
+
timeout. It can also be a pair (tuple) of
|
|
489
|
+
(connection, read) timeouts.
|
|
490
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
491
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
492
|
+
request; this effectively ignores the
|
|
493
|
+
authentication in the spec for a single request.
|
|
494
|
+
:type _request_auth: dict, optional
|
|
495
|
+
:param _content_type: force content-type for the request.
|
|
496
|
+
:type _content_type: str, Optional
|
|
497
|
+
:param _headers: set to override the headers for a single
|
|
498
|
+
request; this effectively ignores the headers
|
|
499
|
+
in the spec for a single request.
|
|
500
|
+
:type _headers: dict, optional
|
|
501
|
+
:param _host_index: set to override the host_index for a single
|
|
502
|
+
request; this effectively ignores the host_index
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _host_index: int, optional
|
|
505
|
+
:return: Returns the result object.
|
|
506
|
+
""" # noqa: E501
|
|
507
|
+
|
|
508
|
+
_param = self._get_credit_note_serialize(
|
|
509
|
+
credit_note_id=credit_note_id,
|
|
510
|
+
environment=environment,
|
|
511
|
+
merchant_account_id=merchant_account_id,
|
|
512
|
+
_request_auth=_request_auth,
|
|
513
|
+
_content_type=_content_type,
|
|
514
|
+
_headers=_headers,
|
|
515
|
+
_host_index=_host_index
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
519
|
+
'200': "ApiWriteEnvelope",
|
|
520
|
+
'400': "ApiError",
|
|
521
|
+
'401': "ApiError",
|
|
522
|
+
'409': "ApiError",
|
|
523
|
+
'422': "ApiError",
|
|
524
|
+
'429': "ApiError",
|
|
525
|
+
}
|
|
526
|
+
response_data = self.api_client.call_api(
|
|
527
|
+
*_param,
|
|
528
|
+
_request_timeout=_request_timeout
|
|
529
|
+
)
|
|
530
|
+
response_data.read()
|
|
531
|
+
return self.api_client.response_deserialize(
|
|
532
|
+
response_data=response_data,
|
|
533
|
+
response_types_map=_response_types_map,
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
@validate_call
|
|
538
|
+
def get_credit_note_without_preload_content(
|
|
539
|
+
self,
|
|
540
|
+
credit_note_id: StrictStr,
|
|
541
|
+
environment: StrictStr,
|
|
542
|
+
merchant_account_id: StrictStr,
|
|
543
|
+
_request_timeout: Union[
|
|
544
|
+
None,
|
|
545
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
546
|
+
Tuple[
|
|
547
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
548
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
549
|
+
]
|
|
550
|
+
] = None,
|
|
551
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
552
|
+
_content_type: Optional[StrictStr] = None,
|
|
553
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
554
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
555
|
+
) -> RESTResponseType:
|
|
556
|
+
"""Inspect a credit note and its tax reversal evidence
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
:param credit_note_id: (required)
|
|
560
|
+
:type credit_note_id: str
|
|
561
|
+
:param environment: (required)
|
|
562
|
+
:type environment: str
|
|
563
|
+
:param merchant_account_id: (required)
|
|
564
|
+
:type merchant_account_id: str
|
|
565
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
566
|
+
number provided, it will be total request
|
|
567
|
+
timeout. It can also be a pair (tuple) of
|
|
568
|
+
(connection, read) timeouts.
|
|
569
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
570
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
571
|
+
request; this effectively ignores the
|
|
572
|
+
authentication in the spec for a single request.
|
|
573
|
+
:type _request_auth: dict, optional
|
|
574
|
+
:param _content_type: force content-type for the request.
|
|
575
|
+
:type _content_type: str, Optional
|
|
576
|
+
:param _headers: set to override the headers for a single
|
|
577
|
+
request; this effectively ignores the headers
|
|
578
|
+
in the spec for a single request.
|
|
579
|
+
:type _headers: dict, optional
|
|
580
|
+
:param _host_index: set to override the host_index for a single
|
|
581
|
+
request; this effectively ignores the host_index
|
|
582
|
+
in the spec for a single request.
|
|
583
|
+
:type _host_index: int, optional
|
|
584
|
+
:return: Returns the result object.
|
|
585
|
+
""" # noqa: E501
|
|
586
|
+
|
|
587
|
+
_param = self._get_credit_note_serialize(
|
|
588
|
+
credit_note_id=credit_note_id,
|
|
589
|
+
environment=environment,
|
|
590
|
+
merchant_account_id=merchant_account_id,
|
|
591
|
+
_request_auth=_request_auth,
|
|
592
|
+
_content_type=_content_type,
|
|
593
|
+
_headers=_headers,
|
|
594
|
+
_host_index=_host_index
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
598
|
+
'200': "ApiWriteEnvelope",
|
|
599
|
+
'400': "ApiError",
|
|
600
|
+
'401': "ApiError",
|
|
601
|
+
'409': "ApiError",
|
|
602
|
+
'422': "ApiError",
|
|
603
|
+
'429': "ApiError",
|
|
604
|
+
}
|
|
605
|
+
response_data = self.api_client.call_api(
|
|
606
|
+
*_param,
|
|
607
|
+
_request_timeout=_request_timeout
|
|
608
|
+
)
|
|
609
|
+
return response_data.response
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
def _get_credit_note_serialize(
|
|
613
|
+
self,
|
|
614
|
+
credit_note_id,
|
|
615
|
+
environment,
|
|
616
|
+
merchant_account_id,
|
|
617
|
+
_request_auth,
|
|
618
|
+
_content_type,
|
|
619
|
+
_headers,
|
|
620
|
+
_host_index,
|
|
621
|
+
) -> RequestSerialized:
|
|
622
|
+
|
|
623
|
+
_host = None
|
|
624
|
+
|
|
625
|
+
_collection_formats: Dict[str, str] = {
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
_path_params: Dict[str, str] = {}
|
|
629
|
+
_query_params: List[Tuple[str, str]] = []
|
|
630
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
631
|
+
_form_params: List[Tuple[str, str]] = []
|
|
632
|
+
_files: Dict[
|
|
633
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
634
|
+
] = {}
|
|
635
|
+
_body_params: Optional[bytes] = None
|
|
636
|
+
|
|
637
|
+
# process the path parameters
|
|
638
|
+
if credit_note_id is not None:
|
|
639
|
+
_path_params['creditNoteId'] = credit_note_id
|
|
640
|
+
# process the query parameters
|
|
641
|
+
if environment is not None:
|
|
642
|
+
|
|
643
|
+
_query_params.append(('environment', environment))
|
|
644
|
+
|
|
645
|
+
if merchant_account_id is not None:
|
|
646
|
+
|
|
647
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
648
|
+
|
|
649
|
+
# process the header parameters
|
|
650
|
+
# process the form parameters
|
|
651
|
+
# process the body parameter
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
# set the HTTP header `Accept`
|
|
655
|
+
if 'Accept' not in _header_params:
|
|
656
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
657
|
+
[
|
|
658
|
+
'application/json'
|
|
659
|
+
]
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
# authentication setting
|
|
664
|
+
_auth_settings: List[str] = [
|
|
665
|
+
'api-key'
|
|
666
|
+
]
|
|
667
|
+
|
|
668
|
+
return self.api_client.param_serialize(
|
|
669
|
+
method='GET',
|
|
670
|
+
resource_path='/v1/credit-notes/{creditNoteId}',
|
|
671
|
+
path_params=_path_params,
|
|
672
|
+
query_params=_query_params,
|
|
673
|
+
header_params=_header_params,
|
|
674
|
+
body=_body_params,
|
|
675
|
+
post_params=_form_params,
|
|
676
|
+
files=_files,
|
|
677
|
+
auth_settings=_auth_settings,
|
|
678
|
+
collection_formats=_collection_formats,
|
|
679
|
+
_host=_host,
|
|
680
|
+
_request_auth=_request_auth
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
@validate_call
|
|
687
|
+
def get_credit_note_refund_lineage(
|
|
688
|
+
self,
|
|
689
|
+
credit_note_id: StrictStr,
|
|
690
|
+
environment: StrictStr,
|
|
691
|
+
merchant_account_id: StrictStr,
|
|
692
|
+
_request_timeout: Union[
|
|
693
|
+
None,
|
|
694
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
695
|
+
Tuple[
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
697
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
698
|
+
]
|
|
699
|
+
] = None,
|
|
700
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
701
|
+
_content_type: Optional[StrictStr] = None,
|
|
702
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
703
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
704
|
+
) -> ApiWriteEnvelope:
|
|
705
|
+
"""Inspect billing and payments refund lineage for a credit note
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
:param credit_note_id: (required)
|
|
709
|
+
:type credit_note_id: str
|
|
710
|
+
:param environment: (required)
|
|
711
|
+
:type environment: str
|
|
712
|
+
:param merchant_account_id: (required)
|
|
713
|
+
:type merchant_account_id: str
|
|
714
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
715
|
+
number provided, it will be total request
|
|
716
|
+
timeout. It can also be a pair (tuple) of
|
|
717
|
+
(connection, read) timeouts.
|
|
718
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
719
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
720
|
+
request; this effectively ignores the
|
|
721
|
+
authentication in the spec for a single request.
|
|
722
|
+
:type _request_auth: dict, optional
|
|
723
|
+
:param _content_type: force content-type for the request.
|
|
724
|
+
:type _content_type: str, Optional
|
|
725
|
+
:param _headers: set to override the headers for a single
|
|
726
|
+
request; this effectively ignores the headers
|
|
727
|
+
in the spec for a single request.
|
|
728
|
+
:type _headers: dict, optional
|
|
729
|
+
:param _host_index: set to override the host_index for a single
|
|
730
|
+
request; this effectively ignores the host_index
|
|
731
|
+
in the spec for a single request.
|
|
732
|
+
:type _host_index: int, optional
|
|
733
|
+
:return: Returns the result object.
|
|
734
|
+
""" # noqa: E501
|
|
735
|
+
|
|
736
|
+
_param = self._get_credit_note_refund_lineage_serialize(
|
|
737
|
+
credit_note_id=credit_note_id,
|
|
738
|
+
environment=environment,
|
|
739
|
+
merchant_account_id=merchant_account_id,
|
|
740
|
+
_request_auth=_request_auth,
|
|
741
|
+
_content_type=_content_type,
|
|
742
|
+
_headers=_headers,
|
|
743
|
+
_host_index=_host_index
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
747
|
+
'200': "ApiWriteEnvelope",
|
|
748
|
+
'400': "ApiError",
|
|
749
|
+
'401': "ApiError",
|
|
750
|
+
'409': "ApiError",
|
|
751
|
+
'422': "ApiError",
|
|
752
|
+
'429': "ApiError",
|
|
753
|
+
}
|
|
754
|
+
response_data = self.api_client.call_api(
|
|
755
|
+
*_param,
|
|
756
|
+
_request_timeout=_request_timeout
|
|
757
|
+
)
|
|
758
|
+
response_data.read()
|
|
759
|
+
return self.api_client.response_deserialize(
|
|
760
|
+
response_data=response_data,
|
|
761
|
+
response_types_map=_response_types_map,
|
|
762
|
+
).data
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
@validate_call
|
|
766
|
+
def get_credit_note_refund_lineage_with_http_info(
|
|
767
|
+
self,
|
|
768
|
+
credit_note_id: StrictStr,
|
|
769
|
+
environment: StrictStr,
|
|
770
|
+
merchant_account_id: StrictStr,
|
|
771
|
+
_request_timeout: Union[
|
|
772
|
+
None,
|
|
773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
774
|
+
Tuple[
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
776
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
777
|
+
]
|
|
778
|
+
] = None,
|
|
779
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
780
|
+
_content_type: Optional[StrictStr] = None,
|
|
781
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
782
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
783
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
784
|
+
"""Inspect billing and payments refund lineage for a credit note
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
:param credit_note_id: (required)
|
|
788
|
+
:type credit_note_id: str
|
|
789
|
+
:param environment: (required)
|
|
790
|
+
:type environment: str
|
|
791
|
+
:param merchant_account_id: (required)
|
|
792
|
+
:type merchant_account_id: str
|
|
793
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
794
|
+
number provided, it will be total request
|
|
795
|
+
timeout. It can also be a pair (tuple) of
|
|
796
|
+
(connection, read) timeouts.
|
|
797
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
798
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
799
|
+
request; this effectively ignores the
|
|
800
|
+
authentication in the spec for a single request.
|
|
801
|
+
:type _request_auth: dict, optional
|
|
802
|
+
:param _content_type: force content-type for the request.
|
|
803
|
+
:type _content_type: str, Optional
|
|
804
|
+
:param _headers: set to override the headers for a single
|
|
805
|
+
request; this effectively ignores the headers
|
|
806
|
+
in the spec for a single request.
|
|
807
|
+
:type _headers: dict, optional
|
|
808
|
+
:param _host_index: set to override the host_index for a single
|
|
809
|
+
request; this effectively ignores the host_index
|
|
810
|
+
in the spec for a single request.
|
|
811
|
+
:type _host_index: int, optional
|
|
812
|
+
:return: Returns the result object.
|
|
813
|
+
""" # noqa: E501
|
|
814
|
+
|
|
815
|
+
_param = self._get_credit_note_refund_lineage_serialize(
|
|
816
|
+
credit_note_id=credit_note_id,
|
|
817
|
+
environment=environment,
|
|
818
|
+
merchant_account_id=merchant_account_id,
|
|
819
|
+
_request_auth=_request_auth,
|
|
820
|
+
_content_type=_content_type,
|
|
821
|
+
_headers=_headers,
|
|
822
|
+
_host_index=_host_index
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
826
|
+
'200': "ApiWriteEnvelope",
|
|
827
|
+
'400': "ApiError",
|
|
828
|
+
'401': "ApiError",
|
|
829
|
+
'409': "ApiError",
|
|
830
|
+
'422': "ApiError",
|
|
831
|
+
'429': "ApiError",
|
|
832
|
+
}
|
|
833
|
+
response_data = self.api_client.call_api(
|
|
834
|
+
*_param,
|
|
835
|
+
_request_timeout=_request_timeout
|
|
836
|
+
)
|
|
837
|
+
response_data.read()
|
|
838
|
+
return self.api_client.response_deserialize(
|
|
839
|
+
response_data=response_data,
|
|
840
|
+
response_types_map=_response_types_map,
|
|
841
|
+
)
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
@validate_call
|
|
845
|
+
def get_credit_note_refund_lineage_without_preload_content(
|
|
846
|
+
self,
|
|
847
|
+
credit_note_id: StrictStr,
|
|
848
|
+
environment: StrictStr,
|
|
849
|
+
merchant_account_id: StrictStr,
|
|
850
|
+
_request_timeout: Union[
|
|
851
|
+
None,
|
|
852
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
853
|
+
Tuple[
|
|
854
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
855
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
856
|
+
]
|
|
857
|
+
] = None,
|
|
858
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
859
|
+
_content_type: Optional[StrictStr] = None,
|
|
860
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
861
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
862
|
+
) -> RESTResponseType:
|
|
863
|
+
"""Inspect billing and payments refund lineage for a credit note
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
:param credit_note_id: (required)
|
|
867
|
+
:type credit_note_id: str
|
|
868
|
+
:param environment: (required)
|
|
869
|
+
:type environment: str
|
|
870
|
+
:param merchant_account_id: (required)
|
|
871
|
+
:type merchant_account_id: str
|
|
872
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
873
|
+
number provided, it will be total request
|
|
874
|
+
timeout. It can also be a pair (tuple) of
|
|
875
|
+
(connection, read) timeouts.
|
|
876
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
877
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
878
|
+
request; this effectively ignores the
|
|
879
|
+
authentication in the spec for a single request.
|
|
880
|
+
:type _request_auth: dict, optional
|
|
881
|
+
:param _content_type: force content-type for the request.
|
|
882
|
+
:type _content_type: str, Optional
|
|
883
|
+
:param _headers: set to override the headers for a single
|
|
884
|
+
request; this effectively ignores the headers
|
|
885
|
+
in the spec for a single request.
|
|
886
|
+
:type _headers: dict, optional
|
|
887
|
+
:param _host_index: set to override the host_index for a single
|
|
888
|
+
request; this effectively ignores the host_index
|
|
889
|
+
in the spec for a single request.
|
|
890
|
+
:type _host_index: int, optional
|
|
891
|
+
:return: Returns the result object.
|
|
892
|
+
""" # noqa: E501
|
|
893
|
+
|
|
894
|
+
_param = self._get_credit_note_refund_lineage_serialize(
|
|
895
|
+
credit_note_id=credit_note_id,
|
|
896
|
+
environment=environment,
|
|
897
|
+
merchant_account_id=merchant_account_id,
|
|
898
|
+
_request_auth=_request_auth,
|
|
899
|
+
_content_type=_content_type,
|
|
900
|
+
_headers=_headers,
|
|
901
|
+
_host_index=_host_index
|
|
902
|
+
)
|
|
903
|
+
|
|
904
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
905
|
+
'200': "ApiWriteEnvelope",
|
|
906
|
+
'400': "ApiError",
|
|
907
|
+
'401': "ApiError",
|
|
908
|
+
'409': "ApiError",
|
|
909
|
+
'422': "ApiError",
|
|
910
|
+
'429': "ApiError",
|
|
911
|
+
}
|
|
912
|
+
response_data = self.api_client.call_api(
|
|
913
|
+
*_param,
|
|
914
|
+
_request_timeout=_request_timeout
|
|
915
|
+
)
|
|
916
|
+
return response_data.response
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
def _get_credit_note_refund_lineage_serialize(
|
|
920
|
+
self,
|
|
921
|
+
credit_note_id,
|
|
922
|
+
environment,
|
|
923
|
+
merchant_account_id,
|
|
924
|
+
_request_auth,
|
|
925
|
+
_content_type,
|
|
926
|
+
_headers,
|
|
927
|
+
_host_index,
|
|
928
|
+
) -> RequestSerialized:
|
|
929
|
+
|
|
930
|
+
_host = None
|
|
931
|
+
|
|
932
|
+
_collection_formats: Dict[str, str] = {
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
_path_params: Dict[str, str] = {}
|
|
936
|
+
_query_params: List[Tuple[str, str]] = []
|
|
937
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
938
|
+
_form_params: List[Tuple[str, str]] = []
|
|
939
|
+
_files: Dict[
|
|
940
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
941
|
+
] = {}
|
|
942
|
+
_body_params: Optional[bytes] = None
|
|
943
|
+
|
|
944
|
+
# process the path parameters
|
|
945
|
+
if credit_note_id is not None:
|
|
946
|
+
_path_params['creditNoteId'] = credit_note_id
|
|
947
|
+
# process the query parameters
|
|
948
|
+
if environment is not None:
|
|
949
|
+
|
|
950
|
+
_query_params.append(('environment', environment))
|
|
951
|
+
|
|
952
|
+
if merchant_account_id is not None:
|
|
953
|
+
|
|
954
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
955
|
+
|
|
956
|
+
# process the header parameters
|
|
957
|
+
# process the form parameters
|
|
958
|
+
# process the body parameter
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
# set the HTTP header `Accept`
|
|
962
|
+
if 'Accept' not in _header_params:
|
|
963
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
964
|
+
[
|
|
965
|
+
'application/json'
|
|
966
|
+
]
|
|
967
|
+
)
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
# authentication setting
|
|
971
|
+
_auth_settings: List[str] = [
|
|
972
|
+
'api-key'
|
|
973
|
+
]
|
|
974
|
+
|
|
975
|
+
return self.api_client.param_serialize(
|
|
976
|
+
method='GET',
|
|
977
|
+
resource_path='/v1/credit-notes/{creditNoteId}/refund-lineage',
|
|
978
|
+
path_params=_path_params,
|
|
979
|
+
query_params=_query_params,
|
|
980
|
+
header_params=_header_params,
|
|
981
|
+
body=_body_params,
|
|
982
|
+
post_params=_form_params,
|
|
983
|
+
files=_files,
|
|
984
|
+
auth_settings=_auth_settings,
|
|
985
|
+
collection_formats=_collection_formats,
|
|
986
|
+
_host=_host,
|
|
987
|
+
_request_auth=_request_auth
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
@validate_call
|
|
994
|
+
def reconcile_credit_note_refund(
|
|
995
|
+
self,
|
|
996
|
+
credit_note_id: StrictStr,
|
|
997
|
+
environment: StrictStr,
|
|
998
|
+
merchant_account_id: StrictStr,
|
|
999
|
+
credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest,
|
|
1000
|
+
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,
|
|
1001
|
+
_request_timeout: Union[
|
|
1002
|
+
None,
|
|
1003
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1004
|
+
Tuple[
|
|
1005
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1006
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1007
|
+
]
|
|
1008
|
+
] = None,
|
|
1009
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1010
|
+
_content_type: Optional[StrictStr] = None,
|
|
1011
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1012
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1013
|
+
) -> ApiWriteEnvelope:
|
|
1014
|
+
"""Reconcile credit-note refund linkage after drift or provider replay
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
:param credit_note_id: (required)
|
|
1018
|
+
:type credit_note_id: str
|
|
1019
|
+
:param environment: (required)
|
|
1020
|
+
:type environment: str
|
|
1021
|
+
:param merchant_account_id: (required)
|
|
1022
|
+
:type merchant_account_id: str
|
|
1023
|
+
:param credit_note_refund_reconcile_request: (required)
|
|
1024
|
+
:type credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest
|
|
1025
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1026
|
+
:type idempotency_key: str
|
|
1027
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1028
|
+
number provided, it will be total request
|
|
1029
|
+
timeout. It can also be a pair (tuple) of
|
|
1030
|
+
(connection, read) timeouts.
|
|
1031
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1032
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1033
|
+
request; this effectively ignores the
|
|
1034
|
+
authentication in the spec for a single request.
|
|
1035
|
+
:type _request_auth: dict, optional
|
|
1036
|
+
:param _content_type: force content-type for the request.
|
|
1037
|
+
:type _content_type: str, Optional
|
|
1038
|
+
:param _headers: set to override the headers for a single
|
|
1039
|
+
request; this effectively ignores the headers
|
|
1040
|
+
in the spec for a single request.
|
|
1041
|
+
:type _headers: dict, optional
|
|
1042
|
+
:param _host_index: set to override the host_index for a single
|
|
1043
|
+
request; this effectively ignores the host_index
|
|
1044
|
+
in the spec for a single request.
|
|
1045
|
+
:type _host_index: int, optional
|
|
1046
|
+
:return: Returns the result object.
|
|
1047
|
+
""" # noqa: E501
|
|
1048
|
+
|
|
1049
|
+
_param = self._reconcile_credit_note_refund_serialize(
|
|
1050
|
+
credit_note_id=credit_note_id,
|
|
1051
|
+
environment=environment,
|
|
1052
|
+
merchant_account_id=merchant_account_id,
|
|
1053
|
+
credit_note_refund_reconcile_request=credit_note_refund_reconcile_request,
|
|
1054
|
+
idempotency_key=idempotency_key,
|
|
1055
|
+
_request_auth=_request_auth,
|
|
1056
|
+
_content_type=_content_type,
|
|
1057
|
+
_headers=_headers,
|
|
1058
|
+
_host_index=_host_index
|
|
1059
|
+
)
|
|
1060
|
+
|
|
1061
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1062
|
+
'200': "ApiWriteEnvelope",
|
|
1063
|
+
'400': "ApiError",
|
|
1064
|
+
'401': "ApiError",
|
|
1065
|
+
'409': "ApiError",
|
|
1066
|
+
'422': "ApiError",
|
|
1067
|
+
'429': "ApiError",
|
|
1068
|
+
}
|
|
1069
|
+
response_data = self.api_client.call_api(
|
|
1070
|
+
*_param,
|
|
1071
|
+
_request_timeout=_request_timeout
|
|
1072
|
+
)
|
|
1073
|
+
response_data.read()
|
|
1074
|
+
return self.api_client.response_deserialize(
|
|
1075
|
+
response_data=response_data,
|
|
1076
|
+
response_types_map=_response_types_map,
|
|
1077
|
+
).data
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
@validate_call
|
|
1081
|
+
def reconcile_credit_note_refund_with_http_info(
|
|
1082
|
+
self,
|
|
1083
|
+
credit_note_id: StrictStr,
|
|
1084
|
+
environment: StrictStr,
|
|
1085
|
+
merchant_account_id: StrictStr,
|
|
1086
|
+
credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest,
|
|
1087
|
+
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,
|
|
1088
|
+
_request_timeout: Union[
|
|
1089
|
+
None,
|
|
1090
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1091
|
+
Tuple[
|
|
1092
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1093
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1094
|
+
]
|
|
1095
|
+
] = None,
|
|
1096
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1097
|
+
_content_type: Optional[StrictStr] = None,
|
|
1098
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1099
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1100
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1101
|
+
"""Reconcile credit-note refund linkage after drift or provider replay
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
:param credit_note_id: (required)
|
|
1105
|
+
:type credit_note_id: str
|
|
1106
|
+
:param environment: (required)
|
|
1107
|
+
:type environment: str
|
|
1108
|
+
:param merchant_account_id: (required)
|
|
1109
|
+
:type merchant_account_id: str
|
|
1110
|
+
:param credit_note_refund_reconcile_request: (required)
|
|
1111
|
+
:type credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest
|
|
1112
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1113
|
+
:type idempotency_key: str
|
|
1114
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1115
|
+
number provided, it will be total request
|
|
1116
|
+
timeout. It can also be a pair (tuple) of
|
|
1117
|
+
(connection, read) timeouts.
|
|
1118
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1119
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1120
|
+
request; this effectively ignores the
|
|
1121
|
+
authentication in the spec for a single request.
|
|
1122
|
+
:type _request_auth: dict, optional
|
|
1123
|
+
:param _content_type: force content-type for the request.
|
|
1124
|
+
:type _content_type: str, Optional
|
|
1125
|
+
:param _headers: set to override the headers for a single
|
|
1126
|
+
request; this effectively ignores the headers
|
|
1127
|
+
in the spec for a single request.
|
|
1128
|
+
:type _headers: dict, optional
|
|
1129
|
+
:param _host_index: set to override the host_index for a single
|
|
1130
|
+
request; this effectively ignores the host_index
|
|
1131
|
+
in the spec for a single request.
|
|
1132
|
+
:type _host_index: int, optional
|
|
1133
|
+
:return: Returns the result object.
|
|
1134
|
+
""" # noqa: E501
|
|
1135
|
+
|
|
1136
|
+
_param = self._reconcile_credit_note_refund_serialize(
|
|
1137
|
+
credit_note_id=credit_note_id,
|
|
1138
|
+
environment=environment,
|
|
1139
|
+
merchant_account_id=merchant_account_id,
|
|
1140
|
+
credit_note_refund_reconcile_request=credit_note_refund_reconcile_request,
|
|
1141
|
+
idempotency_key=idempotency_key,
|
|
1142
|
+
_request_auth=_request_auth,
|
|
1143
|
+
_content_type=_content_type,
|
|
1144
|
+
_headers=_headers,
|
|
1145
|
+
_host_index=_host_index
|
|
1146
|
+
)
|
|
1147
|
+
|
|
1148
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1149
|
+
'200': "ApiWriteEnvelope",
|
|
1150
|
+
'400': "ApiError",
|
|
1151
|
+
'401': "ApiError",
|
|
1152
|
+
'409': "ApiError",
|
|
1153
|
+
'422': "ApiError",
|
|
1154
|
+
'429': "ApiError",
|
|
1155
|
+
}
|
|
1156
|
+
response_data = self.api_client.call_api(
|
|
1157
|
+
*_param,
|
|
1158
|
+
_request_timeout=_request_timeout
|
|
1159
|
+
)
|
|
1160
|
+
response_data.read()
|
|
1161
|
+
return self.api_client.response_deserialize(
|
|
1162
|
+
response_data=response_data,
|
|
1163
|
+
response_types_map=_response_types_map,
|
|
1164
|
+
)
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
@validate_call
|
|
1168
|
+
def reconcile_credit_note_refund_without_preload_content(
|
|
1169
|
+
self,
|
|
1170
|
+
credit_note_id: StrictStr,
|
|
1171
|
+
environment: StrictStr,
|
|
1172
|
+
merchant_account_id: StrictStr,
|
|
1173
|
+
credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest,
|
|
1174
|
+
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,
|
|
1175
|
+
_request_timeout: Union[
|
|
1176
|
+
None,
|
|
1177
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1178
|
+
Tuple[
|
|
1179
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1180
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1181
|
+
]
|
|
1182
|
+
] = None,
|
|
1183
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1184
|
+
_content_type: Optional[StrictStr] = None,
|
|
1185
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1186
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1187
|
+
) -> RESTResponseType:
|
|
1188
|
+
"""Reconcile credit-note refund linkage after drift or provider replay
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
:param credit_note_id: (required)
|
|
1192
|
+
:type credit_note_id: str
|
|
1193
|
+
:param environment: (required)
|
|
1194
|
+
:type environment: str
|
|
1195
|
+
:param merchant_account_id: (required)
|
|
1196
|
+
:type merchant_account_id: str
|
|
1197
|
+
:param credit_note_refund_reconcile_request: (required)
|
|
1198
|
+
:type credit_note_refund_reconcile_request: CreditNoteRefundReconcileRequest
|
|
1199
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1200
|
+
:type idempotency_key: str
|
|
1201
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1202
|
+
number provided, it will be total request
|
|
1203
|
+
timeout. It can also be a pair (tuple) of
|
|
1204
|
+
(connection, read) timeouts.
|
|
1205
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1206
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1207
|
+
request; this effectively ignores the
|
|
1208
|
+
authentication in the spec for a single request.
|
|
1209
|
+
:type _request_auth: dict, optional
|
|
1210
|
+
:param _content_type: force content-type for the request.
|
|
1211
|
+
:type _content_type: str, Optional
|
|
1212
|
+
:param _headers: set to override the headers for a single
|
|
1213
|
+
request; this effectively ignores the headers
|
|
1214
|
+
in the spec for a single request.
|
|
1215
|
+
:type _headers: dict, optional
|
|
1216
|
+
:param _host_index: set to override the host_index for a single
|
|
1217
|
+
request; this effectively ignores the host_index
|
|
1218
|
+
in the spec for a single request.
|
|
1219
|
+
:type _host_index: int, optional
|
|
1220
|
+
:return: Returns the result object.
|
|
1221
|
+
""" # noqa: E501
|
|
1222
|
+
|
|
1223
|
+
_param = self._reconcile_credit_note_refund_serialize(
|
|
1224
|
+
credit_note_id=credit_note_id,
|
|
1225
|
+
environment=environment,
|
|
1226
|
+
merchant_account_id=merchant_account_id,
|
|
1227
|
+
credit_note_refund_reconcile_request=credit_note_refund_reconcile_request,
|
|
1228
|
+
idempotency_key=idempotency_key,
|
|
1229
|
+
_request_auth=_request_auth,
|
|
1230
|
+
_content_type=_content_type,
|
|
1231
|
+
_headers=_headers,
|
|
1232
|
+
_host_index=_host_index
|
|
1233
|
+
)
|
|
1234
|
+
|
|
1235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1236
|
+
'200': "ApiWriteEnvelope",
|
|
1237
|
+
'400': "ApiError",
|
|
1238
|
+
'401': "ApiError",
|
|
1239
|
+
'409': "ApiError",
|
|
1240
|
+
'422': "ApiError",
|
|
1241
|
+
'429': "ApiError",
|
|
1242
|
+
}
|
|
1243
|
+
response_data = self.api_client.call_api(
|
|
1244
|
+
*_param,
|
|
1245
|
+
_request_timeout=_request_timeout
|
|
1246
|
+
)
|
|
1247
|
+
return response_data.response
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
def _reconcile_credit_note_refund_serialize(
|
|
1251
|
+
self,
|
|
1252
|
+
credit_note_id,
|
|
1253
|
+
environment,
|
|
1254
|
+
merchant_account_id,
|
|
1255
|
+
credit_note_refund_reconcile_request,
|
|
1256
|
+
idempotency_key,
|
|
1257
|
+
_request_auth,
|
|
1258
|
+
_content_type,
|
|
1259
|
+
_headers,
|
|
1260
|
+
_host_index,
|
|
1261
|
+
) -> RequestSerialized:
|
|
1262
|
+
|
|
1263
|
+
_host = None
|
|
1264
|
+
|
|
1265
|
+
_collection_formats: Dict[str, str] = {
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
_path_params: Dict[str, str] = {}
|
|
1269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1272
|
+
_files: Dict[
|
|
1273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1274
|
+
] = {}
|
|
1275
|
+
_body_params: Optional[bytes] = None
|
|
1276
|
+
|
|
1277
|
+
# process the path parameters
|
|
1278
|
+
if credit_note_id is not None:
|
|
1279
|
+
_path_params['creditNoteId'] = credit_note_id
|
|
1280
|
+
# process the query parameters
|
|
1281
|
+
if environment is not None:
|
|
1282
|
+
|
|
1283
|
+
_query_params.append(('environment', environment))
|
|
1284
|
+
|
|
1285
|
+
if merchant_account_id is not None:
|
|
1286
|
+
|
|
1287
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1288
|
+
|
|
1289
|
+
# process the header parameters
|
|
1290
|
+
if idempotency_key is not None:
|
|
1291
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1292
|
+
# process the form parameters
|
|
1293
|
+
# process the body parameter
|
|
1294
|
+
if credit_note_refund_reconcile_request is not None:
|
|
1295
|
+
_body_params = credit_note_refund_reconcile_request
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
# set the HTTP header `Accept`
|
|
1299
|
+
if 'Accept' not in _header_params:
|
|
1300
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1301
|
+
[
|
|
1302
|
+
'application/json'
|
|
1303
|
+
]
|
|
1304
|
+
)
|
|
1305
|
+
|
|
1306
|
+
# set the HTTP header `Content-Type`
|
|
1307
|
+
if _content_type:
|
|
1308
|
+
_header_params['Content-Type'] = _content_type
|
|
1309
|
+
else:
|
|
1310
|
+
_default_content_type = (
|
|
1311
|
+
self.api_client.select_header_content_type(
|
|
1312
|
+
[
|
|
1313
|
+
'application/json'
|
|
1314
|
+
]
|
|
1315
|
+
)
|
|
1316
|
+
)
|
|
1317
|
+
if _default_content_type is not None:
|
|
1318
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1319
|
+
|
|
1320
|
+
# authentication setting
|
|
1321
|
+
_auth_settings: List[str] = [
|
|
1322
|
+
'api-key'
|
|
1323
|
+
]
|
|
1324
|
+
|
|
1325
|
+
return self.api_client.param_serialize(
|
|
1326
|
+
method='POST',
|
|
1327
|
+
resource_path='/v1/credit-notes/{creditNoteId}/reconcile-refund',
|
|
1328
|
+
path_params=_path_params,
|
|
1329
|
+
query_params=_query_params,
|
|
1330
|
+
header_params=_header_params,
|
|
1331
|
+
body=_body_params,
|
|
1332
|
+
post_params=_form_params,
|
|
1333
|
+
files=_files,
|
|
1334
|
+
auth_settings=_auth_settings,
|
|
1335
|
+
collection_formats=_collection_formats,
|
|
1336
|
+
_host=_host,
|
|
1337
|
+
_request_auth=_request_auth
|
|
1338
|
+
)
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
@validate_call
|
|
1344
|
+
def refund_credit_note(
|
|
1345
|
+
self,
|
|
1346
|
+
credit_note_id: StrictStr,
|
|
1347
|
+
environment: StrictStr,
|
|
1348
|
+
merchant_account_id: StrictStr,
|
|
1349
|
+
credit_note_refund_request: CreditNoteRefundRequest,
|
|
1350
|
+
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,
|
|
1351
|
+
_request_timeout: Union[
|
|
1352
|
+
None,
|
|
1353
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1354
|
+
Tuple[
|
|
1355
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1356
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1357
|
+
]
|
|
1358
|
+
] = None,
|
|
1359
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1360
|
+
_content_type: Optional[StrictStr] = None,
|
|
1361
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1362
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1363
|
+
) -> ApiWriteEnvelope:
|
|
1364
|
+
"""Execute or record a credit-note refund
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
:param credit_note_id: (required)
|
|
1368
|
+
:type credit_note_id: str
|
|
1369
|
+
:param environment: (required)
|
|
1370
|
+
:type environment: str
|
|
1371
|
+
:param merchant_account_id: (required)
|
|
1372
|
+
:type merchant_account_id: str
|
|
1373
|
+
:param credit_note_refund_request: (required)
|
|
1374
|
+
:type credit_note_refund_request: CreditNoteRefundRequest
|
|
1375
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1376
|
+
:type idempotency_key: str
|
|
1377
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1378
|
+
number provided, it will be total request
|
|
1379
|
+
timeout. It can also be a pair (tuple) of
|
|
1380
|
+
(connection, read) timeouts.
|
|
1381
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1382
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1383
|
+
request; this effectively ignores the
|
|
1384
|
+
authentication in the spec for a single request.
|
|
1385
|
+
:type _request_auth: dict, optional
|
|
1386
|
+
:param _content_type: force content-type for the request.
|
|
1387
|
+
:type _content_type: str, Optional
|
|
1388
|
+
:param _headers: set to override the headers for a single
|
|
1389
|
+
request; this effectively ignores the headers
|
|
1390
|
+
in the spec for a single request.
|
|
1391
|
+
:type _headers: dict, optional
|
|
1392
|
+
:param _host_index: set to override the host_index for a single
|
|
1393
|
+
request; this effectively ignores the host_index
|
|
1394
|
+
in the spec for a single request.
|
|
1395
|
+
:type _host_index: int, optional
|
|
1396
|
+
:return: Returns the result object.
|
|
1397
|
+
""" # noqa: E501
|
|
1398
|
+
|
|
1399
|
+
_param = self._refund_credit_note_serialize(
|
|
1400
|
+
credit_note_id=credit_note_id,
|
|
1401
|
+
environment=environment,
|
|
1402
|
+
merchant_account_id=merchant_account_id,
|
|
1403
|
+
credit_note_refund_request=credit_note_refund_request,
|
|
1404
|
+
idempotency_key=idempotency_key,
|
|
1405
|
+
_request_auth=_request_auth,
|
|
1406
|
+
_content_type=_content_type,
|
|
1407
|
+
_headers=_headers,
|
|
1408
|
+
_host_index=_host_index
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1412
|
+
'200': "ApiWriteEnvelope",
|
|
1413
|
+
'400': "ApiError",
|
|
1414
|
+
'401': "ApiError",
|
|
1415
|
+
'409': "ApiError",
|
|
1416
|
+
'422': "ApiError",
|
|
1417
|
+
'429': "ApiError",
|
|
1418
|
+
}
|
|
1419
|
+
response_data = self.api_client.call_api(
|
|
1420
|
+
*_param,
|
|
1421
|
+
_request_timeout=_request_timeout
|
|
1422
|
+
)
|
|
1423
|
+
response_data.read()
|
|
1424
|
+
return self.api_client.response_deserialize(
|
|
1425
|
+
response_data=response_data,
|
|
1426
|
+
response_types_map=_response_types_map,
|
|
1427
|
+
).data
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
@validate_call
|
|
1431
|
+
def refund_credit_note_with_http_info(
|
|
1432
|
+
self,
|
|
1433
|
+
credit_note_id: StrictStr,
|
|
1434
|
+
environment: StrictStr,
|
|
1435
|
+
merchant_account_id: StrictStr,
|
|
1436
|
+
credit_note_refund_request: CreditNoteRefundRequest,
|
|
1437
|
+
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,
|
|
1438
|
+
_request_timeout: Union[
|
|
1439
|
+
None,
|
|
1440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1441
|
+
Tuple[
|
|
1442
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1443
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1444
|
+
]
|
|
1445
|
+
] = None,
|
|
1446
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1447
|
+
_content_type: Optional[StrictStr] = None,
|
|
1448
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1449
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1450
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1451
|
+
"""Execute or record a credit-note refund
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
:param credit_note_id: (required)
|
|
1455
|
+
:type credit_note_id: str
|
|
1456
|
+
:param environment: (required)
|
|
1457
|
+
:type environment: str
|
|
1458
|
+
:param merchant_account_id: (required)
|
|
1459
|
+
:type merchant_account_id: str
|
|
1460
|
+
:param credit_note_refund_request: (required)
|
|
1461
|
+
:type credit_note_refund_request: CreditNoteRefundRequest
|
|
1462
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1463
|
+
:type idempotency_key: str
|
|
1464
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1465
|
+
number provided, it will be total request
|
|
1466
|
+
timeout. It can also be a pair (tuple) of
|
|
1467
|
+
(connection, read) timeouts.
|
|
1468
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1469
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1470
|
+
request; this effectively ignores the
|
|
1471
|
+
authentication in the spec for a single request.
|
|
1472
|
+
:type _request_auth: dict, optional
|
|
1473
|
+
:param _content_type: force content-type for the request.
|
|
1474
|
+
:type _content_type: str, Optional
|
|
1475
|
+
:param _headers: set to override the headers for a single
|
|
1476
|
+
request; this effectively ignores the headers
|
|
1477
|
+
in the spec for a single request.
|
|
1478
|
+
:type _headers: dict, optional
|
|
1479
|
+
:param _host_index: set to override the host_index for a single
|
|
1480
|
+
request; this effectively ignores the host_index
|
|
1481
|
+
in the spec for a single request.
|
|
1482
|
+
:type _host_index: int, optional
|
|
1483
|
+
:return: Returns the result object.
|
|
1484
|
+
""" # noqa: E501
|
|
1485
|
+
|
|
1486
|
+
_param = self._refund_credit_note_serialize(
|
|
1487
|
+
credit_note_id=credit_note_id,
|
|
1488
|
+
environment=environment,
|
|
1489
|
+
merchant_account_id=merchant_account_id,
|
|
1490
|
+
credit_note_refund_request=credit_note_refund_request,
|
|
1491
|
+
idempotency_key=idempotency_key,
|
|
1492
|
+
_request_auth=_request_auth,
|
|
1493
|
+
_content_type=_content_type,
|
|
1494
|
+
_headers=_headers,
|
|
1495
|
+
_host_index=_host_index
|
|
1496
|
+
)
|
|
1497
|
+
|
|
1498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1499
|
+
'200': "ApiWriteEnvelope",
|
|
1500
|
+
'400': "ApiError",
|
|
1501
|
+
'401': "ApiError",
|
|
1502
|
+
'409': "ApiError",
|
|
1503
|
+
'422': "ApiError",
|
|
1504
|
+
'429': "ApiError",
|
|
1505
|
+
}
|
|
1506
|
+
response_data = self.api_client.call_api(
|
|
1507
|
+
*_param,
|
|
1508
|
+
_request_timeout=_request_timeout
|
|
1509
|
+
)
|
|
1510
|
+
response_data.read()
|
|
1511
|
+
return self.api_client.response_deserialize(
|
|
1512
|
+
response_data=response_data,
|
|
1513
|
+
response_types_map=_response_types_map,
|
|
1514
|
+
)
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
@validate_call
|
|
1518
|
+
def refund_credit_note_without_preload_content(
|
|
1519
|
+
self,
|
|
1520
|
+
credit_note_id: StrictStr,
|
|
1521
|
+
environment: StrictStr,
|
|
1522
|
+
merchant_account_id: StrictStr,
|
|
1523
|
+
credit_note_refund_request: CreditNoteRefundRequest,
|
|
1524
|
+
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,
|
|
1525
|
+
_request_timeout: Union[
|
|
1526
|
+
None,
|
|
1527
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1528
|
+
Tuple[
|
|
1529
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1530
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1531
|
+
]
|
|
1532
|
+
] = None,
|
|
1533
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1534
|
+
_content_type: Optional[StrictStr] = None,
|
|
1535
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1536
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1537
|
+
) -> RESTResponseType:
|
|
1538
|
+
"""Execute or record a credit-note refund
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
:param credit_note_id: (required)
|
|
1542
|
+
:type credit_note_id: str
|
|
1543
|
+
:param environment: (required)
|
|
1544
|
+
:type environment: str
|
|
1545
|
+
:param merchant_account_id: (required)
|
|
1546
|
+
:type merchant_account_id: str
|
|
1547
|
+
:param credit_note_refund_request: (required)
|
|
1548
|
+
:type credit_note_refund_request: CreditNoteRefundRequest
|
|
1549
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
1550
|
+
:type idempotency_key: str
|
|
1551
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1552
|
+
number provided, it will be total request
|
|
1553
|
+
timeout. It can also be a pair (tuple) of
|
|
1554
|
+
(connection, read) timeouts.
|
|
1555
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1556
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1557
|
+
request; this effectively ignores the
|
|
1558
|
+
authentication in the spec for a single request.
|
|
1559
|
+
:type _request_auth: dict, optional
|
|
1560
|
+
:param _content_type: force content-type for the request.
|
|
1561
|
+
:type _content_type: str, Optional
|
|
1562
|
+
:param _headers: set to override the headers for a single
|
|
1563
|
+
request; this effectively ignores the headers
|
|
1564
|
+
in the spec for a single request.
|
|
1565
|
+
:type _headers: dict, optional
|
|
1566
|
+
:param _host_index: set to override the host_index for a single
|
|
1567
|
+
request; this effectively ignores the host_index
|
|
1568
|
+
in the spec for a single request.
|
|
1569
|
+
:type _host_index: int, optional
|
|
1570
|
+
:return: Returns the result object.
|
|
1571
|
+
""" # noqa: E501
|
|
1572
|
+
|
|
1573
|
+
_param = self._refund_credit_note_serialize(
|
|
1574
|
+
credit_note_id=credit_note_id,
|
|
1575
|
+
environment=environment,
|
|
1576
|
+
merchant_account_id=merchant_account_id,
|
|
1577
|
+
credit_note_refund_request=credit_note_refund_request,
|
|
1578
|
+
idempotency_key=idempotency_key,
|
|
1579
|
+
_request_auth=_request_auth,
|
|
1580
|
+
_content_type=_content_type,
|
|
1581
|
+
_headers=_headers,
|
|
1582
|
+
_host_index=_host_index
|
|
1583
|
+
)
|
|
1584
|
+
|
|
1585
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1586
|
+
'200': "ApiWriteEnvelope",
|
|
1587
|
+
'400': "ApiError",
|
|
1588
|
+
'401': "ApiError",
|
|
1589
|
+
'409': "ApiError",
|
|
1590
|
+
'422': "ApiError",
|
|
1591
|
+
'429': "ApiError",
|
|
1592
|
+
}
|
|
1593
|
+
response_data = self.api_client.call_api(
|
|
1594
|
+
*_param,
|
|
1595
|
+
_request_timeout=_request_timeout
|
|
1596
|
+
)
|
|
1597
|
+
return response_data.response
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
def _refund_credit_note_serialize(
|
|
1601
|
+
self,
|
|
1602
|
+
credit_note_id,
|
|
1603
|
+
environment,
|
|
1604
|
+
merchant_account_id,
|
|
1605
|
+
credit_note_refund_request,
|
|
1606
|
+
idempotency_key,
|
|
1607
|
+
_request_auth,
|
|
1608
|
+
_content_type,
|
|
1609
|
+
_headers,
|
|
1610
|
+
_host_index,
|
|
1611
|
+
) -> RequestSerialized:
|
|
1612
|
+
|
|
1613
|
+
_host = None
|
|
1614
|
+
|
|
1615
|
+
_collection_formats: Dict[str, str] = {
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
_path_params: Dict[str, str] = {}
|
|
1619
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1620
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1621
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1622
|
+
_files: Dict[
|
|
1623
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1624
|
+
] = {}
|
|
1625
|
+
_body_params: Optional[bytes] = None
|
|
1626
|
+
|
|
1627
|
+
# process the path parameters
|
|
1628
|
+
if credit_note_id is not None:
|
|
1629
|
+
_path_params['creditNoteId'] = credit_note_id
|
|
1630
|
+
# process the query parameters
|
|
1631
|
+
if environment is not None:
|
|
1632
|
+
|
|
1633
|
+
_query_params.append(('environment', environment))
|
|
1634
|
+
|
|
1635
|
+
if merchant_account_id is not None:
|
|
1636
|
+
|
|
1637
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1638
|
+
|
|
1639
|
+
# process the header parameters
|
|
1640
|
+
if idempotency_key is not None:
|
|
1641
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1642
|
+
# process the form parameters
|
|
1643
|
+
# process the body parameter
|
|
1644
|
+
if credit_note_refund_request is not None:
|
|
1645
|
+
_body_params = credit_note_refund_request
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
# set the HTTP header `Accept`
|
|
1649
|
+
if 'Accept' not in _header_params:
|
|
1650
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1651
|
+
[
|
|
1652
|
+
'application/json'
|
|
1653
|
+
]
|
|
1654
|
+
)
|
|
1655
|
+
|
|
1656
|
+
# set the HTTP header `Content-Type`
|
|
1657
|
+
if _content_type:
|
|
1658
|
+
_header_params['Content-Type'] = _content_type
|
|
1659
|
+
else:
|
|
1660
|
+
_default_content_type = (
|
|
1661
|
+
self.api_client.select_header_content_type(
|
|
1662
|
+
[
|
|
1663
|
+
'application/json'
|
|
1664
|
+
]
|
|
1665
|
+
)
|
|
1666
|
+
)
|
|
1667
|
+
if _default_content_type is not None:
|
|
1668
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1669
|
+
|
|
1670
|
+
# authentication setting
|
|
1671
|
+
_auth_settings: List[str] = [
|
|
1672
|
+
'api-key'
|
|
1673
|
+
]
|
|
1674
|
+
|
|
1675
|
+
return self.api_client.param_serialize(
|
|
1676
|
+
method='POST',
|
|
1677
|
+
resource_path='/v1/credit-notes/{creditNoteId}/refund',
|
|
1678
|
+
path_params=_path_params,
|
|
1679
|
+
query_params=_query_params,
|
|
1680
|
+
header_params=_header_params,
|
|
1681
|
+
body=_body_params,
|
|
1682
|
+
post_params=_form_params,
|
|
1683
|
+
files=_files,
|
|
1684
|
+
auth_settings=_auth_settings,
|
|
1685
|
+
collection_formats=_collection_formats,
|
|
1686
|
+
_host=_host,
|
|
1687
|
+
_request_auth=_request_auth
|
|
1688
|
+
)
|