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,4931 @@
|
|
|
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 Any, Dict, Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from vortex.models.api_write_envelope import ApiWriteEnvelope
|
|
22
|
+
from vortex.models.webhook_deliveries_dispatch_request import WebhookDeliveriesDispatchRequest
|
|
23
|
+
from vortex.models.webhook_deliveries_redrive_request import WebhookDeliveriesRedriveRequest
|
|
24
|
+
from vortex.models.webhook_delivery_replay_request import WebhookDeliveryReplayRequest
|
|
25
|
+
from vortex.models.webhook_endpoint_create_request import WebhookEndpointCreateRequest
|
|
26
|
+
from vortex.models.webhook_endpoint_secret_rotate_request import WebhookEndpointSecretRotateRequest
|
|
27
|
+
from vortex.models.webhook_endpoint_test_request import WebhookEndpointTestRequest
|
|
28
|
+
from vortex.models.webhook_endpoint_update_request import WebhookEndpointUpdateRequest
|
|
29
|
+
from vortex.models.webhook_event_resend_request import WebhookEventResendRequest
|
|
30
|
+
|
|
31
|
+
from vortex.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from vortex.api_response import ApiResponse
|
|
33
|
+
from vortex.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class WebhooksApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def create_webhook_endpoint(
|
|
51
|
+
self,
|
|
52
|
+
environment: StrictStr,
|
|
53
|
+
merchant_account_id: StrictStr,
|
|
54
|
+
webhook_endpoint_create_request: WebhookEndpointCreateRequest,
|
|
55
|
+
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,
|
|
56
|
+
_request_timeout: Union[
|
|
57
|
+
None,
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Tuple[
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
62
|
+
]
|
|
63
|
+
] = None,
|
|
64
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_content_type: Optional[StrictStr] = None,
|
|
66
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
67
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
68
|
+
) -> ApiWriteEnvelope:
|
|
69
|
+
"""Create an outbound webhook endpoint
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
:param environment: (required)
|
|
73
|
+
:type environment: str
|
|
74
|
+
:param merchant_account_id: (required)
|
|
75
|
+
:type merchant_account_id: str
|
|
76
|
+
:param webhook_endpoint_create_request: (required)
|
|
77
|
+
:type webhook_endpoint_create_request: WebhookEndpointCreateRequest
|
|
78
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
79
|
+
:type idempotency_key: str
|
|
80
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
81
|
+
number provided, it will be total request
|
|
82
|
+
timeout. It can also be a pair (tuple) of
|
|
83
|
+
(connection, read) timeouts.
|
|
84
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
85
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
86
|
+
request; this effectively ignores the
|
|
87
|
+
authentication in the spec for a single request.
|
|
88
|
+
:type _request_auth: dict, optional
|
|
89
|
+
:param _content_type: force content-type for the request.
|
|
90
|
+
:type _content_type: str, Optional
|
|
91
|
+
:param _headers: set to override the headers for a single
|
|
92
|
+
request; this effectively ignores the headers
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _headers: dict, optional
|
|
95
|
+
:param _host_index: set to override the host_index for a single
|
|
96
|
+
request; this effectively ignores the host_index
|
|
97
|
+
in the spec for a single request.
|
|
98
|
+
:type _host_index: int, optional
|
|
99
|
+
:return: Returns the result object.
|
|
100
|
+
""" # noqa: E501
|
|
101
|
+
|
|
102
|
+
_param = self._create_webhook_endpoint_serialize(
|
|
103
|
+
environment=environment,
|
|
104
|
+
merchant_account_id=merchant_account_id,
|
|
105
|
+
webhook_endpoint_create_request=webhook_endpoint_create_request,
|
|
106
|
+
idempotency_key=idempotency_key,
|
|
107
|
+
_request_auth=_request_auth,
|
|
108
|
+
_content_type=_content_type,
|
|
109
|
+
_headers=_headers,
|
|
110
|
+
_host_index=_host_index
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
114
|
+
'200': "ApiWriteEnvelope",
|
|
115
|
+
'400': "ApiError",
|
|
116
|
+
'401': "ApiError",
|
|
117
|
+
'409': "ApiError",
|
|
118
|
+
'422': "ApiError",
|
|
119
|
+
'429': "ApiError",
|
|
120
|
+
}
|
|
121
|
+
response_data = self.api_client.call_api(
|
|
122
|
+
*_param,
|
|
123
|
+
_request_timeout=_request_timeout
|
|
124
|
+
)
|
|
125
|
+
response_data.read()
|
|
126
|
+
return self.api_client.response_deserialize(
|
|
127
|
+
response_data=response_data,
|
|
128
|
+
response_types_map=_response_types_map,
|
|
129
|
+
).data
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@validate_call
|
|
133
|
+
def create_webhook_endpoint_with_http_info(
|
|
134
|
+
self,
|
|
135
|
+
environment: StrictStr,
|
|
136
|
+
merchant_account_id: StrictStr,
|
|
137
|
+
webhook_endpoint_create_request: WebhookEndpointCreateRequest,
|
|
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
|
+
"""Create an outbound webhook endpoint
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
:param environment: (required)
|
|
156
|
+
:type environment: str
|
|
157
|
+
:param merchant_account_id: (required)
|
|
158
|
+
:type merchant_account_id: str
|
|
159
|
+
:param webhook_endpoint_create_request: (required)
|
|
160
|
+
:type webhook_endpoint_create_request: WebhookEndpointCreateRequest
|
|
161
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
162
|
+
:type idempotency_key: str
|
|
163
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
164
|
+
number provided, it will be total request
|
|
165
|
+
timeout. It can also be a pair (tuple) of
|
|
166
|
+
(connection, read) timeouts.
|
|
167
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
168
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
169
|
+
request; this effectively ignores the
|
|
170
|
+
authentication in the spec for a single request.
|
|
171
|
+
:type _request_auth: dict, optional
|
|
172
|
+
:param _content_type: force content-type for the request.
|
|
173
|
+
:type _content_type: str, Optional
|
|
174
|
+
:param _headers: set to override the headers for a single
|
|
175
|
+
request; this effectively ignores the headers
|
|
176
|
+
in the spec for a single request.
|
|
177
|
+
:type _headers: dict, optional
|
|
178
|
+
:param _host_index: set to override the host_index for a single
|
|
179
|
+
request; this effectively ignores the host_index
|
|
180
|
+
in the spec for a single request.
|
|
181
|
+
:type _host_index: int, optional
|
|
182
|
+
:return: Returns the result object.
|
|
183
|
+
""" # noqa: E501
|
|
184
|
+
|
|
185
|
+
_param = self._create_webhook_endpoint_serialize(
|
|
186
|
+
environment=environment,
|
|
187
|
+
merchant_account_id=merchant_account_id,
|
|
188
|
+
webhook_endpoint_create_request=webhook_endpoint_create_request,
|
|
189
|
+
idempotency_key=idempotency_key,
|
|
190
|
+
_request_auth=_request_auth,
|
|
191
|
+
_content_type=_content_type,
|
|
192
|
+
_headers=_headers,
|
|
193
|
+
_host_index=_host_index
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
197
|
+
'200': "ApiWriteEnvelope",
|
|
198
|
+
'400': "ApiError",
|
|
199
|
+
'401': "ApiError",
|
|
200
|
+
'409': "ApiError",
|
|
201
|
+
'422': "ApiError",
|
|
202
|
+
'429': "ApiError",
|
|
203
|
+
}
|
|
204
|
+
response_data = self.api_client.call_api(
|
|
205
|
+
*_param,
|
|
206
|
+
_request_timeout=_request_timeout
|
|
207
|
+
)
|
|
208
|
+
response_data.read()
|
|
209
|
+
return self.api_client.response_deserialize(
|
|
210
|
+
response_data=response_data,
|
|
211
|
+
response_types_map=_response_types_map,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@validate_call
|
|
216
|
+
def create_webhook_endpoint_without_preload_content(
|
|
217
|
+
self,
|
|
218
|
+
environment: StrictStr,
|
|
219
|
+
merchant_account_id: StrictStr,
|
|
220
|
+
webhook_endpoint_create_request: WebhookEndpointCreateRequest,
|
|
221
|
+
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,
|
|
222
|
+
_request_timeout: Union[
|
|
223
|
+
None,
|
|
224
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
225
|
+
Tuple[
|
|
226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
227
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
228
|
+
]
|
|
229
|
+
] = None,
|
|
230
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
231
|
+
_content_type: Optional[StrictStr] = None,
|
|
232
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
233
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
234
|
+
) -> RESTResponseType:
|
|
235
|
+
"""Create an outbound webhook endpoint
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
:param environment: (required)
|
|
239
|
+
:type environment: str
|
|
240
|
+
:param merchant_account_id: (required)
|
|
241
|
+
:type merchant_account_id: str
|
|
242
|
+
:param webhook_endpoint_create_request: (required)
|
|
243
|
+
:type webhook_endpoint_create_request: WebhookEndpointCreateRequest
|
|
244
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
245
|
+
:type idempotency_key: str
|
|
246
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
247
|
+
number provided, it will be total request
|
|
248
|
+
timeout. It can also be a pair (tuple) of
|
|
249
|
+
(connection, read) timeouts.
|
|
250
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
251
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
252
|
+
request; this effectively ignores the
|
|
253
|
+
authentication in the spec for a single request.
|
|
254
|
+
:type _request_auth: dict, optional
|
|
255
|
+
:param _content_type: force content-type for the request.
|
|
256
|
+
:type _content_type: str, Optional
|
|
257
|
+
:param _headers: set to override the headers for a single
|
|
258
|
+
request; this effectively ignores the headers
|
|
259
|
+
in the spec for a single request.
|
|
260
|
+
:type _headers: dict, optional
|
|
261
|
+
:param _host_index: set to override the host_index for a single
|
|
262
|
+
request; this effectively ignores the host_index
|
|
263
|
+
in the spec for a single request.
|
|
264
|
+
:type _host_index: int, optional
|
|
265
|
+
:return: Returns the result object.
|
|
266
|
+
""" # noqa: E501
|
|
267
|
+
|
|
268
|
+
_param = self._create_webhook_endpoint_serialize(
|
|
269
|
+
environment=environment,
|
|
270
|
+
merchant_account_id=merchant_account_id,
|
|
271
|
+
webhook_endpoint_create_request=webhook_endpoint_create_request,
|
|
272
|
+
idempotency_key=idempotency_key,
|
|
273
|
+
_request_auth=_request_auth,
|
|
274
|
+
_content_type=_content_type,
|
|
275
|
+
_headers=_headers,
|
|
276
|
+
_host_index=_host_index
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
280
|
+
'200': "ApiWriteEnvelope",
|
|
281
|
+
'400': "ApiError",
|
|
282
|
+
'401': "ApiError",
|
|
283
|
+
'409': "ApiError",
|
|
284
|
+
'422': "ApiError",
|
|
285
|
+
'429': "ApiError",
|
|
286
|
+
}
|
|
287
|
+
response_data = self.api_client.call_api(
|
|
288
|
+
*_param,
|
|
289
|
+
_request_timeout=_request_timeout
|
|
290
|
+
)
|
|
291
|
+
return response_data.response
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def _create_webhook_endpoint_serialize(
|
|
295
|
+
self,
|
|
296
|
+
environment,
|
|
297
|
+
merchant_account_id,
|
|
298
|
+
webhook_endpoint_create_request,
|
|
299
|
+
idempotency_key,
|
|
300
|
+
_request_auth,
|
|
301
|
+
_content_type,
|
|
302
|
+
_headers,
|
|
303
|
+
_host_index,
|
|
304
|
+
) -> RequestSerialized:
|
|
305
|
+
|
|
306
|
+
_host = None
|
|
307
|
+
|
|
308
|
+
_collection_formats: Dict[str, str] = {
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
_path_params: Dict[str, str] = {}
|
|
312
|
+
_query_params: List[Tuple[str, str]] = []
|
|
313
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
314
|
+
_form_params: List[Tuple[str, str]] = []
|
|
315
|
+
_files: Dict[
|
|
316
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
317
|
+
] = {}
|
|
318
|
+
_body_params: Optional[bytes] = None
|
|
319
|
+
|
|
320
|
+
# process the path parameters
|
|
321
|
+
# process the query parameters
|
|
322
|
+
if environment is not None:
|
|
323
|
+
|
|
324
|
+
_query_params.append(('environment', environment))
|
|
325
|
+
|
|
326
|
+
if merchant_account_id is not None:
|
|
327
|
+
|
|
328
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
329
|
+
|
|
330
|
+
# process the header parameters
|
|
331
|
+
if idempotency_key is not None:
|
|
332
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
333
|
+
# process the form parameters
|
|
334
|
+
# process the body parameter
|
|
335
|
+
if webhook_endpoint_create_request is not None:
|
|
336
|
+
_body_params = webhook_endpoint_create_request
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# set the HTTP header `Accept`
|
|
340
|
+
if 'Accept' not in _header_params:
|
|
341
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
342
|
+
[
|
|
343
|
+
'application/json'
|
|
344
|
+
]
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
# set the HTTP header `Content-Type`
|
|
348
|
+
if _content_type:
|
|
349
|
+
_header_params['Content-Type'] = _content_type
|
|
350
|
+
else:
|
|
351
|
+
_default_content_type = (
|
|
352
|
+
self.api_client.select_header_content_type(
|
|
353
|
+
[
|
|
354
|
+
'application/json'
|
|
355
|
+
]
|
|
356
|
+
)
|
|
357
|
+
)
|
|
358
|
+
if _default_content_type is not None:
|
|
359
|
+
_header_params['Content-Type'] = _default_content_type
|
|
360
|
+
|
|
361
|
+
# authentication setting
|
|
362
|
+
_auth_settings: List[str] = [
|
|
363
|
+
'api-key'
|
|
364
|
+
]
|
|
365
|
+
|
|
366
|
+
return self.api_client.param_serialize(
|
|
367
|
+
method='POST',
|
|
368
|
+
resource_path='/v1/webhook-endpoints',
|
|
369
|
+
path_params=_path_params,
|
|
370
|
+
query_params=_query_params,
|
|
371
|
+
header_params=_header_params,
|
|
372
|
+
body=_body_params,
|
|
373
|
+
post_params=_form_params,
|
|
374
|
+
files=_files,
|
|
375
|
+
auth_settings=_auth_settings,
|
|
376
|
+
collection_formats=_collection_formats,
|
|
377
|
+
_host=_host,
|
|
378
|
+
_request_auth=_request_auth
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
@validate_call
|
|
385
|
+
def delete_webhook_endpoint(
|
|
386
|
+
self,
|
|
387
|
+
endpoint_id: StrictStr,
|
|
388
|
+
environment: StrictStr,
|
|
389
|
+
merchant_account_id: StrictStr,
|
|
390
|
+
body: Dict[str, Any],
|
|
391
|
+
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,
|
|
392
|
+
_request_timeout: Union[
|
|
393
|
+
None,
|
|
394
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
395
|
+
Tuple[
|
|
396
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
397
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
398
|
+
]
|
|
399
|
+
] = None,
|
|
400
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
401
|
+
_content_type: Optional[StrictStr] = None,
|
|
402
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
403
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
404
|
+
) -> ApiWriteEnvelope:
|
|
405
|
+
"""Delete an outbound webhook endpoint
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
:param endpoint_id: (required)
|
|
409
|
+
:type endpoint_id: str
|
|
410
|
+
:param environment: (required)
|
|
411
|
+
:type environment: str
|
|
412
|
+
:param merchant_account_id: (required)
|
|
413
|
+
:type merchant_account_id: str
|
|
414
|
+
:param body: (required)
|
|
415
|
+
:type body: object
|
|
416
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
417
|
+
:type idempotency_key: str
|
|
418
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
419
|
+
number provided, it will be total request
|
|
420
|
+
timeout. It can also be a pair (tuple) of
|
|
421
|
+
(connection, read) timeouts.
|
|
422
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
423
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
424
|
+
request; this effectively ignores the
|
|
425
|
+
authentication in the spec for a single request.
|
|
426
|
+
:type _request_auth: dict, optional
|
|
427
|
+
:param _content_type: force content-type for the request.
|
|
428
|
+
:type _content_type: str, Optional
|
|
429
|
+
:param _headers: set to override the headers for a single
|
|
430
|
+
request; this effectively ignores the headers
|
|
431
|
+
in the spec for a single request.
|
|
432
|
+
:type _headers: dict, optional
|
|
433
|
+
:param _host_index: set to override the host_index for a single
|
|
434
|
+
request; this effectively ignores the host_index
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _host_index: int, optional
|
|
437
|
+
:return: Returns the result object.
|
|
438
|
+
""" # noqa: E501
|
|
439
|
+
|
|
440
|
+
_param = self._delete_webhook_endpoint_serialize(
|
|
441
|
+
endpoint_id=endpoint_id,
|
|
442
|
+
environment=environment,
|
|
443
|
+
merchant_account_id=merchant_account_id,
|
|
444
|
+
body=body,
|
|
445
|
+
idempotency_key=idempotency_key,
|
|
446
|
+
_request_auth=_request_auth,
|
|
447
|
+
_content_type=_content_type,
|
|
448
|
+
_headers=_headers,
|
|
449
|
+
_host_index=_host_index
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
|
+
'200': "ApiWriteEnvelope",
|
|
454
|
+
'400': "ApiError",
|
|
455
|
+
'401': "ApiError",
|
|
456
|
+
'409': "ApiError",
|
|
457
|
+
'422': "ApiError",
|
|
458
|
+
'429': "ApiError",
|
|
459
|
+
}
|
|
460
|
+
response_data = self.api_client.call_api(
|
|
461
|
+
*_param,
|
|
462
|
+
_request_timeout=_request_timeout
|
|
463
|
+
)
|
|
464
|
+
response_data.read()
|
|
465
|
+
return self.api_client.response_deserialize(
|
|
466
|
+
response_data=response_data,
|
|
467
|
+
response_types_map=_response_types_map,
|
|
468
|
+
).data
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@validate_call
|
|
472
|
+
def delete_webhook_endpoint_with_http_info(
|
|
473
|
+
self,
|
|
474
|
+
endpoint_id: StrictStr,
|
|
475
|
+
environment: StrictStr,
|
|
476
|
+
merchant_account_id: StrictStr,
|
|
477
|
+
body: Dict[str, Any],
|
|
478
|
+
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,
|
|
479
|
+
_request_timeout: Union[
|
|
480
|
+
None,
|
|
481
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
482
|
+
Tuple[
|
|
483
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
484
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
485
|
+
]
|
|
486
|
+
] = None,
|
|
487
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
488
|
+
_content_type: Optional[StrictStr] = None,
|
|
489
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
490
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
491
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
492
|
+
"""Delete an outbound webhook endpoint
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
:param endpoint_id: (required)
|
|
496
|
+
:type endpoint_id: str
|
|
497
|
+
:param environment: (required)
|
|
498
|
+
:type environment: str
|
|
499
|
+
:param merchant_account_id: (required)
|
|
500
|
+
:type merchant_account_id: str
|
|
501
|
+
:param body: (required)
|
|
502
|
+
:type body: object
|
|
503
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
504
|
+
:type idempotency_key: str
|
|
505
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
506
|
+
number provided, it will be total request
|
|
507
|
+
timeout. It can also be a pair (tuple) of
|
|
508
|
+
(connection, read) timeouts.
|
|
509
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
510
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
511
|
+
request; this effectively ignores the
|
|
512
|
+
authentication in the spec for a single request.
|
|
513
|
+
:type _request_auth: dict, optional
|
|
514
|
+
:param _content_type: force content-type for the request.
|
|
515
|
+
:type _content_type: str, Optional
|
|
516
|
+
:param _headers: set to override the headers for a single
|
|
517
|
+
request; this effectively ignores the headers
|
|
518
|
+
in the spec for a single request.
|
|
519
|
+
:type _headers: dict, optional
|
|
520
|
+
:param _host_index: set to override the host_index for a single
|
|
521
|
+
request; this effectively ignores the host_index
|
|
522
|
+
in the spec for a single request.
|
|
523
|
+
:type _host_index: int, optional
|
|
524
|
+
:return: Returns the result object.
|
|
525
|
+
""" # noqa: E501
|
|
526
|
+
|
|
527
|
+
_param = self._delete_webhook_endpoint_serialize(
|
|
528
|
+
endpoint_id=endpoint_id,
|
|
529
|
+
environment=environment,
|
|
530
|
+
merchant_account_id=merchant_account_id,
|
|
531
|
+
body=body,
|
|
532
|
+
idempotency_key=idempotency_key,
|
|
533
|
+
_request_auth=_request_auth,
|
|
534
|
+
_content_type=_content_type,
|
|
535
|
+
_headers=_headers,
|
|
536
|
+
_host_index=_host_index
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
540
|
+
'200': "ApiWriteEnvelope",
|
|
541
|
+
'400': "ApiError",
|
|
542
|
+
'401': "ApiError",
|
|
543
|
+
'409': "ApiError",
|
|
544
|
+
'422': "ApiError",
|
|
545
|
+
'429': "ApiError",
|
|
546
|
+
}
|
|
547
|
+
response_data = self.api_client.call_api(
|
|
548
|
+
*_param,
|
|
549
|
+
_request_timeout=_request_timeout
|
|
550
|
+
)
|
|
551
|
+
response_data.read()
|
|
552
|
+
return self.api_client.response_deserialize(
|
|
553
|
+
response_data=response_data,
|
|
554
|
+
response_types_map=_response_types_map,
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
@validate_call
|
|
559
|
+
def delete_webhook_endpoint_without_preload_content(
|
|
560
|
+
self,
|
|
561
|
+
endpoint_id: StrictStr,
|
|
562
|
+
environment: StrictStr,
|
|
563
|
+
merchant_account_id: StrictStr,
|
|
564
|
+
body: Dict[str, Any],
|
|
565
|
+
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,
|
|
566
|
+
_request_timeout: Union[
|
|
567
|
+
None,
|
|
568
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
569
|
+
Tuple[
|
|
570
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
571
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
572
|
+
]
|
|
573
|
+
] = None,
|
|
574
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
575
|
+
_content_type: Optional[StrictStr] = None,
|
|
576
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
577
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
578
|
+
) -> RESTResponseType:
|
|
579
|
+
"""Delete an outbound webhook endpoint
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
:param endpoint_id: (required)
|
|
583
|
+
:type endpoint_id: str
|
|
584
|
+
:param environment: (required)
|
|
585
|
+
:type environment: str
|
|
586
|
+
:param merchant_account_id: (required)
|
|
587
|
+
:type merchant_account_id: str
|
|
588
|
+
:param body: (required)
|
|
589
|
+
:type body: object
|
|
590
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
591
|
+
:type idempotency_key: str
|
|
592
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
593
|
+
number provided, it will be total request
|
|
594
|
+
timeout. It can also be a pair (tuple) of
|
|
595
|
+
(connection, read) timeouts.
|
|
596
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
597
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
598
|
+
request; this effectively ignores the
|
|
599
|
+
authentication in the spec for a single request.
|
|
600
|
+
:type _request_auth: dict, optional
|
|
601
|
+
:param _content_type: force content-type for the request.
|
|
602
|
+
:type _content_type: str, Optional
|
|
603
|
+
:param _headers: set to override the headers for a single
|
|
604
|
+
request; this effectively ignores the headers
|
|
605
|
+
in the spec for a single request.
|
|
606
|
+
:type _headers: dict, optional
|
|
607
|
+
:param _host_index: set to override the host_index for a single
|
|
608
|
+
request; this effectively ignores the host_index
|
|
609
|
+
in the spec for a single request.
|
|
610
|
+
:type _host_index: int, optional
|
|
611
|
+
:return: Returns the result object.
|
|
612
|
+
""" # noqa: E501
|
|
613
|
+
|
|
614
|
+
_param = self._delete_webhook_endpoint_serialize(
|
|
615
|
+
endpoint_id=endpoint_id,
|
|
616
|
+
environment=environment,
|
|
617
|
+
merchant_account_id=merchant_account_id,
|
|
618
|
+
body=body,
|
|
619
|
+
idempotency_key=idempotency_key,
|
|
620
|
+
_request_auth=_request_auth,
|
|
621
|
+
_content_type=_content_type,
|
|
622
|
+
_headers=_headers,
|
|
623
|
+
_host_index=_host_index
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
627
|
+
'200': "ApiWriteEnvelope",
|
|
628
|
+
'400': "ApiError",
|
|
629
|
+
'401': "ApiError",
|
|
630
|
+
'409': "ApiError",
|
|
631
|
+
'422': "ApiError",
|
|
632
|
+
'429': "ApiError",
|
|
633
|
+
}
|
|
634
|
+
response_data = self.api_client.call_api(
|
|
635
|
+
*_param,
|
|
636
|
+
_request_timeout=_request_timeout
|
|
637
|
+
)
|
|
638
|
+
return response_data.response
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
def _delete_webhook_endpoint_serialize(
|
|
642
|
+
self,
|
|
643
|
+
endpoint_id,
|
|
644
|
+
environment,
|
|
645
|
+
merchant_account_id,
|
|
646
|
+
body,
|
|
647
|
+
idempotency_key,
|
|
648
|
+
_request_auth,
|
|
649
|
+
_content_type,
|
|
650
|
+
_headers,
|
|
651
|
+
_host_index,
|
|
652
|
+
) -> RequestSerialized:
|
|
653
|
+
|
|
654
|
+
_host = None
|
|
655
|
+
|
|
656
|
+
_collection_formats: Dict[str, str] = {
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
_path_params: Dict[str, str] = {}
|
|
660
|
+
_query_params: List[Tuple[str, str]] = []
|
|
661
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
662
|
+
_form_params: List[Tuple[str, str]] = []
|
|
663
|
+
_files: Dict[
|
|
664
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
665
|
+
] = {}
|
|
666
|
+
_body_params: Optional[bytes] = None
|
|
667
|
+
|
|
668
|
+
# process the path parameters
|
|
669
|
+
if endpoint_id is not None:
|
|
670
|
+
_path_params['endpointId'] = endpoint_id
|
|
671
|
+
# process the query parameters
|
|
672
|
+
if environment is not None:
|
|
673
|
+
|
|
674
|
+
_query_params.append(('environment', environment))
|
|
675
|
+
|
|
676
|
+
if merchant_account_id is not None:
|
|
677
|
+
|
|
678
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
679
|
+
|
|
680
|
+
# process the header parameters
|
|
681
|
+
if idempotency_key is not None:
|
|
682
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
683
|
+
# process the form parameters
|
|
684
|
+
# process the body parameter
|
|
685
|
+
if body is not None:
|
|
686
|
+
_body_params = body
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
# set the HTTP header `Accept`
|
|
690
|
+
if 'Accept' not in _header_params:
|
|
691
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
692
|
+
[
|
|
693
|
+
'application/json'
|
|
694
|
+
]
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
# set the HTTP header `Content-Type`
|
|
698
|
+
if _content_type:
|
|
699
|
+
_header_params['Content-Type'] = _content_type
|
|
700
|
+
else:
|
|
701
|
+
_default_content_type = (
|
|
702
|
+
self.api_client.select_header_content_type(
|
|
703
|
+
[
|
|
704
|
+
'application/json'
|
|
705
|
+
]
|
|
706
|
+
)
|
|
707
|
+
)
|
|
708
|
+
if _default_content_type is not None:
|
|
709
|
+
_header_params['Content-Type'] = _default_content_type
|
|
710
|
+
|
|
711
|
+
# authentication setting
|
|
712
|
+
_auth_settings: List[str] = [
|
|
713
|
+
'api-key'
|
|
714
|
+
]
|
|
715
|
+
|
|
716
|
+
return self.api_client.param_serialize(
|
|
717
|
+
method='DELETE',
|
|
718
|
+
resource_path='/v1/webhook-endpoints/{endpointId}',
|
|
719
|
+
path_params=_path_params,
|
|
720
|
+
query_params=_query_params,
|
|
721
|
+
header_params=_header_params,
|
|
722
|
+
body=_body_params,
|
|
723
|
+
post_params=_form_params,
|
|
724
|
+
files=_files,
|
|
725
|
+
auth_settings=_auth_settings,
|
|
726
|
+
collection_formats=_collection_formats,
|
|
727
|
+
_host=_host,
|
|
728
|
+
_request_auth=_request_auth
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
@validate_call
|
|
735
|
+
def dispatch_webhook_deliveries(
|
|
736
|
+
self,
|
|
737
|
+
environment: StrictStr,
|
|
738
|
+
merchant_account_id: StrictStr,
|
|
739
|
+
webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest,
|
|
740
|
+
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,
|
|
741
|
+
_request_timeout: Union[
|
|
742
|
+
None,
|
|
743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
744
|
+
Tuple[
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
747
|
+
]
|
|
748
|
+
] = None,
|
|
749
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
750
|
+
_content_type: Optional[StrictStr] = None,
|
|
751
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
753
|
+
) -> ApiWriteEnvelope:
|
|
754
|
+
"""Dispatch pending outbound webhook deliveries
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
:param environment: (required)
|
|
758
|
+
:type environment: str
|
|
759
|
+
:param merchant_account_id: (required)
|
|
760
|
+
:type merchant_account_id: str
|
|
761
|
+
:param webhook_deliveries_dispatch_request: (required)
|
|
762
|
+
:type webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest
|
|
763
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
764
|
+
:type idempotency_key: str
|
|
765
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
766
|
+
number provided, it will be total request
|
|
767
|
+
timeout. It can also be a pair (tuple) of
|
|
768
|
+
(connection, read) timeouts.
|
|
769
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
770
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
771
|
+
request; this effectively ignores the
|
|
772
|
+
authentication in the spec for a single request.
|
|
773
|
+
:type _request_auth: dict, optional
|
|
774
|
+
:param _content_type: force content-type for the request.
|
|
775
|
+
:type _content_type: str, Optional
|
|
776
|
+
:param _headers: set to override the headers for a single
|
|
777
|
+
request; this effectively ignores the headers
|
|
778
|
+
in the spec for a single request.
|
|
779
|
+
:type _headers: dict, optional
|
|
780
|
+
:param _host_index: set to override the host_index for a single
|
|
781
|
+
request; this effectively ignores the host_index
|
|
782
|
+
in the spec for a single request.
|
|
783
|
+
:type _host_index: int, optional
|
|
784
|
+
:return: Returns the result object.
|
|
785
|
+
""" # noqa: E501
|
|
786
|
+
|
|
787
|
+
_param = self._dispatch_webhook_deliveries_serialize(
|
|
788
|
+
environment=environment,
|
|
789
|
+
merchant_account_id=merchant_account_id,
|
|
790
|
+
webhook_deliveries_dispatch_request=webhook_deliveries_dispatch_request,
|
|
791
|
+
idempotency_key=idempotency_key,
|
|
792
|
+
_request_auth=_request_auth,
|
|
793
|
+
_content_type=_content_type,
|
|
794
|
+
_headers=_headers,
|
|
795
|
+
_host_index=_host_index
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
799
|
+
'200': "ApiWriteEnvelope",
|
|
800
|
+
'400': "ApiError",
|
|
801
|
+
'401': "ApiError",
|
|
802
|
+
'409': "ApiError",
|
|
803
|
+
'422': "ApiError",
|
|
804
|
+
'429': "ApiError",
|
|
805
|
+
}
|
|
806
|
+
response_data = self.api_client.call_api(
|
|
807
|
+
*_param,
|
|
808
|
+
_request_timeout=_request_timeout
|
|
809
|
+
)
|
|
810
|
+
response_data.read()
|
|
811
|
+
return self.api_client.response_deserialize(
|
|
812
|
+
response_data=response_data,
|
|
813
|
+
response_types_map=_response_types_map,
|
|
814
|
+
).data
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
@validate_call
|
|
818
|
+
def dispatch_webhook_deliveries_with_http_info(
|
|
819
|
+
self,
|
|
820
|
+
environment: StrictStr,
|
|
821
|
+
merchant_account_id: StrictStr,
|
|
822
|
+
webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest,
|
|
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
|
+
"""Dispatch pending outbound webhook deliveries
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
:param environment: (required)
|
|
841
|
+
:type environment: str
|
|
842
|
+
:param merchant_account_id: (required)
|
|
843
|
+
:type merchant_account_id: str
|
|
844
|
+
:param webhook_deliveries_dispatch_request: (required)
|
|
845
|
+
:type webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest
|
|
846
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
847
|
+
:type idempotency_key: str
|
|
848
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
849
|
+
number provided, it will be total request
|
|
850
|
+
timeout. It can also be a pair (tuple) of
|
|
851
|
+
(connection, read) timeouts.
|
|
852
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
853
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
854
|
+
request; this effectively ignores the
|
|
855
|
+
authentication in the spec for a single request.
|
|
856
|
+
:type _request_auth: dict, optional
|
|
857
|
+
:param _content_type: force content-type for the request.
|
|
858
|
+
:type _content_type: str, Optional
|
|
859
|
+
:param _headers: set to override the headers for a single
|
|
860
|
+
request; this effectively ignores the headers
|
|
861
|
+
in the spec for a single request.
|
|
862
|
+
:type _headers: dict, optional
|
|
863
|
+
:param _host_index: set to override the host_index for a single
|
|
864
|
+
request; this effectively ignores the host_index
|
|
865
|
+
in the spec for a single request.
|
|
866
|
+
:type _host_index: int, optional
|
|
867
|
+
:return: Returns the result object.
|
|
868
|
+
""" # noqa: E501
|
|
869
|
+
|
|
870
|
+
_param = self._dispatch_webhook_deliveries_serialize(
|
|
871
|
+
environment=environment,
|
|
872
|
+
merchant_account_id=merchant_account_id,
|
|
873
|
+
webhook_deliveries_dispatch_request=webhook_deliveries_dispatch_request,
|
|
874
|
+
idempotency_key=idempotency_key,
|
|
875
|
+
_request_auth=_request_auth,
|
|
876
|
+
_content_type=_content_type,
|
|
877
|
+
_headers=_headers,
|
|
878
|
+
_host_index=_host_index
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
882
|
+
'200': "ApiWriteEnvelope",
|
|
883
|
+
'400': "ApiError",
|
|
884
|
+
'401': "ApiError",
|
|
885
|
+
'409': "ApiError",
|
|
886
|
+
'422': "ApiError",
|
|
887
|
+
'429': "ApiError",
|
|
888
|
+
}
|
|
889
|
+
response_data = self.api_client.call_api(
|
|
890
|
+
*_param,
|
|
891
|
+
_request_timeout=_request_timeout
|
|
892
|
+
)
|
|
893
|
+
response_data.read()
|
|
894
|
+
return self.api_client.response_deserialize(
|
|
895
|
+
response_data=response_data,
|
|
896
|
+
response_types_map=_response_types_map,
|
|
897
|
+
)
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
@validate_call
|
|
901
|
+
def dispatch_webhook_deliveries_without_preload_content(
|
|
902
|
+
self,
|
|
903
|
+
environment: StrictStr,
|
|
904
|
+
merchant_account_id: StrictStr,
|
|
905
|
+
webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest,
|
|
906
|
+
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,
|
|
907
|
+
_request_timeout: Union[
|
|
908
|
+
None,
|
|
909
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
910
|
+
Tuple[
|
|
911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
912
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
913
|
+
]
|
|
914
|
+
] = None,
|
|
915
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
916
|
+
_content_type: Optional[StrictStr] = None,
|
|
917
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
918
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
919
|
+
) -> RESTResponseType:
|
|
920
|
+
"""Dispatch pending outbound webhook deliveries
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
:param environment: (required)
|
|
924
|
+
:type environment: str
|
|
925
|
+
:param merchant_account_id: (required)
|
|
926
|
+
:type merchant_account_id: str
|
|
927
|
+
:param webhook_deliveries_dispatch_request: (required)
|
|
928
|
+
:type webhook_deliveries_dispatch_request: WebhookDeliveriesDispatchRequest
|
|
929
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
930
|
+
:type idempotency_key: str
|
|
931
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
932
|
+
number provided, it will be total request
|
|
933
|
+
timeout. It can also be a pair (tuple) of
|
|
934
|
+
(connection, read) timeouts.
|
|
935
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
936
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
937
|
+
request; this effectively ignores the
|
|
938
|
+
authentication in the spec for a single request.
|
|
939
|
+
:type _request_auth: dict, optional
|
|
940
|
+
:param _content_type: force content-type for the request.
|
|
941
|
+
:type _content_type: str, Optional
|
|
942
|
+
:param _headers: set to override the headers for a single
|
|
943
|
+
request; this effectively ignores the headers
|
|
944
|
+
in the spec for a single request.
|
|
945
|
+
:type _headers: dict, optional
|
|
946
|
+
:param _host_index: set to override the host_index for a single
|
|
947
|
+
request; this effectively ignores the host_index
|
|
948
|
+
in the spec for a single request.
|
|
949
|
+
:type _host_index: int, optional
|
|
950
|
+
:return: Returns the result object.
|
|
951
|
+
""" # noqa: E501
|
|
952
|
+
|
|
953
|
+
_param = self._dispatch_webhook_deliveries_serialize(
|
|
954
|
+
environment=environment,
|
|
955
|
+
merchant_account_id=merchant_account_id,
|
|
956
|
+
webhook_deliveries_dispatch_request=webhook_deliveries_dispatch_request,
|
|
957
|
+
idempotency_key=idempotency_key,
|
|
958
|
+
_request_auth=_request_auth,
|
|
959
|
+
_content_type=_content_type,
|
|
960
|
+
_headers=_headers,
|
|
961
|
+
_host_index=_host_index
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
965
|
+
'200': "ApiWriteEnvelope",
|
|
966
|
+
'400': "ApiError",
|
|
967
|
+
'401': "ApiError",
|
|
968
|
+
'409': "ApiError",
|
|
969
|
+
'422': "ApiError",
|
|
970
|
+
'429': "ApiError",
|
|
971
|
+
}
|
|
972
|
+
response_data = self.api_client.call_api(
|
|
973
|
+
*_param,
|
|
974
|
+
_request_timeout=_request_timeout
|
|
975
|
+
)
|
|
976
|
+
return response_data.response
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
def _dispatch_webhook_deliveries_serialize(
|
|
980
|
+
self,
|
|
981
|
+
environment,
|
|
982
|
+
merchant_account_id,
|
|
983
|
+
webhook_deliveries_dispatch_request,
|
|
984
|
+
idempotency_key,
|
|
985
|
+
_request_auth,
|
|
986
|
+
_content_type,
|
|
987
|
+
_headers,
|
|
988
|
+
_host_index,
|
|
989
|
+
) -> RequestSerialized:
|
|
990
|
+
|
|
991
|
+
_host = None
|
|
992
|
+
|
|
993
|
+
_collection_formats: Dict[str, str] = {
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
_path_params: Dict[str, str] = {}
|
|
997
|
+
_query_params: List[Tuple[str, str]] = []
|
|
998
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
999
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1000
|
+
_files: Dict[
|
|
1001
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1002
|
+
] = {}
|
|
1003
|
+
_body_params: Optional[bytes] = None
|
|
1004
|
+
|
|
1005
|
+
# process the path parameters
|
|
1006
|
+
# process the query parameters
|
|
1007
|
+
if environment is not None:
|
|
1008
|
+
|
|
1009
|
+
_query_params.append(('environment', environment))
|
|
1010
|
+
|
|
1011
|
+
if merchant_account_id is not None:
|
|
1012
|
+
|
|
1013
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1014
|
+
|
|
1015
|
+
# process the header parameters
|
|
1016
|
+
if idempotency_key is not None:
|
|
1017
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
1018
|
+
# process the form parameters
|
|
1019
|
+
# process the body parameter
|
|
1020
|
+
if webhook_deliveries_dispatch_request is not None:
|
|
1021
|
+
_body_params = webhook_deliveries_dispatch_request
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
# set the HTTP header `Accept`
|
|
1025
|
+
if 'Accept' not in _header_params:
|
|
1026
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1027
|
+
[
|
|
1028
|
+
'application/json'
|
|
1029
|
+
]
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
# set the HTTP header `Content-Type`
|
|
1033
|
+
if _content_type:
|
|
1034
|
+
_header_params['Content-Type'] = _content_type
|
|
1035
|
+
else:
|
|
1036
|
+
_default_content_type = (
|
|
1037
|
+
self.api_client.select_header_content_type(
|
|
1038
|
+
[
|
|
1039
|
+
'application/json'
|
|
1040
|
+
]
|
|
1041
|
+
)
|
|
1042
|
+
)
|
|
1043
|
+
if _default_content_type is not None:
|
|
1044
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1045
|
+
|
|
1046
|
+
# authentication setting
|
|
1047
|
+
_auth_settings: List[str] = [
|
|
1048
|
+
'api-key'
|
|
1049
|
+
]
|
|
1050
|
+
|
|
1051
|
+
return self.api_client.param_serialize(
|
|
1052
|
+
method='POST',
|
|
1053
|
+
resource_path='/v1/webhook-deliveries/dispatch',
|
|
1054
|
+
path_params=_path_params,
|
|
1055
|
+
query_params=_query_params,
|
|
1056
|
+
header_params=_header_params,
|
|
1057
|
+
body=_body_params,
|
|
1058
|
+
post_params=_form_params,
|
|
1059
|
+
files=_files,
|
|
1060
|
+
auth_settings=_auth_settings,
|
|
1061
|
+
collection_formats=_collection_formats,
|
|
1062
|
+
_host=_host,
|
|
1063
|
+
_request_auth=_request_auth
|
|
1064
|
+
)
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
@validate_call
|
|
1070
|
+
def get_webhook_delivery(
|
|
1071
|
+
self,
|
|
1072
|
+
delivery_id: StrictStr,
|
|
1073
|
+
environment: StrictStr,
|
|
1074
|
+
merchant_account_id: StrictStr,
|
|
1075
|
+
_request_timeout: Union[
|
|
1076
|
+
None,
|
|
1077
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1078
|
+
Tuple[
|
|
1079
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1080
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1081
|
+
]
|
|
1082
|
+
] = None,
|
|
1083
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1084
|
+
_content_type: Optional[StrictStr] = None,
|
|
1085
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1086
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1087
|
+
) -> ApiWriteEnvelope:
|
|
1088
|
+
"""Inspect an outbound webhook delivery
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
:param delivery_id: (required)
|
|
1092
|
+
:type delivery_id: str
|
|
1093
|
+
:param environment: (required)
|
|
1094
|
+
:type environment: str
|
|
1095
|
+
:param merchant_account_id: (required)
|
|
1096
|
+
:type merchant_account_id: str
|
|
1097
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1098
|
+
number provided, it will be total request
|
|
1099
|
+
timeout. It can also be a pair (tuple) of
|
|
1100
|
+
(connection, read) timeouts.
|
|
1101
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1102
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1103
|
+
request; this effectively ignores the
|
|
1104
|
+
authentication in the spec for a single request.
|
|
1105
|
+
:type _request_auth: dict, optional
|
|
1106
|
+
:param _content_type: force content-type for the request.
|
|
1107
|
+
:type _content_type: str, Optional
|
|
1108
|
+
:param _headers: set to override the headers for a single
|
|
1109
|
+
request; this effectively ignores the headers
|
|
1110
|
+
in the spec for a single request.
|
|
1111
|
+
:type _headers: dict, optional
|
|
1112
|
+
:param _host_index: set to override the host_index for a single
|
|
1113
|
+
request; this effectively ignores the host_index
|
|
1114
|
+
in the spec for a single request.
|
|
1115
|
+
:type _host_index: int, optional
|
|
1116
|
+
:return: Returns the result object.
|
|
1117
|
+
""" # noqa: E501
|
|
1118
|
+
|
|
1119
|
+
_param = self._get_webhook_delivery_serialize(
|
|
1120
|
+
delivery_id=delivery_id,
|
|
1121
|
+
environment=environment,
|
|
1122
|
+
merchant_account_id=merchant_account_id,
|
|
1123
|
+
_request_auth=_request_auth,
|
|
1124
|
+
_content_type=_content_type,
|
|
1125
|
+
_headers=_headers,
|
|
1126
|
+
_host_index=_host_index
|
|
1127
|
+
)
|
|
1128
|
+
|
|
1129
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1130
|
+
'200': "ApiWriteEnvelope",
|
|
1131
|
+
'400': "ApiError",
|
|
1132
|
+
'401': "ApiError",
|
|
1133
|
+
'409': "ApiError",
|
|
1134
|
+
'422': "ApiError",
|
|
1135
|
+
'429': "ApiError",
|
|
1136
|
+
}
|
|
1137
|
+
response_data = self.api_client.call_api(
|
|
1138
|
+
*_param,
|
|
1139
|
+
_request_timeout=_request_timeout
|
|
1140
|
+
)
|
|
1141
|
+
response_data.read()
|
|
1142
|
+
return self.api_client.response_deserialize(
|
|
1143
|
+
response_data=response_data,
|
|
1144
|
+
response_types_map=_response_types_map,
|
|
1145
|
+
).data
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
@validate_call
|
|
1149
|
+
def get_webhook_delivery_with_http_info(
|
|
1150
|
+
self,
|
|
1151
|
+
delivery_id: StrictStr,
|
|
1152
|
+
environment: StrictStr,
|
|
1153
|
+
merchant_account_id: StrictStr,
|
|
1154
|
+
_request_timeout: Union[
|
|
1155
|
+
None,
|
|
1156
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1157
|
+
Tuple[
|
|
1158
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1159
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1160
|
+
]
|
|
1161
|
+
] = None,
|
|
1162
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1163
|
+
_content_type: Optional[StrictStr] = None,
|
|
1164
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1165
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1166
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1167
|
+
"""Inspect an outbound webhook delivery
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
:param delivery_id: (required)
|
|
1171
|
+
:type delivery_id: str
|
|
1172
|
+
:param environment: (required)
|
|
1173
|
+
:type environment: str
|
|
1174
|
+
:param merchant_account_id: (required)
|
|
1175
|
+
:type merchant_account_id: str
|
|
1176
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1177
|
+
number provided, it will be total request
|
|
1178
|
+
timeout. It can also be a pair (tuple) of
|
|
1179
|
+
(connection, read) timeouts.
|
|
1180
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1181
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1182
|
+
request; this effectively ignores the
|
|
1183
|
+
authentication in the spec for a single request.
|
|
1184
|
+
:type _request_auth: dict, optional
|
|
1185
|
+
:param _content_type: force content-type for the request.
|
|
1186
|
+
:type _content_type: str, Optional
|
|
1187
|
+
:param _headers: set to override the headers for a single
|
|
1188
|
+
request; this effectively ignores the headers
|
|
1189
|
+
in the spec for a single request.
|
|
1190
|
+
:type _headers: dict, optional
|
|
1191
|
+
:param _host_index: set to override the host_index for a single
|
|
1192
|
+
request; this effectively ignores the host_index
|
|
1193
|
+
in the spec for a single request.
|
|
1194
|
+
:type _host_index: int, optional
|
|
1195
|
+
:return: Returns the result object.
|
|
1196
|
+
""" # noqa: E501
|
|
1197
|
+
|
|
1198
|
+
_param = self._get_webhook_delivery_serialize(
|
|
1199
|
+
delivery_id=delivery_id,
|
|
1200
|
+
environment=environment,
|
|
1201
|
+
merchant_account_id=merchant_account_id,
|
|
1202
|
+
_request_auth=_request_auth,
|
|
1203
|
+
_content_type=_content_type,
|
|
1204
|
+
_headers=_headers,
|
|
1205
|
+
_host_index=_host_index
|
|
1206
|
+
)
|
|
1207
|
+
|
|
1208
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1209
|
+
'200': "ApiWriteEnvelope",
|
|
1210
|
+
'400': "ApiError",
|
|
1211
|
+
'401': "ApiError",
|
|
1212
|
+
'409': "ApiError",
|
|
1213
|
+
'422': "ApiError",
|
|
1214
|
+
'429': "ApiError",
|
|
1215
|
+
}
|
|
1216
|
+
response_data = self.api_client.call_api(
|
|
1217
|
+
*_param,
|
|
1218
|
+
_request_timeout=_request_timeout
|
|
1219
|
+
)
|
|
1220
|
+
response_data.read()
|
|
1221
|
+
return self.api_client.response_deserialize(
|
|
1222
|
+
response_data=response_data,
|
|
1223
|
+
response_types_map=_response_types_map,
|
|
1224
|
+
)
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
@validate_call
|
|
1228
|
+
def get_webhook_delivery_without_preload_content(
|
|
1229
|
+
self,
|
|
1230
|
+
delivery_id: StrictStr,
|
|
1231
|
+
environment: StrictStr,
|
|
1232
|
+
merchant_account_id: StrictStr,
|
|
1233
|
+
_request_timeout: Union[
|
|
1234
|
+
None,
|
|
1235
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1236
|
+
Tuple[
|
|
1237
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1238
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1239
|
+
]
|
|
1240
|
+
] = None,
|
|
1241
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1242
|
+
_content_type: Optional[StrictStr] = None,
|
|
1243
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1244
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1245
|
+
) -> RESTResponseType:
|
|
1246
|
+
"""Inspect an outbound webhook delivery
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
:param delivery_id: (required)
|
|
1250
|
+
:type delivery_id: str
|
|
1251
|
+
:param environment: (required)
|
|
1252
|
+
:type environment: str
|
|
1253
|
+
:param merchant_account_id: (required)
|
|
1254
|
+
:type merchant_account_id: str
|
|
1255
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1256
|
+
number provided, it will be total request
|
|
1257
|
+
timeout. It can also be a pair (tuple) of
|
|
1258
|
+
(connection, read) timeouts.
|
|
1259
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1260
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1261
|
+
request; this effectively ignores the
|
|
1262
|
+
authentication in the spec for a single request.
|
|
1263
|
+
:type _request_auth: dict, optional
|
|
1264
|
+
:param _content_type: force content-type for the request.
|
|
1265
|
+
:type _content_type: str, Optional
|
|
1266
|
+
:param _headers: set to override the headers for a single
|
|
1267
|
+
request; this effectively ignores the headers
|
|
1268
|
+
in the spec for a single request.
|
|
1269
|
+
:type _headers: dict, optional
|
|
1270
|
+
:param _host_index: set to override the host_index for a single
|
|
1271
|
+
request; this effectively ignores the host_index
|
|
1272
|
+
in the spec for a single request.
|
|
1273
|
+
:type _host_index: int, optional
|
|
1274
|
+
:return: Returns the result object.
|
|
1275
|
+
""" # noqa: E501
|
|
1276
|
+
|
|
1277
|
+
_param = self._get_webhook_delivery_serialize(
|
|
1278
|
+
delivery_id=delivery_id,
|
|
1279
|
+
environment=environment,
|
|
1280
|
+
merchant_account_id=merchant_account_id,
|
|
1281
|
+
_request_auth=_request_auth,
|
|
1282
|
+
_content_type=_content_type,
|
|
1283
|
+
_headers=_headers,
|
|
1284
|
+
_host_index=_host_index
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1288
|
+
'200': "ApiWriteEnvelope",
|
|
1289
|
+
'400': "ApiError",
|
|
1290
|
+
'401': "ApiError",
|
|
1291
|
+
'409': "ApiError",
|
|
1292
|
+
'422': "ApiError",
|
|
1293
|
+
'429': "ApiError",
|
|
1294
|
+
}
|
|
1295
|
+
response_data = self.api_client.call_api(
|
|
1296
|
+
*_param,
|
|
1297
|
+
_request_timeout=_request_timeout
|
|
1298
|
+
)
|
|
1299
|
+
return response_data.response
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
def _get_webhook_delivery_serialize(
|
|
1303
|
+
self,
|
|
1304
|
+
delivery_id,
|
|
1305
|
+
environment,
|
|
1306
|
+
merchant_account_id,
|
|
1307
|
+
_request_auth,
|
|
1308
|
+
_content_type,
|
|
1309
|
+
_headers,
|
|
1310
|
+
_host_index,
|
|
1311
|
+
) -> RequestSerialized:
|
|
1312
|
+
|
|
1313
|
+
_host = None
|
|
1314
|
+
|
|
1315
|
+
_collection_formats: Dict[str, str] = {
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
_path_params: Dict[str, str] = {}
|
|
1319
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1320
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1321
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1322
|
+
_files: Dict[
|
|
1323
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1324
|
+
] = {}
|
|
1325
|
+
_body_params: Optional[bytes] = None
|
|
1326
|
+
|
|
1327
|
+
# process the path parameters
|
|
1328
|
+
if delivery_id is not None:
|
|
1329
|
+
_path_params['deliveryId'] = delivery_id
|
|
1330
|
+
# process the query parameters
|
|
1331
|
+
if environment is not None:
|
|
1332
|
+
|
|
1333
|
+
_query_params.append(('environment', environment))
|
|
1334
|
+
|
|
1335
|
+
if merchant_account_id is not None:
|
|
1336
|
+
|
|
1337
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1338
|
+
|
|
1339
|
+
# process the header parameters
|
|
1340
|
+
# process the form parameters
|
|
1341
|
+
# process the body parameter
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
# set the HTTP header `Accept`
|
|
1345
|
+
if 'Accept' not in _header_params:
|
|
1346
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1347
|
+
[
|
|
1348
|
+
'application/json'
|
|
1349
|
+
]
|
|
1350
|
+
)
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
# authentication setting
|
|
1354
|
+
_auth_settings: List[str] = [
|
|
1355
|
+
'api-key'
|
|
1356
|
+
]
|
|
1357
|
+
|
|
1358
|
+
return self.api_client.param_serialize(
|
|
1359
|
+
method='GET',
|
|
1360
|
+
resource_path='/v1/webhook-deliveries/{deliveryId}',
|
|
1361
|
+
path_params=_path_params,
|
|
1362
|
+
query_params=_query_params,
|
|
1363
|
+
header_params=_header_params,
|
|
1364
|
+
body=_body_params,
|
|
1365
|
+
post_params=_form_params,
|
|
1366
|
+
files=_files,
|
|
1367
|
+
auth_settings=_auth_settings,
|
|
1368
|
+
collection_formats=_collection_formats,
|
|
1369
|
+
_host=_host,
|
|
1370
|
+
_request_auth=_request_auth
|
|
1371
|
+
)
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
@validate_call
|
|
1377
|
+
def get_webhook_event(
|
|
1378
|
+
self,
|
|
1379
|
+
event_id: StrictStr,
|
|
1380
|
+
environment: StrictStr,
|
|
1381
|
+
merchant_account_id: StrictStr,
|
|
1382
|
+
_request_timeout: Union[
|
|
1383
|
+
None,
|
|
1384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1385
|
+
Tuple[
|
|
1386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1387
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1388
|
+
]
|
|
1389
|
+
] = None,
|
|
1390
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1391
|
+
_content_type: Optional[StrictStr] = None,
|
|
1392
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1393
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1394
|
+
) -> ApiWriteEnvelope:
|
|
1395
|
+
"""Inspect an outbound webhook event
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
:param event_id: (required)
|
|
1399
|
+
:type event_id: str
|
|
1400
|
+
:param environment: (required)
|
|
1401
|
+
:type environment: str
|
|
1402
|
+
:param merchant_account_id: (required)
|
|
1403
|
+
:type merchant_account_id: str
|
|
1404
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1405
|
+
number provided, it will be total request
|
|
1406
|
+
timeout. It can also be a pair (tuple) of
|
|
1407
|
+
(connection, read) timeouts.
|
|
1408
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1409
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1410
|
+
request; this effectively ignores the
|
|
1411
|
+
authentication in the spec for a single request.
|
|
1412
|
+
:type _request_auth: dict, optional
|
|
1413
|
+
:param _content_type: force content-type for the request.
|
|
1414
|
+
:type _content_type: str, Optional
|
|
1415
|
+
:param _headers: set to override the headers for a single
|
|
1416
|
+
request; this effectively ignores the headers
|
|
1417
|
+
in the spec for a single request.
|
|
1418
|
+
:type _headers: dict, optional
|
|
1419
|
+
:param _host_index: set to override the host_index for a single
|
|
1420
|
+
request; this effectively ignores the host_index
|
|
1421
|
+
in the spec for a single request.
|
|
1422
|
+
:type _host_index: int, optional
|
|
1423
|
+
:return: Returns the result object.
|
|
1424
|
+
""" # noqa: E501
|
|
1425
|
+
|
|
1426
|
+
_param = self._get_webhook_event_serialize(
|
|
1427
|
+
event_id=event_id,
|
|
1428
|
+
environment=environment,
|
|
1429
|
+
merchant_account_id=merchant_account_id,
|
|
1430
|
+
_request_auth=_request_auth,
|
|
1431
|
+
_content_type=_content_type,
|
|
1432
|
+
_headers=_headers,
|
|
1433
|
+
_host_index=_host_index
|
|
1434
|
+
)
|
|
1435
|
+
|
|
1436
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1437
|
+
'200': "ApiWriteEnvelope",
|
|
1438
|
+
'400': "ApiError",
|
|
1439
|
+
'401': "ApiError",
|
|
1440
|
+
'409': "ApiError",
|
|
1441
|
+
'422': "ApiError",
|
|
1442
|
+
'429': "ApiError",
|
|
1443
|
+
}
|
|
1444
|
+
response_data = self.api_client.call_api(
|
|
1445
|
+
*_param,
|
|
1446
|
+
_request_timeout=_request_timeout
|
|
1447
|
+
)
|
|
1448
|
+
response_data.read()
|
|
1449
|
+
return self.api_client.response_deserialize(
|
|
1450
|
+
response_data=response_data,
|
|
1451
|
+
response_types_map=_response_types_map,
|
|
1452
|
+
).data
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
@validate_call
|
|
1456
|
+
def get_webhook_event_with_http_info(
|
|
1457
|
+
self,
|
|
1458
|
+
event_id: StrictStr,
|
|
1459
|
+
environment: StrictStr,
|
|
1460
|
+
merchant_account_id: StrictStr,
|
|
1461
|
+
_request_timeout: Union[
|
|
1462
|
+
None,
|
|
1463
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1464
|
+
Tuple[
|
|
1465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1466
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1467
|
+
]
|
|
1468
|
+
] = None,
|
|
1469
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1470
|
+
_content_type: Optional[StrictStr] = None,
|
|
1471
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1472
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1473
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1474
|
+
"""Inspect an outbound webhook event
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
:param event_id: (required)
|
|
1478
|
+
:type event_id: str
|
|
1479
|
+
:param environment: (required)
|
|
1480
|
+
:type environment: str
|
|
1481
|
+
:param merchant_account_id: (required)
|
|
1482
|
+
:type merchant_account_id: str
|
|
1483
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1484
|
+
number provided, it will be total request
|
|
1485
|
+
timeout. It can also be a pair (tuple) of
|
|
1486
|
+
(connection, read) timeouts.
|
|
1487
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1488
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1489
|
+
request; this effectively ignores the
|
|
1490
|
+
authentication in the spec for a single request.
|
|
1491
|
+
:type _request_auth: dict, optional
|
|
1492
|
+
:param _content_type: force content-type for the request.
|
|
1493
|
+
:type _content_type: str, Optional
|
|
1494
|
+
:param _headers: set to override the headers for a single
|
|
1495
|
+
request; this effectively ignores the headers
|
|
1496
|
+
in the spec for a single request.
|
|
1497
|
+
:type _headers: dict, optional
|
|
1498
|
+
:param _host_index: set to override the host_index for a single
|
|
1499
|
+
request; this effectively ignores the host_index
|
|
1500
|
+
in the spec for a single request.
|
|
1501
|
+
:type _host_index: int, optional
|
|
1502
|
+
:return: Returns the result object.
|
|
1503
|
+
""" # noqa: E501
|
|
1504
|
+
|
|
1505
|
+
_param = self._get_webhook_event_serialize(
|
|
1506
|
+
event_id=event_id,
|
|
1507
|
+
environment=environment,
|
|
1508
|
+
merchant_account_id=merchant_account_id,
|
|
1509
|
+
_request_auth=_request_auth,
|
|
1510
|
+
_content_type=_content_type,
|
|
1511
|
+
_headers=_headers,
|
|
1512
|
+
_host_index=_host_index
|
|
1513
|
+
)
|
|
1514
|
+
|
|
1515
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1516
|
+
'200': "ApiWriteEnvelope",
|
|
1517
|
+
'400': "ApiError",
|
|
1518
|
+
'401': "ApiError",
|
|
1519
|
+
'409': "ApiError",
|
|
1520
|
+
'422': "ApiError",
|
|
1521
|
+
'429': "ApiError",
|
|
1522
|
+
}
|
|
1523
|
+
response_data = self.api_client.call_api(
|
|
1524
|
+
*_param,
|
|
1525
|
+
_request_timeout=_request_timeout
|
|
1526
|
+
)
|
|
1527
|
+
response_data.read()
|
|
1528
|
+
return self.api_client.response_deserialize(
|
|
1529
|
+
response_data=response_data,
|
|
1530
|
+
response_types_map=_response_types_map,
|
|
1531
|
+
)
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
@validate_call
|
|
1535
|
+
def get_webhook_event_without_preload_content(
|
|
1536
|
+
self,
|
|
1537
|
+
event_id: StrictStr,
|
|
1538
|
+
environment: StrictStr,
|
|
1539
|
+
merchant_account_id: StrictStr,
|
|
1540
|
+
_request_timeout: Union[
|
|
1541
|
+
None,
|
|
1542
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1543
|
+
Tuple[
|
|
1544
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1545
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1546
|
+
]
|
|
1547
|
+
] = None,
|
|
1548
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1549
|
+
_content_type: Optional[StrictStr] = None,
|
|
1550
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1551
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1552
|
+
) -> RESTResponseType:
|
|
1553
|
+
"""Inspect an outbound webhook event
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
:param event_id: (required)
|
|
1557
|
+
:type event_id: str
|
|
1558
|
+
:param environment: (required)
|
|
1559
|
+
:type environment: str
|
|
1560
|
+
:param merchant_account_id: (required)
|
|
1561
|
+
:type merchant_account_id: str
|
|
1562
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1563
|
+
number provided, it will be total request
|
|
1564
|
+
timeout. It can also be a pair (tuple) of
|
|
1565
|
+
(connection, read) timeouts.
|
|
1566
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1567
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1568
|
+
request; this effectively ignores the
|
|
1569
|
+
authentication in the spec for a single request.
|
|
1570
|
+
:type _request_auth: dict, optional
|
|
1571
|
+
:param _content_type: force content-type for the request.
|
|
1572
|
+
:type _content_type: str, Optional
|
|
1573
|
+
:param _headers: set to override the headers for a single
|
|
1574
|
+
request; this effectively ignores the headers
|
|
1575
|
+
in the spec for a single request.
|
|
1576
|
+
:type _headers: dict, optional
|
|
1577
|
+
:param _host_index: set to override the host_index for a single
|
|
1578
|
+
request; this effectively ignores the host_index
|
|
1579
|
+
in the spec for a single request.
|
|
1580
|
+
:type _host_index: int, optional
|
|
1581
|
+
:return: Returns the result object.
|
|
1582
|
+
""" # noqa: E501
|
|
1583
|
+
|
|
1584
|
+
_param = self._get_webhook_event_serialize(
|
|
1585
|
+
event_id=event_id,
|
|
1586
|
+
environment=environment,
|
|
1587
|
+
merchant_account_id=merchant_account_id,
|
|
1588
|
+
_request_auth=_request_auth,
|
|
1589
|
+
_content_type=_content_type,
|
|
1590
|
+
_headers=_headers,
|
|
1591
|
+
_host_index=_host_index
|
|
1592
|
+
)
|
|
1593
|
+
|
|
1594
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1595
|
+
'200': "ApiWriteEnvelope",
|
|
1596
|
+
'400': "ApiError",
|
|
1597
|
+
'401': "ApiError",
|
|
1598
|
+
'409': "ApiError",
|
|
1599
|
+
'422': "ApiError",
|
|
1600
|
+
'429': "ApiError",
|
|
1601
|
+
}
|
|
1602
|
+
response_data = self.api_client.call_api(
|
|
1603
|
+
*_param,
|
|
1604
|
+
_request_timeout=_request_timeout
|
|
1605
|
+
)
|
|
1606
|
+
return response_data.response
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
def _get_webhook_event_serialize(
|
|
1610
|
+
self,
|
|
1611
|
+
event_id,
|
|
1612
|
+
environment,
|
|
1613
|
+
merchant_account_id,
|
|
1614
|
+
_request_auth,
|
|
1615
|
+
_content_type,
|
|
1616
|
+
_headers,
|
|
1617
|
+
_host_index,
|
|
1618
|
+
) -> RequestSerialized:
|
|
1619
|
+
|
|
1620
|
+
_host = None
|
|
1621
|
+
|
|
1622
|
+
_collection_formats: Dict[str, str] = {
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
_path_params: Dict[str, str] = {}
|
|
1626
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1627
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1628
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1629
|
+
_files: Dict[
|
|
1630
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1631
|
+
] = {}
|
|
1632
|
+
_body_params: Optional[bytes] = None
|
|
1633
|
+
|
|
1634
|
+
# process the path parameters
|
|
1635
|
+
if event_id is not None:
|
|
1636
|
+
_path_params['eventId'] = event_id
|
|
1637
|
+
# process the query parameters
|
|
1638
|
+
if environment is not None:
|
|
1639
|
+
|
|
1640
|
+
_query_params.append(('environment', environment))
|
|
1641
|
+
|
|
1642
|
+
if merchant_account_id is not None:
|
|
1643
|
+
|
|
1644
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1645
|
+
|
|
1646
|
+
# process the header parameters
|
|
1647
|
+
# process the form parameters
|
|
1648
|
+
# process the body parameter
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
# set the HTTP header `Accept`
|
|
1652
|
+
if 'Accept' not in _header_params:
|
|
1653
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1654
|
+
[
|
|
1655
|
+
'application/json'
|
|
1656
|
+
]
|
|
1657
|
+
)
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
# authentication setting
|
|
1661
|
+
_auth_settings: List[str] = [
|
|
1662
|
+
'api-key'
|
|
1663
|
+
]
|
|
1664
|
+
|
|
1665
|
+
return self.api_client.param_serialize(
|
|
1666
|
+
method='GET',
|
|
1667
|
+
resource_path='/v1/events/{eventId}',
|
|
1668
|
+
path_params=_path_params,
|
|
1669
|
+
query_params=_query_params,
|
|
1670
|
+
header_params=_header_params,
|
|
1671
|
+
body=_body_params,
|
|
1672
|
+
post_params=_form_params,
|
|
1673
|
+
files=_files,
|
|
1674
|
+
auth_settings=_auth_settings,
|
|
1675
|
+
collection_formats=_collection_formats,
|
|
1676
|
+
_host=_host,
|
|
1677
|
+
_request_auth=_request_auth
|
|
1678
|
+
)
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
@validate_call
|
|
1684
|
+
def list_webhook_deliveries(
|
|
1685
|
+
self,
|
|
1686
|
+
environment: StrictStr,
|
|
1687
|
+
merchant_account_id: StrictStr,
|
|
1688
|
+
_request_timeout: Union[
|
|
1689
|
+
None,
|
|
1690
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1691
|
+
Tuple[
|
|
1692
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1693
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1694
|
+
]
|
|
1695
|
+
] = None,
|
|
1696
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1697
|
+
_content_type: Optional[StrictStr] = None,
|
|
1698
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1699
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1700
|
+
) -> ApiWriteEnvelope:
|
|
1701
|
+
"""List outbound webhook deliveries
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
:param environment: (required)
|
|
1705
|
+
:type environment: str
|
|
1706
|
+
:param merchant_account_id: (required)
|
|
1707
|
+
:type merchant_account_id: str
|
|
1708
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1709
|
+
number provided, it will be total request
|
|
1710
|
+
timeout. It can also be a pair (tuple) of
|
|
1711
|
+
(connection, read) timeouts.
|
|
1712
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1713
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1714
|
+
request; this effectively ignores the
|
|
1715
|
+
authentication in the spec for a single request.
|
|
1716
|
+
:type _request_auth: dict, optional
|
|
1717
|
+
:param _content_type: force content-type for the request.
|
|
1718
|
+
:type _content_type: str, Optional
|
|
1719
|
+
:param _headers: set to override the headers for a single
|
|
1720
|
+
request; this effectively ignores the headers
|
|
1721
|
+
in the spec for a single request.
|
|
1722
|
+
:type _headers: dict, optional
|
|
1723
|
+
:param _host_index: set to override the host_index for a single
|
|
1724
|
+
request; this effectively ignores the host_index
|
|
1725
|
+
in the spec for a single request.
|
|
1726
|
+
:type _host_index: int, optional
|
|
1727
|
+
:return: Returns the result object.
|
|
1728
|
+
""" # noqa: E501
|
|
1729
|
+
|
|
1730
|
+
_param = self._list_webhook_deliveries_serialize(
|
|
1731
|
+
environment=environment,
|
|
1732
|
+
merchant_account_id=merchant_account_id,
|
|
1733
|
+
_request_auth=_request_auth,
|
|
1734
|
+
_content_type=_content_type,
|
|
1735
|
+
_headers=_headers,
|
|
1736
|
+
_host_index=_host_index
|
|
1737
|
+
)
|
|
1738
|
+
|
|
1739
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1740
|
+
'200': "ApiWriteEnvelope",
|
|
1741
|
+
'400': "ApiError",
|
|
1742
|
+
'401': "ApiError",
|
|
1743
|
+
'409': "ApiError",
|
|
1744
|
+
'422': "ApiError",
|
|
1745
|
+
'429': "ApiError",
|
|
1746
|
+
}
|
|
1747
|
+
response_data = self.api_client.call_api(
|
|
1748
|
+
*_param,
|
|
1749
|
+
_request_timeout=_request_timeout
|
|
1750
|
+
)
|
|
1751
|
+
response_data.read()
|
|
1752
|
+
return self.api_client.response_deserialize(
|
|
1753
|
+
response_data=response_data,
|
|
1754
|
+
response_types_map=_response_types_map,
|
|
1755
|
+
).data
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
@validate_call
|
|
1759
|
+
def list_webhook_deliveries_with_http_info(
|
|
1760
|
+
self,
|
|
1761
|
+
environment: StrictStr,
|
|
1762
|
+
merchant_account_id: StrictStr,
|
|
1763
|
+
_request_timeout: Union[
|
|
1764
|
+
None,
|
|
1765
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1766
|
+
Tuple[
|
|
1767
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1768
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1769
|
+
]
|
|
1770
|
+
] = None,
|
|
1771
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1772
|
+
_content_type: Optional[StrictStr] = None,
|
|
1773
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1774
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1775
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
1776
|
+
"""List outbound webhook deliveries
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
:param environment: (required)
|
|
1780
|
+
:type environment: str
|
|
1781
|
+
:param merchant_account_id: (required)
|
|
1782
|
+
:type merchant_account_id: str
|
|
1783
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1784
|
+
number provided, it will be total request
|
|
1785
|
+
timeout. It can also be a pair (tuple) of
|
|
1786
|
+
(connection, read) timeouts.
|
|
1787
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1788
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1789
|
+
request; this effectively ignores the
|
|
1790
|
+
authentication in the spec for a single request.
|
|
1791
|
+
:type _request_auth: dict, optional
|
|
1792
|
+
:param _content_type: force content-type for the request.
|
|
1793
|
+
:type _content_type: str, Optional
|
|
1794
|
+
:param _headers: set to override the headers for a single
|
|
1795
|
+
request; this effectively ignores the headers
|
|
1796
|
+
in the spec for a single request.
|
|
1797
|
+
:type _headers: dict, optional
|
|
1798
|
+
:param _host_index: set to override the host_index for a single
|
|
1799
|
+
request; this effectively ignores the host_index
|
|
1800
|
+
in the spec for a single request.
|
|
1801
|
+
:type _host_index: int, optional
|
|
1802
|
+
:return: Returns the result object.
|
|
1803
|
+
""" # noqa: E501
|
|
1804
|
+
|
|
1805
|
+
_param = self._list_webhook_deliveries_serialize(
|
|
1806
|
+
environment=environment,
|
|
1807
|
+
merchant_account_id=merchant_account_id,
|
|
1808
|
+
_request_auth=_request_auth,
|
|
1809
|
+
_content_type=_content_type,
|
|
1810
|
+
_headers=_headers,
|
|
1811
|
+
_host_index=_host_index
|
|
1812
|
+
)
|
|
1813
|
+
|
|
1814
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1815
|
+
'200': "ApiWriteEnvelope",
|
|
1816
|
+
'400': "ApiError",
|
|
1817
|
+
'401': "ApiError",
|
|
1818
|
+
'409': "ApiError",
|
|
1819
|
+
'422': "ApiError",
|
|
1820
|
+
'429': "ApiError",
|
|
1821
|
+
}
|
|
1822
|
+
response_data = self.api_client.call_api(
|
|
1823
|
+
*_param,
|
|
1824
|
+
_request_timeout=_request_timeout
|
|
1825
|
+
)
|
|
1826
|
+
response_data.read()
|
|
1827
|
+
return self.api_client.response_deserialize(
|
|
1828
|
+
response_data=response_data,
|
|
1829
|
+
response_types_map=_response_types_map,
|
|
1830
|
+
)
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
@validate_call
|
|
1834
|
+
def list_webhook_deliveries_without_preload_content(
|
|
1835
|
+
self,
|
|
1836
|
+
environment: StrictStr,
|
|
1837
|
+
merchant_account_id: StrictStr,
|
|
1838
|
+
_request_timeout: Union[
|
|
1839
|
+
None,
|
|
1840
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1841
|
+
Tuple[
|
|
1842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1843
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1844
|
+
]
|
|
1845
|
+
] = None,
|
|
1846
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1847
|
+
_content_type: Optional[StrictStr] = None,
|
|
1848
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1849
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1850
|
+
) -> RESTResponseType:
|
|
1851
|
+
"""List outbound webhook deliveries
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
:param environment: (required)
|
|
1855
|
+
:type environment: str
|
|
1856
|
+
:param merchant_account_id: (required)
|
|
1857
|
+
:type merchant_account_id: str
|
|
1858
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1859
|
+
number provided, it will be total request
|
|
1860
|
+
timeout. It can also be a pair (tuple) of
|
|
1861
|
+
(connection, read) timeouts.
|
|
1862
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1863
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1864
|
+
request; this effectively ignores the
|
|
1865
|
+
authentication in the spec for a single request.
|
|
1866
|
+
:type _request_auth: dict, optional
|
|
1867
|
+
:param _content_type: force content-type for the request.
|
|
1868
|
+
:type _content_type: str, Optional
|
|
1869
|
+
:param _headers: set to override the headers for a single
|
|
1870
|
+
request; this effectively ignores the headers
|
|
1871
|
+
in the spec for a single request.
|
|
1872
|
+
:type _headers: dict, optional
|
|
1873
|
+
:param _host_index: set to override the host_index for a single
|
|
1874
|
+
request; this effectively ignores the host_index
|
|
1875
|
+
in the spec for a single request.
|
|
1876
|
+
:type _host_index: int, optional
|
|
1877
|
+
:return: Returns the result object.
|
|
1878
|
+
""" # noqa: E501
|
|
1879
|
+
|
|
1880
|
+
_param = self._list_webhook_deliveries_serialize(
|
|
1881
|
+
environment=environment,
|
|
1882
|
+
merchant_account_id=merchant_account_id,
|
|
1883
|
+
_request_auth=_request_auth,
|
|
1884
|
+
_content_type=_content_type,
|
|
1885
|
+
_headers=_headers,
|
|
1886
|
+
_host_index=_host_index
|
|
1887
|
+
)
|
|
1888
|
+
|
|
1889
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1890
|
+
'200': "ApiWriteEnvelope",
|
|
1891
|
+
'400': "ApiError",
|
|
1892
|
+
'401': "ApiError",
|
|
1893
|
+
'409': "ApiError",
|
|
1894
|
+
'422': "ApiError",
|
|
1895
|
+
'429': "ApiError",
|
|
1896
|
+
}
|
|
1897
|
+
response_data = self.api_client.call_api(
|
|
1898
|
+
*_param,
|
|
1899
|
+
_request_timeout=_request_timeout
|
|
1900
|
+
)
|
|
1901
|
+
return response_data.response
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
def _list_webhook_deliveries_serialize(
|
|
1905
|
+
self,
|
|
1906
|
+
environment,
|
|
1907
|
+
merchant_account_id,
|
|
1908
|
+
_request_auth,
|
|
1909
|
+
_content_type,
|
|
1910
|
+
_headers,
|
|
1911
|
+
_host_index,
|
|
1912
|
+
) -> RequestSerialized:
|
|
1913
|
+
|
|
1914
|
+
_host = None
|
|
1915
|
+
|
|
1916
|
+
_collection_formats: Dict[str, str] = {
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
_path_params: Dict[str, str] = {}
|
|
1920
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1921
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1922
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1923
|
+
_files: Dict[
|
|
1924
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1925
|
+
] = {}
|
|
1926
|
+
_body_params: Optional[bytes] = None
|
|
1927
|
+
|
|
1928
|
+
# process the path parameters
|
|
1929
|
+
# process the query parameters
|
|
1930
|
+
if environment is not None:
|
|
1931
|
+
|
|
1932
|
+
_query_params.append(('environment', environment))
|
|
1933
|
+
|
|
1934
|
+
if merchant_account_id is not None:
|
|
1935
|
+
|
|
1936
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
1937
|
+
|
|
1938
|
+
# process the header parameters
|
|
1939
|
+
# process the form parameters
|
|
1940
|
+
# process the body parameter
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
# set the HTTP header `Accept`
|
|
1944
|
+
if 'Accept' not in _header_params:
|
|
1945
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1946
|
+
[
|
|
1947
|
+
'application/json'
|
|
1948
|
+
]
|
|
1949
|
+
)
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
# authentication setting
|
|
1953
|
+
_auth_settings: List[str] = [
|
|
1954
|
+
'api-key'
|
|
1955
|
+
]
|
|
1956
|
+
|
|
1957
|
+
return self.api_client.param_serialize(
|
|
1958
|
+
method='GET',
|
|
1959
|
+
resource_path='/v1/webhook-deliveries',
|
|
1960
|
+
path_params=_path_params,
|
|
1961
|
+
query_params=_query_params,
|
|
1962
|
+
header_params=_header_params,
|
|
1963
|
+
body=_body_params,
|
|
1964
|
+
post_params=_form_params,
|
|
1965
|
+
files=_files,
|
|
1966
|
+
auth_settings=_auth_settings,
|
|
1967
|
+
collection_formats=_collection_formats,
|
|
1968
|
+
_host=_host,
|
|
1969
|
+
_request_auth=_request_auth
|
|
1970
|
+
)
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
@validate_call
|
|
1976
|
+
def list_webhook_endpoints(
|
|
1977
|
+
self,
|
|
1978
|
+
environment: StrictStr,
|
|
1979
|
+
merchant_account_id: StrictStr,
|
|
1980
|
+
_request_timeout: Union[
|
|
1981
|
+
None,
|
|
1982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1983
|
+
Tuple[
|
|
1984
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1985
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1986
|
+
]
|
|
1987
|
+
] = None,
|
|
1988
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1989
|
+
_content_type: Optional[StrictStr] = None,
|
|
1990
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1991
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1992
|
+
) -> ApiWriteEnvelope:
|
|
1993
|
+
"""List outbound webhook endpoints
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
:param environment: (required)
|
|
1997
|
+
:type environment: str
|
|
1998
|
+
:param merchant_account_id: (required)
|
|
1999
|
+
:type merchant_account_id: str
|
|
2000
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2001
|
+
number provided, it will be total request
|
|
2002
|
+
timeout. It can also be a pair (tuple) of
|
|
2003
|
+
(connection, read) timeouts.
|
|
2004
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2005
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2006
|
+
request; this effectively ignores the
|
|
2007
|
+
authentication in the spec for a single request.
|
|
2008
|
+
:type _request_auth: dict, optional
|
|
2009
|
+
:param _content_type: force content-type for the request.
|
|
2010
|
+
:type _content_type: str, Optional
|
|
2011
|
+
:param _headers: set to override the headers for a single
|
|
2012
|
+
request; this effectively ignores the headers
|
|
2013
|
+
in the spec for a single request.
|
|
2014
|
+
:type _headers: dict, optional
|
|
2015
|
+
:param _host_index: set to override the host_index for a single
|
|
2016
|
+
request; this effectively ignores the host_index
|
|
2017
|
+
in the spec for a single request.
|
|
2018
|
+
:type _host_index: int, optional
|
|
2019
|
+
:return: Returns the result object.
|
|
2020
|
+
""" # noqa: E501
|
|
2021
|
+
|
|
2022
|
+
_param = self._list_webhook_endpoints_serialize(
|
|
2023
|
+
environment=environment,
|
|
2024
|
+
merchant_account_id=merchant_account_id,
|
|
2025
|
+
_request_auth=_request_auth,
|
|
2026
|
+
_content_type=_content_type,
|
|
2027
|
+
_headers=_headers,
|
|
2028
|
+
_host_index=_host_index
|
|
2029
|
+
)
|
|
2030
|
+
|
|
2031
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2032
|
+
'200': "ApiWriteEnvelope",
|
|
2033
|
+
'400': "ApiError",
|
|
2034
|
+
'401': "ApiError",
|
|
2035
|
+
'409': "ApiError",
|
|
2036
|
+
'422': "ApiError",
|
|
2037
|
+
'429': "ApiError",
|
|
2038
|
+
}
|
|
2039
|
+
response_data = self.api_client.call_api(
|
|
2040
|
+
*_param,
|
|
2041
|
+
_request_timeout=_request_timeout
|
|
2042
|
+
)
|
|
2043
|
+
response_data.read()
|
|
2044
|
+
return self.api_client.response_deserialize(
|
|
2045
|
+
response_data=response_data,
|
|
2046
|
+
response_types_map=_response_types_map,
|
|
2047
|
+
).data
|
|
2048
|
+
|
|
2049
|
+
|
|
2050
|
+
@validate_call
|
|
2051
|
+
def list_webhook_endpoints_with_http_info(
|
|
2052
|
+
self,
|
|
2053
|
+
environment: StrictStr,
|
|
2054
|
+
merchant_account_id: StrictStr,
|
|
2055
|
+
_request_timeout: Union[
|
|
2056
|
+
None,
|
|
2057
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2058
|
+
Tuple[
|
|
2059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2060
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2061
|
+
]
|
|
2062
|
+
] = None,
|
|
2063
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2064
|
+
_content_type: Optional[StrictStr] = None,
|
|
2065
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2066
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2067
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
2068
|
+
"""List outbound webhook endpoints
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
:param environment: (required)
|
|
2072
|
+
:type environment: str
|
|
2073
|
+
:param merchant_account_id: (required)
|
|
2074
|
+
:type merchant_account_id: str
|
|
2075
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2076
|
+
number provided, it will be total request
|
|
2077
|
+
timeout. It can also be a pair (tuple) of
|
|
2078
|
+
(connection, read) timeouts.
|
|
2079
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2080
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2081
|
+
request; this effectively ignores the
|
|
2082
|
+
authentication in the spec for a single request.
|
|
2083
|
+
:type _request_auth: dict, optional
|
|
2084
|
+
:param _content_type: force content-type for the request.
|
|
2085
|
+
:type _content_type: str, Optional
|
|
2086
|
+
:param _headers: set to override the headers for a single
|
|
2087
|
+
request; this effectively ignores the headers
|
|
2088
|
+
in the spec for a single request.
|
|
2089
|
+
:type _headers: dict, optional
|
|
2090
|
+
:param _host_index: set to override the host_index for a single
|
|
2091
|
+
request; this effectively ignores the host_index
|
|
2092
|
+
in the spec for a single request.
|
|
2093
|
+
:type _host_index: int, optional
|
|
2094
|
+
:return: Returns the result object.
|
|
2095
|
+
""" # noqa: E501
|
|
2096
|
+
|
|
2097
|
+
_param = self._list_webhook_endpoints_serialize(
|
|
2098
|
+
environment=environment,
|
|
2099
|
+
merchant_account_id=merchant_account_id,
|
|
2100
|
+
_request_auth=_request_auth,
|
|
2101
|
+
_content_type=_content_type,
|
|
2102
|
+
_headers=_headers,
|
|
2103
|
+
_host_index=_host_index
|
|
2104
|
+
)
|
|
2105
|
+
|
|
2106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2107
|
+
'200': "ApiWriteEnvelope",
|
|
2108
|
+
'400': "ApiError",
|
|
2109
|
+
'401': "ApiError",
|
|
2110
|
+
'409': "ApiError",
|
|
2111
|
+
'422': "ApiError",
|
|
2112
|
+
'429': "ApiError",
|
|
2113
|
+
}
|
|
2114
|
+
response_data = self.api_client.call_api(
|
|
2115
|
+
*_param,
|
|
2116
|
+
_request_timeout=_request_timeout
|
|
2117
|
+
)
|
|
2118
|
+
response_data.read()
|
|
2119
|
+
return self.api_client.response_deserialize(
|
|
2120
|
+
response_data=response_data,
|
|
2121
|
+
response_types_map=_response_types_map,
|
|
2122
|
+
)
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
@validate_call
|
|
2126
|
+
def list_webhook_endpoints_without_preload_content(
|
|
2127
|
+
self,
|
|
2128
|
+
environment: StrictStr,
|
|
2129
|
+
merchant_account_id: StrictStr,
|
|
2130
|
+
_request_timeout: Union[
|
|
2131
|
+
None,
|
|
2132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2133
|
+
Tuple[
|
|
2134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2136
|
+
]
|
|
2137
|
+
] = None,
|
|
2138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2139
|
+
_content_type: Optional[StrictStr] = None,
|
|
2140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2142
|
+
) -> RESTResponseType:
|
|
2143
|
+
"""List outbound webhook endpoints
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
:param environment: (required)
|
|
2147
|
+
:type environment: str
|
|
2148
|
+
:param merchant_account_id: (required)
|
|
2149
|
+
:type merchant_account_id: str
|
|
2150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2151
|
+
number provided, it will be total request
|
|
2152
|
+
timeout. It can also be a pair (tuple) of
|
|
2153
|
+
(connection, read) timeouts.
|
|
2154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2156
|
+
request; this effectively ignores the
|
|
2157
|
+
authentication in the spec for a single request.
|
|
2158
|
+
:type _request_auth: dict, optional
|
|
2159
|
+
:param _content_type: force content-type for the request.
|
|
2160
|
+
:type _content_type: str, Optional
|
|
2161
|
+
:param _headers: set to override the headers for a single
|
|
2162
|
+
request; this effectively ignores the headers
|
|
2163
|
+
in the spec for a single request.
|
|
2164
|
+
:type _headers: dict, optional
|
|
2165
|
+
:param _host_index: set to override the host_index for a single
|
|
2166
|
+
request; this effectively ignores the host_index
|
|
2167
|
+
in the spec for a single request.
|
|
2168
|
+
:type _host_index: int, optional
|
|
2169
|
+
:return: Returns the result object.
|
|
2170
|
+
""" # noqa: E501
|
|
2171
|
+
|
|
2172
|
+
_param = self._list_webhook_endpoints_serialize(
|
|
2173
|
+
environment=environment,
|
|
2174
|
+
merchant_account_id=merchant_account_id,
|
|
2175
|
+
_request_auth=_request_auth,
|
|
2176
|
+
_content_type=_content_type,
|
|
2177
|
+
_headers=_headers,
|
|
2178
|
+
_host_index=_host_index
|
|
2179
|
+
)
|
|
2180
|
+
|
|
2181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2182
|
+
'200': "ApiWriteEnvelope",
|
|
2183
|
+
'400': "ApiError",
|
|
2184
|
+
'401': "ApiError",
|
|
2185
|
+
'409': "ApiError",
|
|
2186
|
+
'422': "ApiError",
|
|
2187
|
+
'429': "ApiError",
|
|
2188
|
+
}
|
|
2189
|
+
response_data = self.api_client.call_api(
|
|
2190
|
+
*_param,
|
|
2191
|
+
_request_timeout=_request_timeout
|
|
2192
|
+
)
|
|
2193
|
+
return response_data.response
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
def _list_webhook_endpoints_serialize(
|
|
2197
|
+
self,
|
|
2198
|
+
environment,
|
|
2199
|
+
merchant_account_id,
|
|
2200
|
+
_request_auth,
|
|
2201
|
+
_content_type,
|
|
2202
|
+
_headers,
|
|
2203
|
+
_host_index,
|
|
2204
|
+
) -> RequestSerialized:
|
|
2205
|
+
|
|
2206
|
+
_host = None
|
|
2207
|
+
|
|
2208
|
+
_collection_formats: Dict[str, str] = {
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
_path_params: Dict[str, str] = {}
|
|
2212
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2213
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2214
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2215
|
+
_files: Dict[
|
|
2216
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2217
|
+
] = {}
|
|
2218
|
+
_body_params: Optional[bytes] = None
|
|
2219
|
+
|
|
2220
|
+
# process the path parameters
|
|
2221
|
+
# process the query parameters
|
|
2222
|
+
if environment is not None:
|
|
2223
|
+
|
|
2224
|
+
_query_params.append(('environment', environment))
|
|
2225
|
+
|
|
2226
|
+
if merchant_account_id is not None:
|
|
2227
|
+
|
|
2228
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
2229
|
+
|
|
2230
|
+
# process the header parameters
|
|
2231
|
+
# process the form parameters
|
|
2232
|
+
# process the body parameter
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
# set the HTTP header `Accept`
|
|
2236
|
+
if 'Accept' not in _header_params:
|
|
2237
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2238
|
+
[
|
|
2239
|
+
'application/json'
|
|
2240
|
+
]
|
|
2241
|
+
)
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
# authentication setting
|
|
2245
|
+
_auth_settings: List[str] = [
|
|
2246
|
+
'api-key'
|
|
2247
|
+
]
|
|
2248
|
+
|
|
2249
|
+
return self.api_client.param_serialize(
|
|
2250
|
+
method='GET',
|
|
2251
|
+
resource_path='/v1/webhook-endpoints',
|
|
2252
|
+
path_params=_path_params,
|
|
2253
|
+
query_params=_query_params,
|
|
2254
|
+
header_params=_header_params,
|
|
2255
|
+
body=_body_params,
|
|
2256
|
+
post_params=_form_params,
|
|
2257
|
+
files=_files,
|
|
2258
|
+
auth_settings=_auth_settings,
|
|
2259
|
+
collection_formats=_collection_formats,
|
|
2260
|
+
_host=_host,
|
|
2261
|
+
_request_auth=_request_auth
|
|
2262
|
+
)
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
@validate_call
|
|
2268
|
+
def list_webhook_event_types(
|
|
2269
|
+
self,
|
|
2270
|
+
environment: StrictStr,
|
|
2271
|
+
merchant_account_id: StrictStr,
|
|
2272
|
+
_request_timeout: Union[
|
|
2273
|
+
None,
|
|
2274
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2275
|
+
Tuple[
|
|
2276
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2277
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2278
|
+
]
|
|
2279
|
+
] = None,
|
|
2280
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2281
|
+
_content_type: Optional[StrictStr] = None,
|
|
2282
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2283
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2284
|
+
) -> ApiWriteEnvelope:
|
|
2285
|
+
"""List outbound webhook event types
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
:param environment: (required)
|
|
2289
|
+
:type environment: str
|
|
2290
|
+
:param merchant_account_id: (required)
|
|
2291
|
+
:type merchant_account_id: str
|
|
2292
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2293
|
+
number provided, it will be total request
|
|
2294
|
+
timeout. It can also be a pair (tuple) of
|
|
2295
|
+
(connection, read) timeouts.
|
|
2296
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2297
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2298
|
+
request; this effectively ignores the
|
|
2299
|
+
authentication in the spec for a single request.
|
|
2300
|
+
:type _request_auth: dict, optional
|
|
2301
|
+
:param _content_type: force content-type for the request.
|
|
2302
|
+
:type _content_type: str, Optional
|
|
2303
|
+
:param _headers: set to override the headers for a single
|
|
2304
|
+
request; this effectively ignores the headers
|
|
2305
|
+
in the spec for a single request.
|
|
2306
|
+
:type _headers: dict, optional
|
|
2307
|
+
:param _host_index: set to override the host_index for a single
|
|
2308
|
+
request; this effectively ignores the host_index
|
|
2309
|
+
in the spec for a single request.
|
|
2310
|
+
:type _host_index: int, optional
|
|
2311
|
+
:return: Returns the result object.
|
|
2312
|
+
""" # noqa: E501
|
|
2313
|
+
|
|
2314
|
+
_param = self._list_webhook_event_types_serialize(
|
|
2315
|
+
environment=environment,
|
|
2316
|
+
merchant_account_id=merchant_account_id,
|
|
2317
|
+
_request_auth=_request_auth,
|
|
2318
|
+
_content_type=_content_type,
|
|
2319
|
+
_headers=_headers,
|
|
2320
|
+
_host_index=_host_index
|
|
2321
|
+
)
|
|
2322
|
+
|
|
2323
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2324
|
+
'200': "ApiWriteEnvelope",
|
|
2325
|
+
'400': "ApiError",
|
|
2326
|
+
'401': "ApiError",
|
|
2327
|
+
'409': "ApiError",
|
|
2328
|
+
'422': "ApiError",
|
|
2329
|
+
'429': "ApiError",
|
|
2330
|
+
}
|
|
2331
|
+
response_data = self.api_client.call_api(
|
|
2332
|
+
*_param,
|
|
2333
|
+
_request_timeout=_request_timeout
|
|
2334
|
+
)
|
|
2335
|
+
response_data.read()
|
|
2336
|
+
return self.api_client.response_deserialize(
|
|
2337
|
+
response_data=response_data,
|
|
2338
|
+
response_types_map=_response_types_map,
|
|
2339
|
+
).data
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
@validate_call
|
|
2343
|
+
def list_webhook_event_types_with_http_info(
|
|
2344
|
+
self,
|
|
2345
|
+
environment: StrictStr,
|
|
2346
|
+
merchant_account_id: StrictStr,
|
|
2347
|
+
_request_timeout: Union[
|
|
2348
|
+
None,
|
|
2349
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2350
|
+
Tuple[
|
|
2351
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2352
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2353
|
+
]
|
|
2354
|
+
] = None,
|
|
2355
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2356
|
+
_content_type: Optional[StrictStr] = None,
|
|
2357
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2358
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2359
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
2360
|
+
"""List outbound webhook event types
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
:param environment: (required)
|
|
2364
|
+
:type environment: str
|
|
2365
|
+
:param merchant_account_id: (required)
|
|
2366
|
+
:type merchant_account_id: str
|
|
2367
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2368
|
+
number provided, it will be total request
|
|
2369
|
+
timeout. It can also be a pair (tuple) of
|
|
2370
|
+
(connection, read) timeouts.
|
|
2371
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2372
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2373
|
+
request; this effectively ignores the
|
|
2374
|
+
authentication in the spec for a single request.
|
|
2375
|
+
:type _request_auth: dict, optional
|
|
2376
|
+
:param _content_type: force content-type for the request.
|
|
2377
|
+
:type _content_type: str, Optional
|
|
2378
|
+
:param _headers: set to override the headers for a single
|
|
2379
|
+
request; this effectively ignores the headers
|
|
2380
|
+
in the spec for a single request.
|
|
2381
|
+
:type _headers: dict, optional
|
|
2382
|
+
:param _host_index: set to override the host_index for a single
|
|
2383
|
+
request; this effectively ignores the host_index
|
|
2384
|
+
in the spec for a single request.
|
|
2385
|
+
:type _host_index: int, optional
|
|
2386
|
+
:return: Returns the result object.
|
|
2387
|
+
""" # noqa: E501
|
|
2388
|
+
|
|
2389
|
+
_param = self._list_webhook_event_types_serialize(
|
|
2390
|
+
environment=environment,
|
|
2391
|
+
merchant_account_id=merchant_account_id,
|
|
2392
|
+
_request_auth=_request_auth,
|
|
2393
|
+
_content_type=_content_type,
|
|
2394
|
+
_headers=_headers,
|
|
2395
|
+
_host_index=_host_index
|
|
2396
|
+
)
|
|
2397
|
+
|
|
2398
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2399
|
+
'200': "ApiWriteEnvelope",
|
|
2400
|
+
'400': "ApiError",
|
|
2401
|
+
'401': "ApiError",
|
|
2402
|
+
'409': "ApiError",
|
|
2403
|
+
'422': "ApiError",
|
|
2404
|
+
'429': "ApiError",
|
|
2405
|
+
}
|
|
2406
|
+
response_data = self.api_client.call_api(
|
|
2407
|
+
*_param,
|
|
2408
|
+
_request_timeout=_request_timeout
|
|
2409
|
+
)
|
|
2410
|
+
response_data.read()
|
|
2411
|
+
return self.api_client.response_deserialize(
|
|
2412
|
+
response_data=response_data,
|
|
2413
|
+
response_types_map=_response_types_map,
|
|
2414
|
+
)
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
@validate_call
|
|
2418
|
+
def list_webhook_event_types_without_preload_content(
|
|
2419
|
+
self,
|
|
2420
|
+
environment: StrictStr,
|
|
2421
|
+
merchant_account_id: StrictStr,
|
|
2422
|
+
_request_timeout: Union[
|
|
2423
|
+
None,
|
|
2424
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2425
|
+
Tuple[
|
|
2426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2427
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2428
|
+
]
|
|
2429
|
+
] = None,
|
|
2430
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2431
|
+
_content_type: Optional[StrictStr] = None,
|
|
2432
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2433
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2434
|
+
) -> RESTResponseType:
|
|
2435
|
+
"""List outbound webhook event types
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
:param environment: (required)
|
|
2439
|
+
:type environment: str
|
|
2440
|
+
:param merchant_account_id: (required)
|
|
2441
|
+
:type merchant_account_id: str
|
|
2442
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2443
|
+
number provided, it will be total request
|
|
2444
|
+
timeout. It can also be a pair (tuple) of
|
|
2445
|
+
(connection, read) timeouts.
|
|
2446
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2447
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2448
|
+
request; this effectively ignores the
|
|
2449
|
+
authentication in the spec for a single request.
|
|
2450
|
+
:type _request_auth: dict, optional
|
|
2451
|
+
:param _content_type: force content-type for the request.
|
|
2452
|
+
:type _content_type: str, Optional
|
|
2453
|
+
:param _headers: set to override the headers for a single
|
|
2454
|
+
request; this effectively ignores the headers
|
|
2455
|
+
in the spec for a single request.
|
|
2456
|
+
:type _headers: dict, optional
|
|
2457
|
+
:param _host_index: set to override the host_index for a single
|
|
2458
|
+
request; this effectively ignores the host_index
|
|
2459
|
+
in the spec for a single request.
|
|
2460
|
+
:type _host_index: int, optional
|
|
2461
|
+
:return: Returns the result object.
|
|
2462
|
+
""" # noqa: E501
|
|
2463
|
+
|
|
2464
|
+
_param = self._list_webhook_event_types_serialize(
|
|
2465
|
+
environment=environment,
|
|
2466
|
+
merchant_account_id=merchant_account_id,
|
|
2467
|
+
_request_auth=_request_auth,
|
|
2468
|
+
_content_type=_content_type,
|
|
2469
|
+
_headers=_headers,
|
|
2470
|
+
_host_index=_host_index
|
|
2471
|
+
)
|
|
2472
|
+
|
|
2473
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2474
|
+
'200': "ApiWriteEnvelope",
|
|
2475
|
+
'400': "ApiError",
|
|
2476
|
+
'401': "ApiError",
|
|
2477
|
+
'409': "ApiError",
|
|
2478
|
+
'422': "ApiError",
|
|
2479
|
+
'429': "ApiError",
|
|
2480
|
+
}
|
|
2481
|
+
response_data = self.api_client.call_api(
|
|
2482
|
+
*_param,
|
|
2483
|
+
_request_timeout=_request_timeout
|
|
2484
|
+
)
|
|
2485
|
+
return response_data.response
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
def _list_webhook_event_types_serialize(
|
|
2489
|
+
self,
|
|
2490
|
+
environment,
|
|
2491
|
+
merchant_account_id,
|
|
2492
|
+
_request_auth,
|
|
2493
|
+
_content_type,
|
|
2494
|
+
_headers,
|
|
2495
|
+
_host_index,
|
|
2496
|
+
) -> RequestSerialized:
|
|
2497
|
+
|
|
2498
|
+
_host = None
|
|
2499
|
+
|
|
2500
|
+
_collection_formats: Dict[str, str] = {
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
_path_params: Dict[str, str] = {}
|
|
2504
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2505
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2506
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2507
|
+
_files: Dict[
|
|
2508
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2509
|
+
] = {}
|
|
2510
|
+
_body_params: Optional[bytes] = None
|
|
2511
|
+
|
|
2512
|
+
# process the path parameters
|
|
2513
|
+
# process the query parameters
|
|
2514
|
+
if environment is not None:
|
|
2515
|
+
|
|
2516
|
+
_query_params.append(('environment', environment))
|
|
2517
|
+
|
|
2518
|
+
if merchant_account_id is not None:
|
|
2519
|
+
|
|
2520
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
2521
|
+
|
|
2522
|
+
# process the header parameters
|
|
2523
|
+
# process the form parameters
|
|
2524
|
+
# process the body parameter
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
# set the HTTP header `Accept`
|
|
2528
|
+
if 'Accept' not in _header_params:
|
|
2529
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2530
|
+
[
|
|
2531
|
+
'application/json'
|
|
2532
|
+
]
|
|
2533
|
+
)
|
|
2534
|
+
|
|
2535
|
+
|
|
2536
|
+
# authentication setting
|
|
2537
|
+
_auth_settings: List[str] = [
|
|
2538
|
+
'api-key'
|
|
2539
|
+
]
|
|
2540
|
+
|
|
2541
|
+
return self.api_client.param_serialize(
|
|
2542
|
+
method='GET',
|
|
2543
|
+
resource_path='/v1/webhook-event-types',
|
|
2544
|
+
path_params=_path_params,
|
|
2545
|
+
query_params=_query_params,
|
|
2546
|
+
header_params=_header_params,
|
|
2547
|
+
body=_body_params,
|
|
2548
|
+
post_params=_form_params,
|
|
2549
|
+
files=_files,
|
|
2550
|
+
auth_settings=_auth_settings,
|
|
2551
|
+
collection_formats=_collection_formats,
|
|
2552
|
+
_host=_host,
|
|
2553
|
+
_request_auth=_request_auth
|
|
2554
|
+
)
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
@validate_call
|
|
2560
|
+
def list_webhook_events(
|
|
2561
|
+
self,
|
|
2562
|
+
environment: StrictStr,
|
|
2563
|
+
merchant_account_id: StrictStr,
|
|
2564
|
+
_request_timeout: Union[
|
|
2565
|
+
None,
|
|
2566
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2567
|
+
Tuple[
|
|
2568
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2569
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2570
|
+
]
|
|
2571
|
+
] = None,
|
|
2572
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2573
|
+
_content_type: Optional[StrictStr] = None,
|
|
2574
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2575
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2576
|
+
) -> ApiWriteEnvelope:
|
|
2577
|
+
"""List outbound webhook events
|
|
2578
|
+
|
|
2579
|
+
|
|
2580
|
+
:param environment: (required)
|
|
2581
|
+
:type environment: str
|
|
2582
|
+
:param merchant_account_id: (required)
|
|
2583
|
+
:type merchant_account_id: str
|
|
2584
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2585
|
+
number provided, it will be total request
|
|
2586
|
+
timeout. It can also be a pair (tuple) of
|
|
2587
|
+
(connection, read) timeouts.
|
|
2588
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2589
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2590
|
+
request; this effectively ignores the
|
|
2591
|
+
authentication in the spec for a single request.
|
|
2592
|
+
:type _request_auth: dict, optional
|
|
2593
|
+
:param _content_type: force content-type for the request.
|
|
2594
|
+
:type _content_type: str, Optional
|
|
2595
|
+
:param _headers: set to override the headers for a single
|
|
2596
|
+
request; this effectively ignores the headers
|
|
2597
|
+
in the spec for a single request.
|
|
2598
|
+
:type _headers: dict, optional
|
|
2599
|
+
:param _host_index: set to override the host_index for a single
|
|
2600
|
+
request; this effectively ignores the host_index
|
|
2601
|
+
in the spec for a single request.
|
|
2602
|
+
:type _host_index: int, optional
|
|
2603
|
+
:return: Returns the result object.
|
|
2604
|
+
""" # noqa: E501
|
|
2605
|
+
|
|
2606
|
+
_param = self._list_webhook_events_serialize(
|
|
2607
|
+
environment=environment,
|
|
2608
|
+
merchant_account_id=merchant_account_id,
|
|
2609
|
+
_request_auth=_request_auth,
|
|
2610
|
+
_content_type=_content_type,
|
|
2611
|
+
_headers=_headers,
|
|
2612
|
+
_host_index=_host_index
|
|
2613
|
+
)
|
|
2614
|
+
|
|
2615
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2616
|
+
'200': "ApiWriteEnvelope",
|
|
2617
|
+
'400': "ApiError",
|
|
2618
|
+
'401': "ApiError",
|
|
2619
|
+
'409': "ApiError",
|
|
2620
|
+
'422': "ApiError",
|
|
2621
|
+
'429': "ApiError",
|
|
2622
|
+
}
|
|
2623
|
+
response_data = self.api_client.call_api(
|
|
2624
|
+
*_param,
|
|
2625
|
+
_request_timeout=_request_timeout
|
|
2626
|
+
)
|
|
2627
|
+
response_data.read()
|
|
2628
|
+
return self.api_client.response_deserialize(
|
|
2629
|
+
response_data=response_data,
|
|
2630
|
+
response_types_map=_response_types_map,
|
|
2631
|
+
).data
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
@validate_call
|
|
2635
|
+
def list_webhook_events_with_http_info(
|
|
2636
|
+
self,
|
|
2637
|
+
environment: StrictStr,
|
|
2638
|
+
merchant_account_id: StrictStr,
|
|
2639
|
+
_request_timeout: Union[
|
|
2640
|
+
None,
|
|
2641
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2642
|
+
Tuple[
|
|
2643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2644
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2645
|
+
]
|
|
2646
|
+
] = None,
|
|
2647
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2648
|
+
_content_type: Optional[StrictStr] = None,
|
|
2649
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2650
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2651
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
2652
|
+
"""List outbound webhook events
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
:param environment: (required)
|
|
2656
|
+
:type environment: str
|
|
2657
|
+
:param merchant_account_id: (required)
|
|
2658
|
+
:type merchant_account_id: str
|
|
2659
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2660
|
+
number provided, it will be total request
|
|
2661
|
+
timeout. It can also be a pair (tuple) of
|
|
2662
|
+
(connection, read) timeouts.
|
|
2663
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2664
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2665
|
+
request; this effectively ignores the
|
|
2666
|
+
authentication in the spec for a single request.
|
|
2667
|
+
:type _request_auth: dict, optional
|
|
2668
|
+
:param _content_type: force content-type for the request.
|
|
2669
|
+
:type _content_type: str, Optional
|
|
2670
|
+
:param _headers: set to override the headers for a single
|
|
2671
|
+
request; this effectively ignores the headers
|
|
2672
|
+
in the spec for a single request.
|
|
2673
|
+
:type _headers: dict, optional
|
|
2674
|
+
:param _host_index: set to override the host_index for a single
|
|
2675
|
+
request; this effectively ignores the host_index
|
|
2676
|
+
in the spec for a single request.
|
|
2677
|
+
:type _host_index: int, optional
|
|
2678
|
+
:return: Returns the result object.
|
|
2679
|
+
""" # noqa: E501
|
|
2680
|
+
|
|
2681
|
+
_param = self._list_webhook_events_serialize(
|
|
2682
|
+
environment=environment,
|
|
2683
|
+
merchant_account_id=merchant_account_id,
|
|
2684
|
+
_request_auth=_request_auth,
|
|
2685
|
+
_content_type=_content_type,
|
|
2686
|
+
_headers=_headers,
|
|
2687
|
+
_host_index=_host_index
|
|
2688
|
+
)
|
|
2689
|
+
|
|
2690
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2691
|
+
'200': "ApiWriteEnvelope",
|
|
2692
|
+
'400': "ApiError",
|
|
2693
|
+
'401': "ApiError",
|
|
2694
|
+
'409': "ApiError",
|
|
2695
|
+
'422': "ApiError",
|
|
2696
|
+
'429': "ApiError",
|
|
2697
|
+
}
|
|
2698
|
+
response_data = self.api_client.call_api(
|
|
2699
|
+
*_param,
|
|
2700
|
+
_request_timeout=_request_timeout
|
|
2701
|
+
)
|
|
2702
|
+
response_data.read()
|
|
2703
|
+
return self.api_client.response_deserialize(
|
|
2704
|
+
response_data=response_data,
|
|
2705
|
+
response_types_map=_response_types_map,
|
|
2706
|
+
)
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
@validate_call
|
|
2710
|
+
def list_webhook_events_without_preload_content(
|
|
2711
|
+
self,
|
|
2712
|
+
environment: StrictStr,
|
|
2713
|
+
merchant_account_id: StrictStr,
|
|
2714
|
+
_request_timeout: Union[
|
|
2715
|
+
None,
|
|
2716
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2717
|
+
Tuple[
|
|
2718
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2719
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2720
|
+
]
|
|
2721
|
+
] = None,
|
|
2722
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2723
|
+
_content_type: Optional[StrictStr] = None,
|
|
2724
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2725
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2726
|
+
) -> RESTResponseType:
|
|
2727
|
+
"""List outbound webhook events
|
|
2728
|
+
|
|
2729
|
+
|
|
2730
|
+
:param environment: (required)
|
|
2731
|
+
:type environment: str
|
|
2732
|
+
:param merchant_account_id: (required)
|
|
2733
|
+
:type merchant_account_id: str
|
|
2734
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2735
|
+
number provided, it will be total request
|
|
2736
|
+
timeout. It can also be a pair (tuple) of
|
|
2737
|
+
(connection, read) timeouts.
|
|
2738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2740
|
+
request; this effectively ignores the
|
|
2741
|
+
authentication in the spec for a single request.
|
|
2742
|
+
:type _request_auth: dict, optional
|
|
2743
|
+
:param _content_type: force content-type for the request.
|
|
2744
|
+
:type _content_type: str, Optional
|
|
2745
|
+
:param _headers: set to override the headers for a single
|
|
2746
|
+
request; this effectively ignores the headers
|
|
2747
|
+
in the spec for a single request.
|
|
2748
|
+
:type _headers: dict, optional
|
|
2749
|
+
:param _host_index: set to override the host_index for a single
|
|
2750
|
+
request; this effectively ignores the host_index
|
|
2751
|
+
in the spec for a single request.
|
|
2752
|
+
:type _host_index: int, optional
|
|
2753
|
+
:return: Returns the result object.
|
|
2754
|
+
""" # noqa: E501
|
|
2755
|
+
|
|
2756
|
+
_param = self._list_webhook_events_serialize(
|
|
2757
|
+
environment=environment,
|
|
2758
|
+
merchant_account_id=merchant_account_id,
|
|
2759
|
+
_request_auth=_request_auth,
|
|
2760
|
+
_content_type=_content_type,
|
|
2761
|
+
_headers=_headers,
|
|
2762
|
+
_host_index=_host_index
|
|
2763
|
+
)
|
|
2764
|
+
|
|
2765
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2766
|
+
'200': "ApiWriteEnvelope",
|
|
2767
|
+
'400': "ApiError",
|
|
2768
|
+
'401': "ApiError",
|
|
2769
|
+
'409': "ApiError",
|
|
2770
|
+
'422': "ApiError",
|
|
2771
|
+
'429': "ApiError",
|
|
2772
|
+
}
|
|
2773
|
+
response_data = self.api_client.call_api(
|
|
2774
|
+
*_param,
|
|
2775
|
+
_request_timeout=_request_timeout
|
|
2776
|
+
)
|
|
2777
|
+
return response_data.response
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
def _list_webhook_events_serialize(
|
|
2781
|
+
self,
|
|
2782
|
+
environment,
|
|
2783
|
+
merchant_account_id,
|
|
2784
|
+
_request_auth,
|
|
2785
|
+
_content_type,
|
|
2786
|
+
_headers,
|
|
2787
|
+
_host_index,
|
|
2788
|
+
) -> RequestSerialized:
|
|
2789
|
+
|
|
2790
|
+
_host = None
|
|
2791
|
+
|
|
2792
|
+
_collection_formats: Dict[str, str] = {
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
_path_params: Dict[str, str] = {}
|
|
2796
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2797
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2798
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2799
|
+
_files: Dict[
|
|
2800
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2801
|
+
] = {}
|
|
2802
|
+
_body_params: Optional[bytes] = None
|
|
2803
|
+
|
|
2804
|
+
# process the path parameters
|
|
2805
|
+
# process the query parameters
|
|
2806
|
+
if environment is not None:
|
|
2807
|
+
|
|
2808
|
+
_query_params.append(('environment', environment))
|
|
2809
|
+
|
|
2810
|
+
if merchant_account_id is not None:
|
|
2811
|
+
|
|
2812
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
2813
|
+
|
|
2814
|
+
# process the header parameters
|
|
2815
|
+
# process the form parameters
|
|
2816
|
+
# process the body parameter
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
# set the HTTP header `Accept`
|
|
2820
|
+
if 'Accept' not in _header_params:
|
|
2821
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2822
|
+
[
|
|
2823
|
+
'application/json'
|
|
2824
|
+
]
|
|
2825
|
+
)
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
# authentication setting
|
|
2829
|
+
_auth_settings: List[str] = [
|
|
2830
|
+
'api-key'
|
|
2831
|
+
]
|
|
2832
|
+
|
|
2833
|
+
return self.api_client.param_serialize(
|
|
2834
|
+
method='GET',
|
|
2835
|
+
resource_path='/v1/events',
|
|
2836
|
+
path_params=_path_params,
|
|
2837
|
+
query_params=_query_params,
|
|
2838
|
+
header_params=_header_params,
|
|
2839
|
+
body=_body_params,
|
|
2840
|
+
post_params=_form_params,
|
|
2841
|
+
files=_files,
|
|
2842
|
+
auth_settings=_auth_settings,
|
|
2843
|
+
collection_formats=_collection_formats,
|
|
2844
|
+
_host=_host,
|
|
2845
|
+
_request_auth=_request_auth
|
|
2846
|
+
)
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
|
|
2851
|
+
@validate_call
|
|
2852
|
+
def redrive_webhook_deliveries(
|
|
2853
|
+
self,
|
|
2854
|
+
environment: StrictStr,
|
|
2855
|
+
merchant_account_id: StrictStr,
|
|
2856
|
+
webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest,
|
|
2857
|
+
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,
|
|
2858
|
+
_request_timeout: Union[
|
|
2859
|
+
None,
|
|
2860
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2861
|
+
Tuple[
|
|
2862
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2863
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2864
|
+
]
|
|
2865
|
+
] = None,
|
|
2866
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2867
|
+
_content_type: Optional[StrictStr] = None,
|
|
2868
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2869
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2870
|
+
) -> ApiWriteEnvelope:
|
|
2871
|
+
"""Redrive failed outbound webhook deliveries
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
:param environment: (required)
|
|
2875
|
+
:type environment: str
|
|
2876
|
+
:param merchant_account_id: (required)
|
|
2877
|
+
:type merchant_account_id: str
|
|
2878
|
+
:param webhook_deliveries_redrive_request: (required)
|
|
2879
|
+
:type webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest
|
|
2880
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
2881
|
+
:type idempotency_key: str
|
|
2882
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2883
|
+
number provided, it will be total request
|
|
2884
|
+
timeout. It can also be a pair (tuple) of
|
|
2885
|
+
(connection, read) timeouts.
|
|
2886
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2887
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2888
|
+
request; this effectively ignores the
|
|
2889
|
+
authentication in the spec for a single request.
|
|
2890
|
+
:type _request_auth: dict, optional
|
|
2891
|
+
:param _content_type: force content-type for the request.
|
|
2892
|
+
:type _content_type: str, Optional
|
|
2893
|
+
:param _headers: set to override the headers for a single
|
|
2894
|
+
request; this effectively ignores the headers
|
|
2895
|
+
in the spec for a single request.
|
|
2896
|
+
:type _headers: dict, optional
|
|
2897
|
+
:param _host_index: set to override the host_index for a single
|
|
2898
|
+
request; this effectively ignores the host_index
|
|
2899
|
+
in the spec for a single request.
|
|
2900
|
+
:type _host_index: int, optional
|
|
2901
|
+
:return: Returns the result object.
|
|
2902
|
+
""" # noqa: E501
|
|
2903
|
+
|
|
2904
|
+
_param = self._redrive_webhook_deliveries_serialize(
|
|
2905
|
+
environment=environment,
|
|
2906
|
+
merchant_account_id=merchant_account_id,
|
|
2907
|
+
webhook_deliveries_redrive_request=webhook_deliveries_redrive_request,
|
|
2908
|
+
idempotency_key=idempotency_key,
|
|
2909
|
+
_request_auth=_request_auth,
|
|
2910
|
+
_content_type=_content_type,
|
|
2911
|
+
_headers=_headers,
|
|
2912
|
+
_host_index=_host_index
|
|
2913
|
+
)
|
|
2914
|
+
|
|
2915
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2916
|
+
'200': "ApiWriteEnvelope",
|
|
2917
|
+
'400': "ApiError",
|
|
2918
|
+
'401': "ApiError",
|
|
2919
|
+
'409': "ApiError",
|
|
2920
|
+
'422': "ApiError",
|
|
2921
|
+
'429': "ApiError",
|
|
2922
|
+
}
|
|
2923
|
+
response_data = self.api_client.call_api(
|
|
2924
|
+
*_param,
|
|
2925
|
+
_request_timeout=_request_timeout
|
|
2926
|
+
)
|
|
2927
|
+
response_data.read()
|
|
2928
|
+
return self.api_client.response_deserialize(
|
|
2929
|
+
response_data=response_data,
|
|
2930
|
+
response_types_map=_response_types_map,
|
|
2931
|
+
).data
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
@validate_call
|
|
2935
|
+
def redrive_webhook_deliveries_with_http_info(
|
|
2936
|
+
self,
|
|
2937
|
+
environment: StrictStr,
|
|
2938
|
+
merchant_account_id: StrictStr,
|
|
2939
|
+
webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest,
|
|
2940
|
+
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,
|
|
2941
|
+
_request_timeout: Union[
|
|
2942
|
+
None,
|
|
2943
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2944
|
+
Tuple[
|
|
2945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2946
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2947
|
+
]
|
|
2948
|
+
] = None,
|
|
2949
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2950
|
+
_content_type: Optional[StrictStr] = None,
|
|
2951
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2952
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2953
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
2954
|
+
"""Redrive failed outbound webhook deliveries
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
:param environment: (required)
|
|
2958
|
+
:type environment: str
|
|
2959
|
+
:param merchant_account_id: (required)
|
|
2960
|
+
:type merchant_account_id: str
|
|
2961
|
+
:param webhook_deliveries_redrive_request: (required)
|
|
2962
|
+
:type webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest
|
|
2963
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
2964
|
+
:type idempotency_key: str
|
|
2965
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2966
|
+
number provided, it will be total request
|
|
2967
|
+
timeout. It can also be a pair (tuple) of
|
|
2968
|
+
(connection, read) timeouts.
|
|
2969
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2970
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2971
|
+
request; this effectively ignores the
|
|
2972
|
+
authentication in the spec for a single request.
|
|
2973
|
+
:type _request_auth: dict, optional
|
|
2974
|
+
:param _content_type: force content-type for the request.
|
|
2975
|
+
:type _content_type: str, Optional
|
|
2976
|
+
:param _headers: set to override the headers for a single
|
|
2977
|
+
request; this effectively ignores the headers
|
|
2978
|
+
in the spec for a single request.
|
|
2979
|
+
:type _headers: dict, optional
|
|
2980
|
+
:param _host_index: set to override the host_index for a single
|
|
2981
|
+
request; this effectively ignores the host_index
|
|
2982
|
+
in the spec for a single request.
|
|
2983
|
+
:type _host_index: int, optional
|
|
2984
|
+
:return: Returns the result object.
|
|
2985
|
+
""" # noqa: E501
|
|
2986
|
+
|
|
2987
|
+
_param = self._redrive_webhook_deliveries_serialize(
|
|
2988
|
+
environment=environment,
|
|
2989
|
+
merchant_account_id=merchant_account_id,
|
|
2990
|
+
webhook_deliveries_redrive_request=webhook_deliveries_redrive_request,
|
|
2991
|
+
idempotency_key=idempotency_key,
|
|
2992
|
+
_request_auth=_request_auth,
|
|
2993
|
+
_content_type=_content_type,
|
|
2994
|
+
_headers=_headers,
|
|
2995
|
+
_host_index=_host_index
|
|
2996
|
+
)
|
|
2997
|
+
|
|
2998
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2999
|
+
'200': "ApiWriteEnvelope",
|
|
3000
|
+
'400': "ApiError",
|
|
3001
|
+
'401': "ApiError",
|
|
3002
|
+
'409': "ApiError",
|
|
3003
|
+
'422': "ApiError",
|
|
3004
|
+
'429': "ApiError",
|
|
3005
|
+
}
|
|
3006
|
+
response_data = self.api_client.call_api(
|
|
3007
|
+
*_param,
|
|
3008
|
+
_request_timeout=_request_timeout
|
|
3009
|
+
)
|
|
3010
|
+
response_data.read()
|
|
3011
|
+
return self.api_client.response_deserialize(
|
|
3012
|
+
response_data=response_data,
|
|
3013
|
+
response_types_map=_response_types_map,
|
|
3014
|
+
)
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
@validate_call
|
|
3018
|
+
def redrive_webhook_deliveries_without_preload_content(
|
|
3019
|
+
self,
|
|
3020
|
+
environment: StrictStr,
|
|
3021
|
+
merchant_account_id: StrictStr,
|
|
3022
|
+
webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest,
|
|
3023
|
+
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,
|
|
3024
|
+
_request_timeout: Union[
|
|
3025
|
+
None,
|
|
3026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3027
|
+
Tuple[
|
|
3028
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3029
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3030
|
+
]
|
|
3031
|
+
] = None,
|
|
3032
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3033
|
+
_content_type: Optional[StrictStr] = None,
|
|
3034
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3035
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3036
|
+
) -> RESTResponseType:
|
|
3037
|
+
"""Redrive failed outbound webhook deliveries
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
:param environment: (required)
|
|
3041
|
+
:type environment: str
|
|
3042
|
+
:param merchant_account_id: (required)
|
|
3043
|
+
:type merchant_account_id: str
|
|
3044
|
+
:param webhook_deliveries_redrive_request: (required)
|
|
3045
|
+
:type webhook_deliveries_redrive_request: WebhookDeliveriesRedriveRequest
|
|
3046
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3047
|
+
:type idempotency_key: str
|
|
3048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3049
|
+
number provided, it will be total request
|
|
3050
|
+
timeout. It can also be a pair (tuple) of
|
|
3051
|
+
(connection, read) timeouts.
|
|
3052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3054
|
+
request; this effectively ignores the
|
|
3055
|
+
authentication in the spec for a single request.
|
|
3056
|
+
:type _request_auth: dict, optional
|
|
3057
|
+
:param _content_type: force content-type for the request.
|
|
3058
|
+
:type _content_type: str, Optional
|
|
3059
|
+
:param _headers: set to override the headers for a single
|
|
3060
|
+
request; this effectively ignores the headers
|
|
3061
|
+
in the spec for a single request.
|
|
3062
|
+
:type _headers: dict, optional
|
|
3063
|
+
:param _host_index: set to override the host_index for a single
|
|
3064
|
+
request; this effectively ignores the host_index
|
|
3065
|
+
in the spec for a single request.
|
|
3066
|
+
:type _host_index: int, optional
|
|
3067
|
+
:return: Returns the result object.
|
|
3068
|
+
""" # noqa: E501
|
|
3069
|
+
|
|
3070
|
+
_param = self._redrive_webhook_deliveries_serialize(
|
|
3071
|
+
environment=environment,
|
|
3072
|
+
merchant_account_id=merchant_account_id,
|
|
3073
|
+
webhook_deliveries_redrive_request=webhook_deliveries_redrive_request,
|
|
3074
|
+
idempotency_key=idempotency_key,
|
|
3075
|
+
_request_auth=_request_auth,
|
|
3076
|
+
_content_type=_content_type,
|
|
3077
|
+
_headers=_headers,
|
|
3078
|
+
_host_index=_host_index
|
|
3079
|
+
)
|
|
3080
|
+
|
|
3081
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3082
|
+
'200': "ApiWriteEnvelope",
|
|
3083
|
+
'400': "ApiError",
|
|
3084
|
+
'401': "ApiError",
|
|
3085
|
+
'409': "ApiError",
|
|
3086
|
+
'422': "ApiError",
|
|
3087
|
+
'429': "ApiError",
|
|
3088
|
+
}
|
|
3089
|
+
response_data = self.api_client.call_api(
|
|
3090
|
+
*_param,
|
|
3091
|
+
_request_timeout=_request_timeout
|
|
3092
|
+
)
|
|
3093
|
+
return response_data.response
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
def _redrive_webhook_deliveries_serialize(
|
|
3097
|
+
self,
|
|
3098
|
+
environment,
|
|
3099
|
+
merchant_account_id,
|
|
3100
|
+
webhook_deliveries_redrive_request,
|
|
3101
|
+
idempotency_key,
|
|
3102
|
+
_request_auth,
|
|
3103
|
+
_content_type,
|
|
3104
|
+
_headers,
|
|
3105
|
+
_host_index,
|
|
3106
|
+
) -> RequestSerialized:
|
|
3107
|
+
|
|
3108
|
+
_host = None
|
|
3109
|
+
|
|
3110
|
+
_collection_formats: Dict[str, str] = {
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
_path_params: Dict[str, str] = {}
|
|
3114
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3115
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3116
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3117
|
+
_files: Dict[
|
|
3118
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3119
|
+
] = {}
|
|
3120
|
+
_body_params: Optional[bytes] = None
|
|
3121
|
+
|
|
3122
|
+
# process the path parameters
|
|
3123
|
+
# process the query parameters
|
|
3124
|
+
if environment is not None:
|
|
3125
|
+
|
|
3126
|
+
_query_params.append(('environment', environment))
|
|
3127
|
+
|
|
3128
|
+
if merchant_account_id is not None:
|
|
3129
|
+
|
|
3130
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
3131
|
+
|
|
3132
|
+
# process the header parameters
|
|
3133
|
+
if idempotency_key is not None:
|
|
3134
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
3135
|
+
# process the form parameters
|
|
3136
|
+
# process the body parameter
|
|
3137
|
+
if webhook_deliveries_redrive_request is not None:
|
|
3138
|
+
_body_params = webhook_deliveries_redrive_request
|
|
3139
|
+
|
|
3140
|
+
|
|
3141
|
+
# set the HTTP header `Accept`
|
|
3142
|
+
if 'Accept' not in _header_params:
|
|
3143
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3144
|
+
[
|
|
3145
|
+
'application/json'
|
|
3146
|
+
]
|
|
3147
|
+
)
|
|
3148
|
+
|
|
3149
|
+
# set the HTTP header `Content-Type`
|
|
3150
|
+
if _content_type:
|
|
3151
|
+
_header_params['Content-Type'] = _content_type
|
|
3152
|
+
else:
|
|
3153
|
+
_default_content_type = (
|
|
3154
|
+
self.api_client.select_header_content_type(
|
|
3155
|
+
[
|
|
3156
|
+
'application/json'
|
|
3157
|
+
]
|
|
3158
|
+
)
|
|
3159
|
+
)
|
|
3160
|
+
if _default_content_type is not None:
|
|
3161
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3162
|
+
|
|
3163
|
+
# authentication setting
|
|
3164
|
+
_auth_settings: List[str] = [
|
|
3165
|
+
'api-key'
|
|
3166
|
+
]
|
|
3167
|
+
|
|
3168
|
+
return self.api_client.param_serialize(
|
|
3169
|
+
method='POST',
|
|
3170
|
+
resource_path='/v1/webhook-deliveries/redrive',
|
|
3171
|
+
path_params=_path_params,
|
|
3172
|
+
query_params=_query_params,
|
|
3173
|
+
header_params=_header_params,
|
|
3174
|
+
body=_body_params,
|
|
3175
|
+
post_params=_form_params,
|
|
3176
|
+
files=_files,
|
|
3177
|
+
auth_settings=_auth_settings,
|
|
3178
|
+
collection_formats=_collection_formats,
|
|
3179
|
+
_host=_host,
|
|
3180
|
+
_request_auth=_request_auth
|
|
3181
|
+
)
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
|
|
3186
|
+
@validate_call
|
|
3187
|
+
def replay_webhook_delivery(
|
|
3188
|
+
self,
|
|
3189
|
+
delivery_id: StrictStr,
|
|
3190
|
+
environment: StrictStr,
|
|
3191
|
+
merchant_account_id: StrictStr,
|
|
3192
|
+
webhook_delivery_replay_request: WebhookDeliveryReplayRequest,
|
|
3193
|
+
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,
|
|
3194
|
+
_request_timeout: Union[
|
|
3195
|
+
None,
|
|
3196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3197
|
+
Tuple[
|
|
3198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3199
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3200
|
+
]
|
|
3201
|
+
] = None,
|
|
3202
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3203
|
+
_content_type: Optional[StrictStr] = None,
|
|
3204
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3205
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3206
|
+
) -> ApiWriteEnvelope:
|
|
3207
|
+
"""Replay a failed outbound webhook delivery
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
:param delivery_id: (required)
|
|
3211
|
+
:type delivery_id: str
|
|
3212
|
+
:param environment: (required)
|
|
3213
|
+
:type environment: str
|
|
3214
|
+
:param merchant_account_id: (required)
|
|
3215
|
+
:type merchant_account_id: str
|
|
3216
|
+
:param webhook_delivery_replay_request: (required)
|
|
3217
|
+
:type webhook_delivery_replay_request: WebhookDeliveryReplayRequest
|
|
3218
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3219
|
+
:type idempotency_key: str
|
|
3220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3221
|
+
number provided, it will be total request
|
|
3222
|
+
timeout. It can also be a pair (tuple) of
|
|
3223
|
+
(connection, read) timeouts.
|
|
3224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3226
|
+
request; this effectively ignores the
|
|
3227
|
+
authentication in the spec for a single request.
|
|
3228
|
+
:type _request_auth: dict, optional
|
|
3229
|
+
:param _content_type: force content-type for the request.
|
|
3230
|
+
:type _content_type: str, Optional
|
|
3231
|
+
:param _headers: set to override the headers for a single
|
|
3232
|
+
request; this effectively ignores the headers
|
|
3233
|
+
in the spec for a single request.
|
|
3234
|
+
:type _headers: dict, optional
|
|
3235
|
+
:param _host_index: set to override the host_index for a single
|
|
3236
|
+
request; this effectively ignores the host_index
|
|
3237
|
+
in the spec for a single request.
|
|
3238
|
+
:type _host_index: int, optional
|
|
3239
|
+
:return: Returns the result object.
|
|
3240
|
+
""" # noqa: E501
|
|
3241
|
+
|
|
3242
|
+
_param = self._replay_webhook_delivery_serialize(
|
|
3243
|
+
delivery_id=delivery_id,
|
|
3244
|
+
environment=environment,
|
|
3245
|
+
merchant_account_id=merchant_account_id,
|
|
3246
|
+
webhook_delivery_replay_request=webhook_delivery_replay_request,
|
|
3247
|
+
idempotency_key=idempotency_key,
|
|
3248
|
+
_request_auth=_request_auth,
|
|
3249
|
+
_content_type=_content_type,
|
|
3250
|
+
_headers=_headers,
|
|
3251
|
+
_host_index=_host_index
|
|
3252
|
+
)
|
|
3253
|
+
|
|
3254
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3255
|
+
'200': "ApiWriteEnvelope",
|
|
3256
|
+
'400': "ApiError",
|
|
3257
|
+
'401': "ApiError",
|
|
3258
|
+
'409': "ApiError",
|
|
3259
|
+
'422': "ApiError",
|
|
3260
|
+
'429': "ApiError",
|
|
3261
|
+
}
|
|
3262
|
+
response_data = self.api_client.call_api(
|
|
3263
|
+
*_param,
|
|
3264
|
+
_request_timeout=_request_timeout
|
|
3265
|
+
)
|
|
3266
|
+
response_data.read()
|
|
3267
|
+
return self.api_client.response_deserialize(
|
|
3268
|
+
response_data=response_data,
|
|
3269
|
+
response_types_map=_response_types_map,
|
|
3270
|
+
).data
|
|
3271
|
+
|
|
3272
|
+
|
|
3273
|
+
@validate_call
|
|
3274
|
+
def replay_webhook_delivery_with_http_info(
|
|
3275
|
+
self,
|
|
3276
|
+
delivery_id: StrictStr,
|
|
3277
|
+
environment: StrictStr,
|
|
3278
|
+
merchant_account_id: StrictStr,
|
|
3279
|
+
webhook_delivery_replay_request: WebhookDeliveryReplayRequest,
|
|
3280
|
+
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,
|
|
3281
|
+
_request_timeout: Union[
|
|
3282
|
+
None,
|
|
3283
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3284
|
+
Tuple[
|
|
3285
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3286
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3287
|
+
]
|
|
3288
|
+
] = None,
|
|
3289
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3290
|
+
_content_type: Optional[StrictStr] = None,
|
|
3291
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3292
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3293
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
3294
|
+
"""Replay a failed outbound webhook delivery
|
|
3295
|
+
|
|
3296
|
+
|
|
3297
|
+
:param delivery_id: (required)
|
|
3298
|
+
:type delivery_id: str
|
|
3299
|
+
:param environment: (required)
|
|
3300
|
+
:type environment: str
|
|
3301
|
+
:param merchant_account_id: (required)
|
|
3302
|
+
:type merchant_account_id: str
|
|
3303
|
+
:param webhook_delivery_replay_request: (required)
|
|
3304
|
+
:type webhook_delivery_replay_request: WebhookDeliveryReplayRequest
|
|
3305
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3306
|
+
:type idempotency_key: str
|
|
3307
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3308
|
+
number provided, it will be total request
|
|
3309
|
+
timeout. It can also be a pair (tuple) of
|
|
3310
|
+
(connection, read) timeouts.
|
|
3311
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3312
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3313
|
+
request; this effectively ignores the
|
|
3314
|
+
authentication in the spec for a single request.
|
|
3315
|
+
:type _request_auth: dict, optional
|
|
3316
|
+
:param _content_type: force content-type for the request.
|
|
3317
|
+
:type _content_type: str, Optional
|
|
3318
|
+
:param _headers: set to override the headers for a single
|
|
3319
|
+
request; this effectively ignores the headers
|
|
3320
|
+
in the spec for a single request.
|
|
3321
|
+
:type _headers: dict, optional
|
|
3322
|
+
:param _host_index: set to override the host_index for a single
|
|
3323
|
+
request; this effectively ignores the host_index
|
|
3324
|
+
in the spec for a single request.
|
|
3325
|
+
:type _host_index: int, optional
|
|
3326
|
+
:return: Returns the result object.
|
|
3327
|
+
""" # noqa: E501
|
|
3328
|
+
|
|
3329
|
+
_param = self._replay_webhook_delivery_serialize(
|
|
3330
|
+
delivery_id=delivery_id,
|
|
3331
|
+
environment=environment,
|
|
3332
|
+
merchant_account_id=merchant_account_id,
|
|
3333
|
+
webhook_delivery_replay_request=webhook_delivery_replay_request,
|
|
3334
|
+
idempotency_key=idempotency_key,
|
|
3335
|
+
_request_auth=_request_auth,
|
|
3336
|
+
_content_type=_content_type,
|
|
3337
|
+
_headers=_headers,
|
|
3338
|
+
_host_index=_host_index
|
|
3339
|
+
)
|
|
3340
|
+
|
|
3341
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3342
|
+
'200': "ApiWriteEnvelope",
|
|
3343
|
+
'400': "ApiError",
|
|
3344
|
+
'401': "ApiError",
|
|
3345
|
+
'409': "ApiError",
|
|
3346
|
+
'422': "ApiError",
|
|
3347
|
+
'429': "ApiError",
|
|
3348
|
+
}
|
|
3349
|
+
response_data = self.api_client.call_api(
|
|
3350
|
+
*_param,
|
|
3351
|
+
_request_timeout=_request_timeout
|
|
3352
|
+
)
|
|
3353
|
+
response_data.read()
|
|
3354
|
+
return self.api_client.response_deserialize(
|
|
3355
|
+
response_data=response_data,
|
|
3356
|
+
response_types_map=_response_types_map,
|
|
3357
|
+
)
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
@validate_call
|
|
3361
|
+
def replay_webhook_delivery_without_preload_content(
|
|
3362
|
+
self,
|
|
3363
|
+
delivery_id: StrictStr,
|
|
3364
|
+
environment: StrictStr,
|
|
3365
|
+
merchant_account_id: StrictStr,
|
|
3366
|
+
webhook_delivery_replay_request: WebhookDeliveryReplayRequest,
|
|
3367
|
+
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,
|
|
3368
|
+
_request_timeout: Union[
|
|
3369
|
+
None,
|
|
3370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3371
|
+
Tuple[
|
|
3372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3374
|
+
]
|
|
3375
|
+
] = None,
|
|
3376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3377
|
+
_content_type: Optional[StrictStr] = None,
|
|
3378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3380
|
+
) -> RESTResponseType:
|
|
3381
|
+
"""Replay a failed outbound webhook delivery
|
|
3382
|
+
|
|
3383
|
+
|
|
3384
|
+
:param delivery_id: (required)
|
|
3385
|
+
:type delivery_id: str
|
|
3386
|
+
:param environment: (required)
|
|
3387
|
+
:type environment: str
|
|
3388
|
+
:param merchant_account_id: (required)
|
|
3389
|
+
:type merchant_account_id: str
|
|
3390
|
+
:param webhook_delivery_replay_request: (required)
|
|
3391
|
+
:type webhook_delivery_replay_request: WebhookDeliveryReplayRequest
|
|
3392
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3393
|
+
:type idempotency_key: str
|
|
3394
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3395
|
+
number provided, it will be total request
|
|
3396
|
+
timeout. It can also be a pair (tuple) of
|
|
3397
|
+
(connection, read) timeouts.
|
|
3398
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3399
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3400
|
+
request; this effectively ignores the
|
|
3401
|
+
authentication in the spec for a single request.
|
|
3402
|
+
:type _request_auth: dict, optional
|
|
3403
|
+
:param _content_type: force content-type for the request.
|
|
3404
|
+
:type _content_type: str, Optional
|
|
3405
|
+
:param _headers: set to override the headers for a single
|
|
3406
|
+
request; this effectively ignores the headers
|
|
3407
|
+
in the spec for a single request.
|
|
3408
|
+
:type _headers: dict, optional
|
|
3409
|
+
:param _host_index: set to override the host_index for a single
|
|
3410
|
+
request; this effectively ignores the host_index
|
|
3411
|
+
in the spec for a single request.
|
|
3412
|
+
:type _host_index: int, optional
|
|
3413
|
+
:return: Returns the result object.
|
|
3414
|
+
""" # noqa: E501
|
|
3415
|
+
|
|
3416
|
+
_param = self._replay_webhook_delivery_serialize(
|
|
3417
|
+
delivery_id=delivery_id,
|
|
3418
|
+
environment=environment,
|
|
3419
|
+
merchant_account_id=merchant_account_id,
|
|
3420
|
+
webhook_delivery_replay_request=webhook_delivery_replay_request,
|
|
3421
|
+
idempotency_key=idempotency_key,
|
|
3422
|
+
_request_auth=_request_auth,
|
|
3423
|
+
_content_type=_content_type,
|
|
3424
|
+
_headers=_headers,
|
|
3425
|
+
_host_index=_host_index
|
|
3426
|
+
)
|
|
3427
|
+
|
|
3428
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3429
|
+
'200': "ApiWriteEnvelope",
|
|
3430
|
+
'400': "ApiError",
|
|
3431
|
+
'401': "ApiError",
|
|
3432
|
+
'409': "ApiError",
|
|
3433
|
+
'422': "ApiError",
|
|
3434
|
+
'429': "ApiError",
|
|
3435
|
+
}
|
|
3436
|
+
response_data = self.api_client.call_api(
|
|
3437
|
+
*_param,
|
|
3438
|
+
_request_timeout=_request_timeout
|
|
3439
|
+
)
|
|
3440
|
+
return response_data.response
|
|
3441
|
+
|
|
3442
|
+
|
|
3443
|
+
def _replay_webhook_delivery_serialize(
|
|
3444
|
+
self,
|
|
3445
|
+
delivery_id,
|
|
3446
|
+
environment,
|
|
3447
|
+
merchant_account_id,
|
|
3448
|
+
webhook_delivery_replay_request,
|
|
3449
|
+
idempotency_key,
|
|
3450
|
+
_request_auth,
|
|
3451
|
+
_content_type,
|
|
3452
|
+
_headers,
|
|
3453
|
+
_host_index,
|
|
3454
|
+
) -> RequestSerialized:
|
|
3455
|
+
|
|
3456
|
+
_host = None
|
|
3457
|
+
|
|
3458
|
+
_collection_formats: Dict[str, str] = {
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
_path_params: Dict[str, str] = {}
|
|
3462
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3463
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3464
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3465
|
+
_files: Dict[
|
|
3466
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3467
|
+
] = {}
|
|
3468
|
+
_body_params: Optional[bytes] = None
|
|
3469
|
+
|
|
3470
|
+
# process the path parameters
|
|
3471
|
+
if delivery_id is not None:
|
|
3472
|
+
_path_params['deliveryId'] = delivery_id
|
|
3473
|
+
# process the query parameters
|
|
3474
|
+
if environment is not None:
|
|
3475
|
+
|
|
3476
|
+
_query_params.append(('environment', environment))
|
|
3477
|
+
|
|
3478
|
+
if merchant_account_id is not None:
|
|
3479
|
+
|
|
3480
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
3481
|
+
|
|
3482
|
+
# process the header parameters
|
|
3483
|
+
if idempotency_key is not None:
|
|
3484
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
3485
|
+
# process the form parameters
|
|
3486
|
+
# process the body parameter
|
|
3487
|
+
if webhook_delivery_replay_request is not None:
|
|
3488
|
+
_body_params = webhook_delivery_replay_request
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
# set the HTTP header `Accept`
|
|
3492
|
+
if 'Accept' not in _header_params:
|
|
3493
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3494
|
+
[
|
|
3495
|
+
'application/json'
|
|
3496
|
+
]
|
|
3497
|
+
)
|
|
3498
|
+
|
|
3499
|
+
# set the HTTP header `Content-Type`
|
|
3500
|
+
if _content_type:
|
|
3501
|
+
_header_params['Content-Type'] = _content_type
|
|
3502
|
+
else:
|
|
3503
|
+
_default_content_type = (
|
|
3504
|
+
self.api_client.select_header_content_type(
|
|
3505
|
+
[
|
|
3506
|
+
'application/json'
|
|
3507
|
+
]
|
|
3508
|
+
)
|
|
3509
|
+
)
|
|
3510
|
+
if _default_content_type is not None:
|
|
3511
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3512
|
+
|
|
3513
|
+
# authentication setting
|
|
3514
|
+
_auth_settings: List[str] = [
|
|
3515
|
+
'api-key'
|
|
3516
|
+
]
|
|
3517
|
+
|
|
3518
|
+
return self.api_client.param_serialize(
|
|
3519
|
+
method='POST',
|
|
3520
|
+
resource_path='/v1/webhook-deliveries/{deliveryId}/replay',
|
|
3521
|
+
path_params=_path_params,
|
|
3522
|
+
query_params=_query_params,
|
|
3523
|
+
header_params=_header_params,
|
|
3524
|
+
body=_body_params,
|
|
3525
|
+
post_params=_form_params,
|
|
3526
|
+
files=_files,
|
|
3527
|
+
auth_settings=_auth_settings,
|
|
3528
|
+
collection_formats=_collection_formats,
|
|
3529
|
+
_host=_host,
|
|
3530
|
+
_request_auth=_request_auth
|
|
3531
|
+
)
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
|
|
3536
|
+
@validate_call
|
|
3537
|
+
def resend_webhook_event(
|
|
3538
|
+
self,
|
|
3539
|
+
event_id: StrictStr,
|
|
3540
|
+
environment: StrictStr,
|
|
3541
|
+
merchant_account_id: StrictStr,
|
|
3542
|
+
webhook_event_resend_request: WebhookEventResendRequest,
|
|
3543
|
+
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,
|
|
3544
|
+
_request_timeout: Union[
|
|
3545
|
+
None,
|
|
3546
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3547
|
+
Tuple[
|
|
3548
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3549
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3550
|
+
]
|
|
3551
|
+
] = None,
|
|
3552
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3553
|
+
_content_type: Optional[StrictStr] = None,
|
|
3554
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3555
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3556
|
+
) -> ApiWriteEnvelope:
|
|
3557
|
+
"""Create a new delivery for an existing webhook event
|
|
3558
|
+
|
|
3559
|
+
|
|
3560
|
+
:param event_id: (required)
|
|
3561
|
+
:type event_id: str
|
|
3562
|
+
:param environment: (required)
|
|
3563
|
+
:type environment: str
|
|
3564
|
+
:param merchant_account_id: (required)
|
|
3565
|
+
:type merchant_account_id: str
|
|
3566
|
+
:param webhook_event_resend_request: (required)
|
|
3567
|
+
:type webhook_event_resend_request: WebhookEventResendRequest
|
|
3568
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3569
|
+
:type idempotency_key: str
|
|
3570
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3571
|
+
number provided, it will be total request
|
|
3572
|
+
timeout. It can also be a pair (tuple) of
|
|
3573
|
+
(connection, read) timeouts.
|
|
3574
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3575
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3576
|
+
request; this effectively ignores the
|
|
3577
|
+
authentication in the spec for a single request.
|
|
3578
|
+
:type _request_auth: dict, optional
|
|
3579
|
+
:param _content_type: force content-type for the request.
|
|
3580
|
+
:type _content_type: str, Optional
|
|
3581
|
+
:param _headers: set to override the headers for a single
|
|
3582
|
+
request; this effectively ignores the headers
|
|
3583
|
+
in the spec for a single request.
|
|
3584
|
+
:type _headers: dict, optional
|
|
3585
|
+
:param _host_index: set to override the host_index for a single
|
|
3586
|
+
request; this effectively ignores the host_index
|
|
3587
|
+
in the spec for a single request.
|
|
3588
|
+
:type _host_index: int, optional
|
|
3589
|
+
:return: Returns the result object.
|
|
3590
|
+
""" # noqa: E501
|
|
3591
|
+
|
|
3592
|
+
_param = self._resend_webhook_event_serialize(
|
|
3593
|
+
event_id=event_id,
|
|
3594
|
+
environment=environment,
|
|
3595
|
+
merchant_account_id=merchant_account_id,
|
|
3596
|
+
webhook_event_resend_request=webhook_event_resend_request,
|
|
3597
|
+
idempotency_key=idempotency_key,
|
|
3598
|
+
_request_auth=_request_auth,
|
|
3599
|
+
_content_type=_content_type,
|
|
3600
|
+
_headers=_headers,
|
|
3601
|
+
_host_index=_host_index
|
|
3602
|
+
)
|
|
3603
|
+
|
|
3604
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3605
|
+
'200': "ApiWriteEnvelope",
|
|
3606
|
+
'400': "ApiError",
|
|
3607
|
+
'401': "ApiError",
|
|
3608
|
+
'409': "ApiError",
|
|
3609
|
+
'422': "ApiError",
|
|
3610
|
+
'429': "ApiError",
|
|
3611
|
+
}
|
|
3612
|
+
response_data = self.api_client.call_api(
|
|
3613
|
+
*_param,
|
|
3614
|
+
_request_timeout=_request_timeout
|
|
3615
|
+
)
|
|
3616
|
+
response_data.read()
|
|
3617
|
+
return self.api_client.response_deserialize(
|
|
3618
|
+
response_data=response_data,
|
|
3619
|
+
response_types_map=_response_types_map,
|
|
3620
|
+
).data
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
@validate_call
|
|
3624
|
+
def resend_webhook_event_with_http_info(
|
|
3625
|
+
self,
|
|
3626
|
+
event_id: StrictStr,
|
|
3627
|
+
environment: StrictStr,
|
|
3628
|
+
merchant_account_id: StrictStr,
|
|
3629
|
+
webhook_event_resend_request: WebhookEventResendRequest,
|
|
3630
|
+
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,
|
|
3631
|
+
_request_timeout: Union[
|
|
3632
|
+
None,
|
|
3633
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3634
|
+
Tuple[
|
|
3635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3636
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3637
|
+
]
|
|
3638
|
+
] = None,
|
|
3639
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3640
|
+
_content_type: Optional[StrictStr] = None,
|
|
3641
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3642
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3643
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
3644
|
+
"""Create a new delivery for an existing webhook event
|
|
3645
|
+
|
|
3646
|
+
|
|
3647
|
+
:param event_id: (required)
|
|
3648
|
+
:type event_id: str
|
|
3649
|
+
:param environment: (required)
|
|
3650
|
+
:type environment: str
|
|
3651
|
+
:param merchant_account_id: (required)
|
|
3652
|
+
:type merchant_account_id: str
|
|
3653
|
+
:param webhook_event_resend_request: (required)
|
|
3654
|
+
:type webhook_event_resend_request: WebhookEventResendRequest
|
|
3655
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3656
|
+
:type idempotency_key: str
|
|
3657
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3658
|
+
number provided, it will be total request
|
|
3659
|
+
timeout. It can also be a pair (tuple) of
|
|
3660
|
+
(connection, read) timeouts.
|
|
3661
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3662
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3663
|
+
request; this effectively ignores the
|
|
3664
|
+
authentication in the spec for a single request.
|
|
3665
|
+
:type _request_auth: dict, optional
|
|
3666
|
+
:param _content_type: force content-type for the request.
|
|
3667
|
+
:type _content_type: str, Optional
|
|
3668
|
+
:param _headers: set to override the headers for a single
|
|
3669
|
+
request; this effectively ignores the headers
|
|
3670
|
+
in the spec for a single request.
|
|
3671
|
+
:type _headers: dict, optional
|
|
3672
|
+
:param _host_index: set to override the host_index for a single
|
|
3673
|
+
request; this effectively ignores the host_index
|
|
3674
|
+
in the spec for a single request.
|
|
3675
|
+
:type _host_index: int, optional
|
|
3676
|
+
:return: Returns the result object.
|
|
3677
|
+
""" # noqa: E501
|
|
3678
|
+
|
|
3679
|
+
_param = self._resend_webhook_event_serialize(
|
|
3680
|
+
event_id=event_id,
|
|
3681
|
+
environment=environment,
|
|
3682
|
+
merchant_account_id=merchant_account_id,
|
|
3683
|
+
webhook_event_resend_request=webhook_event_resend_request,
|
|
3684
|
+
idempotency_key=idempotency_key,
|
|
3685
|
+
_request_auth=_request_auth,
|
|
3686
|
+
_content_type=_content_type,
|
|
3687
|
+
_headers=_headers,
|
|
3688
|
+
_host_index=_host_index
|
|
3689
|
+
)
|
|
3690
|
+
|
|
3691
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3692
|
+
'200': "ApiWriteEnvelope",
|
|
3693
|
+
'400': "ApiError",
|
|
3694
|
+
'401': "ApiError",
|
|
3695
|
+
'409': "ApiError",
|
|
3696
|
+
'422': "ApiError",
|
|
3697
|
+
'429': "ApiError",
|
|
3698
|
+
}
|
|
3699
|
+
response_data = self.api_client.call_api(
|
|
3700
|
+
*_param,
|
|
3701
|
+
_request_timeout=_request_timeout
|
|
3702
|
+
)
|
|
3703
|
+
response_data.read()
|
|
3704
|
+
return self.api_client.response_deserialize(
|
|
3705
|
+
response_data=response_data,
|
|
3706
|
+
response_types_map=_response_types_map,
|
|
3707
|
+
)
|
|
3708
|
+
|
|
3709
|
+
|
|
3710
|
+
@validate_call
|
|
3711
|
+
def resend_webhook_event_without_preload_content(
|
|
3712
|
+
self,
|
|
3713
|
+
event_id: StrictStr,
|
|
3714
|
+
environment: StrictStr,
|
|
3715
|
+
merchant_account_id: StrictStr,
|
|
3716
|
+
webhook_event_resend_request: WebhookEventResendRequest,
|
|
3717
|
+
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,
|
|
3718
|
+
_request_timeout: Union[
|
|
3719
|
+
None,
|
|
3720
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3721
|
+
Tuple[
|
|
3722
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3723
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3724
|
+
]
|
|
3725
|
+
] = None,
|
|
3726
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3727
|
+
_content_type: Optional[StrictStr] = None,
|
|
3728
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3729
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3730
|
+
) -> RESTResponseType:
|
|
3731
|
+
"""Create a new delivery for an existing webhook event
|
|
3732
|
+
|
|
3733
|
+
|
|
3734
|
+
:param event_id: (required)
|
|
3735
|
+
:type event_id: str
|
|
3736
|
+
:param environment: (required)
|
|
3737
|
+
:type environment: str
|
|
3738
|
+
:param merchant_account_id: (required)
|
|
3739
|
+
:type merchant_account_id: str
|
|
3740
|
+
:param webhook_event_resend_request: (required)
|
|
3741
|
+
:type webhook_event_resend_request: WebhookEventResendRequest
|
|
3742
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3743
|
+
:type idempotency_key: str
|
|
3744
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3745
|
+
number provided, it will be total request
|
|
3746
|
+
timeout. It can also be a pair (tuple) of
|
|
3747
|
+
(connection, read) timeouts.
|
|
3748
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3749
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3750
|
+
request; this effectively ignores the
|
|
3751
|
+
authentication in the spec for a single request.
|
|
3752
|
+
:type _request_auth: dict, optional
|
|
3753
|
+
:param _content_type: force content-type for the request.
|
|
3754
|
+
:type _content_type: str, Optional
|
|
3755
|
+
:param _headers: set to override the headers for a single
|
|
3756
|
+
request; this effectively ignores the headers
|
|
3757
|
+
in the spec for a single request.
|
|
3758
|
+
:type _headers: dict, optional
|
|
3759
|
+
:param _host_index: set to override the host_index for a single
|
|
3760
|
+
request; this effectively ignores the host_index
|
|
3761
|
+
in the spec for a single request.
|
|
3762
|
+
:type _host_index: int, optional
|
|
3763
|
+
:return: Returns the result object.
|
|
3764
|
+
""" # noqa: E501
|
|
3765
|
+
|
|
3766
|
+
_param = self._resend_webhook_event_serialize(
|
|
3767
|
+
event_id=event_id,
|
|
3768
|
+
environment=environment,
|
|
3769
|
+
merchant_account_id=merchant_account_id,
|
|
3770
|
+
webhook_event_resend_request=webhook_event_resend_request,
|
|
3771
|
+
idempotency_key=idempotency_key,
|
|
3772
|
+
_request_auth=_request_auth,
|
|
3773
|
+
_content_type=_content_type,
|
|
3774
|
+
_headers=_headers,
|
|
3775
|
+
_host_index=_host_index
|
|
3776
|
+
)
|
|
3777
|
+
|
|
3778
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3779
|
+
'200': "ApiWriteEnvelope",
|
|
3780
|
+
'400': "ApiError",
|
|
3781
|
+
'401': "ApiError",
|
|
3782
|
+
'409': "ApiError",
|
|
3783
|
+
'422': "ApiError",
|
|
3784
|
+
'429': "ApiError",
|
|
3785
|
+
}
|
|
3786
|
+
response_data = self.api_client.call_api(
|
|
3787
|
+
*_param,
|
|
3788
|
+
_request_timeout=_request_timeout
|
|
3789
|
+
)
|
|
3790
|
+
return response_data.response
|
|
3791
|
+
|
|
3792
|
+
|
|
3793
|
+
def _resend_webhook_event_serialize(
|
|
3794
|
+
self,
|
|
3795
|
+
event_id,
|
|
3796
|
+
environment,
|
|
3797
|
+
merchant_account_id,
|
|
3798
|
+
webhook_event_resend_request,
|
|
3799
|
+
idempotency_key,
|
|
3800
|
+
_request_auth,
|
|
3801
|
+
_content_type,
|
|
3802
|
+
_headers,
|
|
3803
|
+
_host_index,
|
|
3804
|
+
) -> RequestSerialized:
|
|
3805
|
+
|
|
3806
|
+
_host = None
|
|
3807
|
+
|
|
3808
|
+
_collection_formats: Dict[str, str] = {
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
_path_params: Dict[str, str] = {}
|
|
3812
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3813
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3814
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3815
|
+
_files: Dict[
|
|
3816
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3817
|
+
] = {}
|
|
3818
|
+
_body_params: Optional[bytes] = None
|
|
3819
|
+
|
|
3820
|
+
# process the path parameters
|
|
3821
|
+
if event_id is not None:
|
|
3822
|
+
_path_params['eventId'] = event_id
|
|
3823
|
+
# process the query parameters
|
|
3824
|
+
if environment is not None:
|
|
3825
|
+
|
|
3826
|
+
_query_params.append(('environment', environment))
|
|
3827
|
+
|
|
3828
|
+
if merchant_account_id is not None:
|
|
3829
|
+
|
|
3830
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
3831
|
+
|
|
3832
|
+
# process the header parameters
|
|
3833
|
+
if idempotency_key is not None:
|
|
3834
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
3835
|
+
# process the form parameters
|
|
3836
|
+
# process the body parameter
|
|
3837
|
+
if webhook_event_resend_request is not None:
|
|
3838
|
+
_body_params = webhook_event_resend_request
|
|
3839
|
+
|
|
3840
|
+
|
|
3841
|
+
# set the HTTP header `Accept`
|
|
3842
|
+
if 'Accept' not in _header_params:
|
|
3843
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3844
|
+
[
|
|
3845
|
+
'application/json'
|
|
3846
|
+
]
|
|
3847
|
+
)
|
|
3848
|
+
|
|
3849
|
+
# set the HTTP header `Content-Type`
|
|
3850
|
+
if _content_type:
|
|
3851
|
+
_header_params['Content-Type'] = _content_type
|
|
3852
|
+
else:
|
|
3853
|
+
_default_content_type = (
|
|
3854
|
+
self.api_client.select_header_content_type(
|
|
3855
|
+
[
|
|
3856
|
+
'application/json'
|
|
3857
|
+
]
|
|
3858
|
+
)
|
|
3859
|
+
)
|
|
3860
|
+
if _default_content_type is not None:
|
|
3861
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3862
|
+
|
|
3863
|
+
# authentication setting
|
|
3864
|
+
_auth_settings: List[str] = [
|
|
3865
|
+
'api-key'
|
|
3866
|
+
]
|
|
3867
|
+
|
|
3868
|
+
return self.api_client.param_serialize(
|
|
3869
|
+
method='POST',
|
|
3870
|
+
resource_path='/v1/events/{eventId}/resend',
|
|
3871
|
+
path_params=_path_params,
|
|
3872
|
+
query_params=_query_params,
|
|
3873
|
+
header_params=_header_params,
|
|
3874
|
+
body=_body_params,
|
|
3875
|
+
post_params=_form_params,
|
|
3876
|
+
files=_files,
|
|
3877
|
+
auth_settings=_auth_settings,
|
|
3878
|
+
collection_formats=_collection_formats,
|
|
3879
|
+
_host=_host,
|
|
3880
|
+
_request_auth=_request_auth
|
|
3881
|
+
)
|
|
3882
|
+
|
|
3883
|
+
|
|
3884
|
+
|
|
3885
|
+
|
|
3886
|
+
@validate_call
|
|
3887
|
+
def rotate_webhook_endpoint_secret(
|
|
3888
|
+
self,
|
|
3889
|
+
endpoint_id: StrictStr,
|
|
3890
|
+
environment: StrictStr,
|
|
3891
|
+
merchant_account_id: StrictStr,
|
|
3892
|
+
webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest,
|
|
3893
|
+
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,
|
|
3894
|
+
_request_timeout: Union[
|
|
3895
|
+
None,
|
|
3896
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3897
|
+
Tuple[
|
|
3898
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3899
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3900
|
+
]
|
|
3901
|
+
] = None,
|
|
3902
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3903
|
+
_content_type: Optional[StrictStr] = None,
|
|
3904
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3905
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3906
|
+
) -> ApiWriteEnvelope:
|
|
3907
|
+
"""Rotate an outbound webhook signing secret
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
:param endpoint_id: (required)
|
|
3911
|
+
:type endpoint_id: str
|
|
3912
|
+
:param environment: (required)
|
|
3913
|
+
:type environment: str
|
|
3914
|
+
:param merchant_account_id: (required)
|
|
3915
|
+
:type merchant_account_id: str
|
|
3916
|
+
:param webhook_endpoint_secret_rotate_request: (required)
|
|
3917
|
+
:type webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest
|
|
3918
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
3919
|
+
:type idempotency_key: str
|
|
3920
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3921
|
+
number provided, it will be total request
|
|
3922
|
+
timeout. It can also be a pair (tuple) of
|
|
3923
|
+
(connection, read) timeouts.
|
|
3924
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3925
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3926
|
+
request; this effectively ignores the
|
|
3927
|
+
authentication in the spec for a single request.
|
|
3928
|
+
:type _request_auth: dict, optional
|
|
3929
|
+
:param _content_type: force content-type for the request.
|
|
3930
|
+
:type _content_type: str, Optional
|
|
3931
|
+
:param _headers: set to override the headers for a single
|
|
3932
|
+
request; this effectively ignores the headers
|
|
3933
|
+
in the spec for a single request.
|
|
3934
|
+
:type _headers: dict, optional
|
|
3935
|
+
:param _host_index: set to override the host_index for a single
|
|
3936
|
+
request; this effectively ignores the host_index
|
|
3937
|
+
in the spec for a single request.
|
|
3938
|
+
:type _host_index: int, optional
|
|
3939
|
+
:return: Returns the result object.
|
|
3940
|
+
""" # noqa: E501
|
|
3941
|
+
|
|
3942
|
+
_param = self._rotate_webhook_endpoint_secret_serialize(
|
|
3943
|
+
endpoint_id=endpoint_id,
|
|
3944
|
+
environment=environment,
|
|
3945
|
+
merchant_account_id=merchant_account_id,
|
|
3946
|
+
webhook_endpoint_secret_rotate_request=webhook_endpoint_secret_rotate_request,
|
|
3947
|
+
idempotency_key=idempotency_key,
|
|
3948
|
+
_request_auth=_request_auth,
|
|
3949
|
+
_content_type=_content_type,
|
|
3950
|
+
_headers=_headers,
|
|
3951
|
+
_host_index=_host_index
|
|
3952
|
+
)
|
|
3953
|
+
|
|
3954
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3955
|
+
'200': "ApiWriteEnvelope",
|
|
3956
|
+
'400': "ApiError",
|
|
3957
|
+
'401': "ApiError",
|
|
3958
|
+
'409': "ApiError",
|
|
3959
|
+
'422': "ApiError",
|
|
3960
|
+
'429': "ApiError",
|
|
3961
|
+
}
|
|
3962
|
+
response_data = self.api_client.call_api(
|
|
3963
|
+
*_param,
|
|
3964
|
+
_request_timeout=_request_timeout
|
|
3965
|
+
)
|
|
3966
|
+
response_data.read()
|
|
3967
|
+
return self.api_client.response_deserialize(
|
|
3968
|
+
response_data=response_data,
|
|
3969
|
+
response_types_map=_response_types_map,
|
|
3970
|
+
).data
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
@validate_call
|
|
3974
|
+
def rotate_webhook_endpoint_secret_with_http_info(
|
|
3975
|
+
self,
|
|
3976
|
+
endpoint_id: StrictStr,
|
|
3977
|
+
environment: StrictStr,
|
|
3978
|
+
merchant_account_id: StrictStr,
|
|
3979
|
+
webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest,
|
|
3980
|
+
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,
|
|
3981
|
+
_request_timeout: Union[
|
|
3982
|
+
None,
|
|
3983
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3984
|
+
Tuple[
|
|
3985
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3986
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3987
|
+
]
|
|
3988
|
+
] = None,
|
|
3989
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3990
|
+
_content_type: Optional[StrictStr] = None,
|
|
3991
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3992
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3993
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
3994
|
+
"""Rotate an outbound webhook signing secret
|
|
3995
|
+
|
|
3996
|
+
|
|
3997
|
+
:param endpoint_id: (required)
|
|
3998
|
+
:type endpoint_id: str
|
|
3999
|
+
:param environment: (required)
|
|
4000
|
+
:type environment: str
|
|
4001
|
+
:param merchant_account_id: (required)
|
|
4002
|
+
:type merchant_account_id: str
|
|
4003
|
+
:param webhook_endpoint_secret_rotate_request: (required)
|
|
4004
|
+
:type webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest
|
|
4005
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4006
|
+
:type idempotency_key: str
|
|
4007
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4008
|
+
number provided, it will be total request
|
|
4009
|
+
timeout. It can also be a pair (tuple) of
|
|
4010
|
+
(connection, read) timeouts.
|
|
4011
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4012
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4013
|
+
request; this effectively ignores the
|
|
4014
|
+
authentication in the spec for a single request.
|
|
4015
|
+
:type _request_auth: dict, optional
|
|
4016
|
+
:param _content_type: force content-type for the request.
|
|
4017
|
+
:type _content_type: str, Optional
|
|
4018
|
+
:param _headers: set to override the headers for a single
|
|
4019
|
+
request; this effectively ignores the headers
|
|
4020
|
+
in the spec for a single request.
|
|
4021
|
+
:type _headers: dict, optional
|
|
4022
|
+
:param _host_index: set to override the host_index for a single
|
|
4023
|
+
request; this effectively ignores the host_index
|
|
4024
|
+
in the spec for a single request.
|
|
4025
|
+
:type _host_index: int, optional
|
|
4026
|
+
:return: Returns the result object.
|
|
4027
|
+
""" # noqa: E501
|
|
4028
|
+
|
|
4029
|
+
_param = self._rotate_webhook_endpoint_secret_serialize(
|
|
4030
|
+
endpoint_id=endpoint_id,
|
|
4031
|
+
environment=environment,
|
|
4032
|
+
merchant_account_id=merchant_account_id,
|
|
4033
|
+
webhook_endpoint_secret_rotate_request=webhook_endpoint_secret_rotate_request,
|
|
4034
|
+
idempotency_key=idempotency_key,
|
|
4035
|
+
_request_auth=_request_auth,
|
|
4036
|
+
_content_type=_content_type,
|
|
4037
|
+
_headers=_headers,
|
|
4038
|
+
_host_index=_host_index
|
|
4039
|
+
)
|
|
4040
|
+
|
|
4041
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4042
|
+
'200': "ApiWriteEnvelope",
|
|
4043
|
+
'400': "ApiError",
|
|
4044
|
+
'401': "ApiError",
|
|
4045
|
+
'409': "ApiError",
|
|
4046
|
+
'422': "ApiError",
|
|
4047
|
+
'429': "ApiError",
|
|
4048
|
+
}
|
|
4049
|
+
response_data = self.api_client.call_api(
|
|
4050
|
+
*_param,
|
|
4051
|
+
_request_timeout=_request_timeout
|
|
4052
|
+
)
|
|
4053
|
+
response_data.read()
|
|
4054
|
+
return self.api_client.response_deserialize(
|
|
4055
|
+
response_data=response_data,
|
|
4056
|
+
response_types_map=_response_types_map,
|
|
4057
|
+
)
|
|
4058
|
+
|
|
4059
|
+
|
|
4060
|
+
@validate_call
|
|
4061
|
+
def rotate_webhook_endpoint_secret_without_preload_content(
|
|
4062
|
+
self,
|
|
4063
|
+
endpoint_id: StrictStr,
|
|
4064
|
+
environment: StrictStr,
|
|
4065
|
+
merchant_account_id: StrictStr,
|
|
4066
|
+
webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest,
|
|
4067
|
+
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,
|
|
4068
|
+
_request_timeout: Union[
|
|
4069
|
+
None,
|
|
4070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4071
|
+
Tuple[
|
|
4072
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4073
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4074
|
+
]
|
|
4075
|
+
] = None,
|
|
4076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4077
|
+
_content_type: Optional[StrictStr] = None,
|
|
4078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4080
|
+
) -> RESTResponseType:
|
|
4081
|
+
"""Rotate an outbound webhook signing secret
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
:param endpoint_id: (required)
|
|
4085
|
+
:type endpoint_id: str
|
|
4086
|
+
:param environment: (required)
|
|
4087
|
+
:type environment: str
|
|
4088
|
+
:param merchant_account_id: (required)
|
|
4089
|
+
:type merchant_account_id: str
|
|
4090
|
+
:param webhook_endpoint_secret_rotate_request: (required)
|
|
4091
|
+
:type webhook_endpoint_secret_rotate_request: WebhookEndpointSecretRotateRequest
|
|
4092
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4093
|
+
:type idempotency_key: str
|
|
4094
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4095
|
+
number provided, it will be total request
|
|
4096
|
+
timeout. It can also be a pair (tuple) of
|
|
4097
|
+
(connection, read) timeouts.
|
|
4098
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4099
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4100
|
+
request; this effectively ignores the
|
|
4101
|
+
authentication in the spec for a single request.
|
|
4102
|
+
:type _request_auth: dict, optional
|
|
4103
|
+
:param _content_type: force content-type for the request.
|
|
4104
|
+
:type _content_type: str, Optional
|
|
4105
|
+
:param _headers: set to override the headers for a single
|
|
4106
|
+
request; this effectively ignores the headers
|
|
4107
|
+
in the spec for a single request.
|
|
4108
|
+
:type _headers: dict, optional
|
|
4109
|
+
:param _host_index: set to override the host_index for a single
|
|
4110
|
+
request; this effectively ignores the host_index
|
|
4111
|
+
in the spec for a single request.
|
|
4112
|
+
:type _host_index: int, optional
|
|
4113
|
+
:return: Returns the result object.
|
|
4114
|
+
""" # noqa: E501
|
|
4115
|
+
|
|
4116
|
+
_param = self._rotate_webhook_endpoint_secret_serialize(
|
|
4117
|
+
endpoint_id=endpoint_id,
|
|
4118
|
+
environment=environment,
|
|
4119
|
+
merchant_account_id=merchant_account_id,
|
|
4120
|
+
webhook_endpoint_secret_rotate_request=webhook_endpoint_secret_rotate_request,
|
|
4121
|
+
idempotency_key=idempotency_key,
|
|
4122
|
+
_request_auth=_request_auth,
|
|
4123
|
+
_content_type=_content_type,
|
|
4124
|
+
_headers=_headers,
|
|
4125
|
+
_host_index=_host_index
|
|
4126
|
+
)
|
|
4127
|
+
|
|
4128
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4129
|
+
'200': "ApiWriteEnvelope",
|
|
4130
|
+
'400': "ApiError",
|
|
4131
|
+
'401': "ApiError",
|
|
4132
|
+
'409': "ApiError",
|
|
4133
|
+
'422': "ApiError",
|
|
4134
|
+
'429': "ApiError",
|
|
4135
|
+
}
|
|
4136
|
+
response_data = self.api_client.call_api(
|
|
4137
|
+
*_param,
|
|
4138
|
+
_request_timeout=_request_timeout
|
|
4139
|
+
)
|
|
4140
|
+
return response_data.response
|
|
4141
|
+
|
|
4142
|
+
|
|
4143
|
+
def _rotate_webhook_endpoint_secret_serialize(
|
|
4144
|
+
self,
|
|
4145
|
+
endpoint_id,
|
|
4146
|
+
environment,
|
|
4147
|
+
merchant_account_id,
|
|
4148
|
+
webhook_endpoint_secret_rotate_request,
|
|
4149
|
+
idempotency_key,
|
|
4150
|
+
_request_auth,
|
|
4151
|
+
_content_type,
|
|
4152
|
+
_headers,
|
|
4153
|
+
_host_index,
|
|
4154
|
+
) -> RequestSerialized:
|
|
4155
|
+
|
|
4156
|
+
_host = None
|
|
4157
|
+
|
|
4158
|
+
_collection_formats: Dict[str, str] = {
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4161
|
+
_path_params: Dict[str, str] = {}
|
|
4162
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4163
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4164
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4165
|
+
_files: Dict[
|
|
4166
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4167
|
+
] = {}
|
|
4168
|
+
_body_params: Optional[bytes] = None
|
|
4169
|
+
|
|
4170
|
+
# process the path parameters
|
|
4171
|
+
if endpoint_id is not None:
|
|
4172
|
+
_path_params['endpointId'] = endpoint_id
|
|
4173
|
+
# process the query parameters
|
|
4174
|
+
if environment is not None:
|
|
4175
|
+
|
|
4176
|
+
_query_params.append(('environment', environment))
|
|
4177
|
+
|
|
4178
|
+
if merchant_account_id is not None:
|
|
4179
|
+
|
|
4180
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
4181
|
+
|
|
4182
|
+
# process the header parameters
|
|
4183
|
+
if idempotency_key is not None:
|
|
4184
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
4185
|
+
# process the form parameters
|
|
4186
|
+
# process the body parameter
|
|
4187
|
+
if webhook_endpoint_secret_rotate_request is not None:
|
|
4188
|
+
_body_params = webhook_endpoint_secret_rotate_request
|
|
4189
|
+
|
|
4190
|
+
|
|
4191
|
+
# set the HTTP header `Accept`
|
|
4192
|
+
if 'Accept' not in _header_params:
|
|
4193
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4194
|
+
[
|
|
4195
|
+
'application/json'
|
|
4196
|
+
]
|
|
4197
|
+
)
|
|
4198
|
+
|
|
4199
|
+
# set the HTTP header `Content-Type`
|
|
4200
|
+
if _content_type:
|
|
4201
|
+
_header_params['Content-Type'] = _content_type
|
|
4202
|
+
else:
|
|
4203
|
+
_default_content_type = (
|
|
4204
|
+
self.api_client.select_header_content_type(
|
|
4205
|
+
[
|
|
4206
|
+
'application/json'
|
|
4207
|
+
]
|
|
4208
|
+
)
|
|
4209
|
+
)
|
|
4210
|
+
if _default_content_type is not None:
|
|
4211
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4212
|
+
|
|
4213
|
+
# authentication setting
|
|
4214
|
+
_auth_settings: List[str] = [
|
|
4215
|
+
'api-key'
|
|
4216
|
+
]
|
|
4217
|
+
|
|
4218
|
+
return self.api_client.param_serialize(
|
|
4219
|
+
method='POST',
|
|
4220
|
+
resource_path='/v1/webhook-endpoints/{endpointId}/rotate-secret',
|
|
4221
|
+
path_params=_path_params,
|
|
4222
|
+
query_params=_query_params,
|
|
4223
|
+
header_params=_header_params,
|
|
4224
|
+
body=_body_params,
|
|
4225
|
+
post_params=_form_params,
|
|
4226
|
+
files=_files,
|
|
4227
|
+
auth_settings=_auth_settings,
|
|
4228
|
+
collection_formats=_collection_formats,
|
|
4229
|
+
_host=_host,
|
|
4230
|
+
_request_auth=_request_auth
|
|
4231
|
+
)
|
|
4232
|
+
|
|
4233
|
+
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
@validate_call
|
|
4237
|
+
def test_webhook_endpoint(
|
|
4238
|
+
self,
|
|
4239
|
+
endpoint_id: StrictStr,
|
|
4240
|
+
environment: StrictStr,
|
|
4241
|
+
merchant_account_id: StrictStr,
|
|
4242
|
+
webhook_endpoint_test_request: WebhookEndpointTestRequest,
|
|
4243
|
+
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,
|
|
4244
|
+
_request_timeout: Union[
|
|
4245
|
+
None,
|
|
4246
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4247
|
+
Tuple[
|
|
4248
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4249
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4250
|
+
]
|
|
4251
|
+
] = None,
|
|
4252
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4253
|
+
_content_type: Optional[StrictStr] = None,
|
|
4254
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4255
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4256
|
+
) -> ApiWriteEnvelope:
|
|
4257
|
+
"""Create and optionally dispatch a test webhook delivery
|
|
4258
|
+
|
|
4259
|
+
|
|
4260
|
+
:param endpoint_id: (required)
|
|
4261
|
+
:type endpoint_id: str
|
|
4262
|
+
:param environment: (required)
|
|
4263
|
+
:type environment: str
|
|
4264
|
+
:param merchant_account_id: (required)
|
|
4265
|
+
:type merchant_account_id: str
|
|
4266
|
+
:param webhook_endpoint_test_request: (required)
|
|
4267
|
+
:type webhook_endpoint_test_request: WebhookEndpointTestRequest
|
|
4268
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4269
|
+
:type idempotency_key: str
|
|
4270
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4271
|
+
number provided, it will be total request
|
|
4272
|
+
timeout. It can also be a pair (tuple) of
|
|
4273
|
+
(connection, read) timeouts.
|
|
4274
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4275
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4276
|
+
request; this effectively ignores the
|
|
4277
|
+
authentication in the spec for a single request.
|
|
4278
|
+
:type _request_auth: dict, optional
|
|
4279
|
+
:param _content_type: force content-type for the request.
|
|
4280
|
+
:type _content_type: str, Optional
|
|
4281
|
+
:param _headers: set to override the headers for a single
|
|
4282
|
+
request; this effectively ignores the headers
|
|
4283
|
+
in the spec for a single request.
|
|
4284
|
+
:type _headers: dict, optional
|
|
4285
|
+
:param _host_index: set to override the host_index for a single
|
|
4286
|
+
request; this effectively ignores the host_index
|
|
4287
|
+
in the spec for a single request.
|
|
4288
|
+
:type _host_index: int, optional
|
|
4289
|
+
:return: Returns the result object.
|
|
4290
|
+
""" # noqa: E501
|
|
4291
|
+
|
|
4292
|
+
_param = self._test_webhook_endpoint_serialize(
|
|
4293
|
+
endpoint_id=endpoint_id,
|
|
4294
|
+
environment=environment,
|
|
4295
|
+
merchant_account_id=merchant_account_id,
|
|
4296
|
+
webhook_endpoint_test_request=webhook_endpoint_test_request,
|
|
4297
|
+
idempotency_key=idempotency_key,
|
|
4298
|
+
_request_auth=_request_auth,
|
|
4299
|
+
_content_type=_content_type,
|
|
4300
|
+
_headers=_headers,
|
|
4301
|
+
_host_index=_host_index
|
|
4302
|
+
)
|
|
4303
|
+
|
|
4304
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4305
|
+
'200': "ApiWriteEnvelope",
|
|
4306
|
+
'400': "ApiError",
|
|
4307
|
+
'401': "ApiError",
|
|
4308
|
+
'409': "ApiError",
|
|
4309
|
+
'422': "ApiError",
|
|
4310
|
+
'429': "ApiError",
|
|
4311
|
+
}
|
|
4312
|
+
response_data = self.api_client.call_api(
|
|
4313
|
+
*_param,
|
|
4314
|
+
_request_timeout=_request_timeout
|
|
4315
|
+
)
|
|
4316
|
+
response_data.read()
|
|
4317
|
+
return self.api_client.response_deserialize(
|
|
4318
|
+
response_data=response_data,
|
|
4319
|
+
response_types_map=_response_types_map,
|
|
4320
|
+
).data
|
|
4321
|
+
|
|
4322
|
+
|
|
4323
|
+
@validate_call
|
|
4324
|
+
def test_webhook_endpoint_with_http_info(
|
|
4325
|
+
self,
|
|
4326
|
+
endpoint_id: StrictStr,
|
|
4327
|
+
environment: StrictStr,
|
|
4328
|
+
merchant_account_id: StrictStr,
|
|
4329
|
+
webhook_endpoint_test_request: WebhookEndpointTestRequest,
|
|
4330
|
+
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,
|
|
4331
|
+
_request_timeout: Union[
|
|
4332
|
+
None,
|
|
4333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4334
|
+
Tuple[
|
|
4335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4337
|
+
]
|
|
4338
|
+
] = None,
|
|
4339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4340
|
+
_content_type: Optional[StrictStr] = None,
|
|
4341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4343
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
4344
|
+
"""Create and optionally dispatch a test webhook delivery
|
|
4345
|
+
|
|
4346
|
+
|
|
4347
|
+
:param endpoint_id: (required)
|
|
4348
|
+
:type endpoint_id: str
|
|
4349
|
+
:param environment: (required)
|
|
4350
|
+
:type environment: str
|
|
4351
|
+
:param merchant_account_id: (required)
|
|
4352
|
+
:type merchant_account_id: str
|
|
4353
|
+
:param webhook_endpoint_test_request: (required)
|
|
4354
|
+
:type webhook_endpoint_test_request: WebhookEndpointTestRequest
|
|
4355
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4356
|
+
:type idempotency_key: str
|
|
4357
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4358
|
+
number provided, it will be total request
|
|
4359
|
+
timeout. It can also be a pair (tuple) of
|
|
4360
|
+
(connection, read) timeouts.
|
|
4361
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4362
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4363
|
+
request; this effectively ignores the
|
|
4364
|
+
authentication in the spec for a single request.
|
|
4365
|
+
:type _request_auth: dict, optional
|
|
4366
|
+
:param _content_type: force content-type for the request.
|
|
4367
|
+
:type _content_type: str, Optional
|
|
4368
|
+
:param _headers: set to override the headers for a single
|
|
4369
|
+
request; this effectively ignores the headers
|
|
4370
|
+
in the spec for a single request.
|
|
4371
|
+
:type _headers: dict, optional
|
|
4372
|
+
:param _host_index: set to override the host_index for a single
|
|
4373
|
+
request; this effectively ignores the host_index
|
|
4374
|
+
in the spec for a single request.
|
|
4375
|
+
:type _host_index: int, optional
|
|
4376
|
+
:return: Returns the result object.
|
|
4377
|
+
""" # noqa: E501
|
|
4378
|
+
|
|
4379
|
+
_param = self._test_webhook_endpoint_serialize(
|
|
4380
|
+
endpoint_id=endpoint_id,
|
|
4381
|
+
environment=environment,
|
|
4382
|
+
merchant_account_id=merchant_account_id,
|
|
4383
|
+
webhook_endpoint_test_request=webhook_endpoint_test_request,
|
|
4384
|
+
idempotency_key=idempotency_key,
|
|
4385
|
+
_request_auth=_request_auth,
|
|
4386
|
+
_content_type=_content_type,
|
|
4387
|
+
_headers=_headers,
|
|
4388
|
+
_host_index=_host_index
|
|
4389
|
+
)
|
|
4390
|
+
|
|
4391
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4392
|
+
'200': "ApiWriteEnvelope",
|
|
4393
|
+
'400': "ApiError",
|
|
4394
|
+
'401': "ApiError",
|
|
4395
|
+
'409': "ApiError",
|
|
4396
|
+
'422': "ApiError",
|
|
4397
|
+
'429': "ApiError",
|
|
4398
|
+
}
|
|
4399
|
+
response_data = self.api_client.call_api(
|
|
4400
|
+
*_param,
|
|
4401
|
+
_request_timeout=_request_timeout
|
|
4402
|
+
)
|
|
4403
|
+
response_data.read()
|
|
4404
|
+
return self.api_client.response_deserialize(
|
|
4405
|
+
response_data=response_data,
|
|
4406
|
+
response_types_map=_response_types_map,
|
|
4407
|
+
)
|
|
4408
|
+
|
|
4409
|
+
|
|
4410
|
+
@validate_call
|
|
4411
|
+
def test_webhook_endpoint_without_preload_content(
|
|
4412
|
+
self,
|
|
4413
|
+
endpoint_id: StrictStr,
|
|
4414
|
+
environment: StrictStr,
|
|
4415
|
+
merchant_account_id: StrictStr,
|
|
4416
|
+
webhook_endpoint_test_request: WebhookEndpointTestRequest,
|
|
4417
|
+
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,
|
|
4418
|
+
_request_timeout: Union[
|
|
4419
|
+
None,
|
|
4420
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4421
|
+
Tuple[
|
|
4422
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4423
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4424
|
+
]
|
|
4425
|
+
] = None,
|
|
4426
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4427
|
+
_content_type: Optional[StrictStr] = None,
|
|
4428
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4429
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4430
|
+
) -> RESTResponseType:
|
|
4431
|
+
"""Create and optionally dispatch a test webhook delivery
|
|
4432
|
+
|
|
4433
|
+
|
|
4434
|
+
:param endpoint_id: (required)
|
|
4435
|
+
:type endpoint_id: str
|
|
4436
|
+
:param environment: (required)
|
|
4437
|
+
:type environment: str
|
|
4438
|
+
:param merchant_account_id: (required)
|
|
4439
|
+
:type merchant_account_id: str
|
|
4440
|
+
:param webhook_endpoint_test_request: (required)
|
|
4441
|
+
:type webhook_endpoint_test_request: WebhookEndpointTestRequest
|
|
4442
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4443
|
+
:type idempotency_key: str
|
|
4444
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4445
|
+
number provided, it will be total request
|
|
4446
|
+
timeout. It can also be a pair (tuple) of
|
|
4447
|
+
(connection, read) timeouts.
|
|
4448
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4449
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4450
|
+
request; this effectively ignores the
|
|
4451
|
+
authentication in the spec for a single request.
|
|
4452
|
+
:type _request_auth: dict, optional
|
|
4453
|
+
:param _content_type: force content-type for the request.
|
|
4454
|
+
:type _content_type: str, Optional
|
|
4455
|
+
:param _headers: set to override the headers for a single
|
|
4456
|
+
request; this effectively ignores the headers
|
|
4457
|
+
in the spec for a single request.
|
|
4458
|
+
:type _headers: dict, optional
|
|
4459
|
+
:param _host_index: set to override the host_index for a single
|
|
4460
|
+
request; this effectively ignores the host_index
|
|
4461
|
+
in the spec for a single request.
|
|
4462
|
+
:type _host_index: int, optional
|
|
4463
|
+
:return: Returns the result object.
|
|
4464
|
+
""" # noqa: E501
|
|
4465
|
+
|
|
4466
|
+
_param = self._test_webhook_endpoint_serialize(
|
|
4467
|
+
endpoint_id=endpoint_id,
|
|
4468
|
+
environment=environment,
|
|
4469
|
+
merchant_account_id=merchant_account_id,
|
|
4470
|
+
webhook_endpoint_test_request=webhook_endpoint_test_request,
|
|
4471
|
+
idempotency_key=idempotency_key,
|
|
4472
|
+
_request_auth=_request_auth,
|
|
4473
|
+
_content_type=_content_type,
|
|
4474
|
+
_headers=_headers,
|
|
4475
|
+
_host_index=_host_index
|
|
4476
|
+
)
|
|
4477
|
+
|
|
4478
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4479
|
+
'200': "ApiWriteEnvelope",
|
|
4480
|
+
'400': "ApiError",
|
|
4481
|
+
'401': "ApiError",
|
|
4482
|
+
'409': "ApiError",
|
|
4483
|
+
'422': "ApiError",
|
|
4484
|
+
'429': "ApiError",
|
|
4485
|
+
}
|
|
4486
|
+
response_data = self.api_client.call_api(
|
|
4487
|
+
*_param,
|
|
4488
|
+
_request_timeout=_request_timeout
|
|
4489
|
+
)
|
|
4490
|
+
return response_data.response
|
|
4491
|
+
|
|
4492
|
+
|
|
4493
|
+
def _test_webhook_endpoint_serialize(
|
|
4494
|
+
self,
|
|
4495
|
+
endpoint_id,
|
|
4496
|
+
environment,
|
|
4497
|
+
merchant_account_id,
|
|
4498
|
+
webhook_endpoint_test_request,
|
|
4499
|
+
idempotency_key,
|
|
4500
|
+
_request_auth,
|
|
4501
|
+
_content_type,
|
|
4502
|
+
_headers,
|
|
4503
|
+
_host_index,
|
|
4504
|
+
) -> RequestSerialized:
|
|
4505
|
+
|
|
4506
|
+
_host = None
|
|
4507
|
+
|
|
4508
|
+
_collection_formats: Dict[str, str] = {
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
_path_params: Dict[str, str] = {}
|
|
4512
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4513
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4514
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4515
|
+
_files: Dict[
|
|
4516
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4517
|
+
] = {}
|
|
4518
|
+
_body_params: Optional[bytes] = None
|
|
4519
|
+
|
|
4520
|
+
# process the path parameters
|
|
4521
|
+
if endpoint_id is not None:
|
|
4522
|
+
_path_params['endpointId'] = endpoint_id
|
|
4523
|
+
# process the query parameters
|
|
4524
|
+
if environment is not None:
|
|
4525
|
+
|
|
4526
|
+
_query_params.append(('environment', environment))
|
|
4527
|
+
|
|
4528
|
+
if merchant_account_id is not None:
|
|
4529
|
+
|
|
4530
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
4531
|
+
|
|
4532
|
+
# process the header parameters
|
|
4533
|
+
if idempotency_key is not None:
|
|
4534
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
4535
|
+
# process the form parameters
|
|
4536
|
+
# process the body parameter
|
|
4537
|
+
if webhook_endpoint_test_request is not None:
|
|
4538
|
+
_body_params = webhook_endpoint_test_request
|
|
4539
|
+
|
|
4540
|
+
|
|
4541
|
+
# set the HTTP header `Accept`
|
|
4542
|
+
if 'Accept' not in _header_params:
|
|
4543
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4544
|
+
[
|
|
4545
|
+
'application/json'
|
|
4546
|
+
]
|
|
4547
|
+
)
|
|
4548
|
+
|
|
4549
|
+
# set the HTTP header `Content-Type`
|
|
4550
|
+
if _content_type:
|
|
4551
|
+
_header_params['Content-Type'] = _content_type
|
|
4552
|
+
else:
|
|
4553
|
+
_default_content_type = (
|
|
4554
|
+
self.api_client.select_header_content_type(
|
|
4555
|
+
[
|
|
4556
|
+
'application/json'
|
|
4557
|
+
]
|
|
4558
|
+
)
|
|
4559
|
+
)
|
|
4560
|
+
if _default_content_type is not None:
|
|
4561
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4562
|
+
|
|
4563
|
+
# authentication setting
|
|
4564
|
+
_auth_settings: List[str] = [
|
|
4565
|
+
'api-key'
|
|
4566
|
+
]
|
|
4567
|
+
|
|
4568
|
+
return self.api_client.param_serialize(
|
|
4569
|
+
method='POST',
|
|
4570
|
+
resource_path='/v1/webhook-endpoints/{endpointId}/test',
|
|
4571
|
+
path_params=_path_params,
|
|
4572
|
+
query_params=_query_params,
|
|
4573
|
+
header_params=_header_params,
|
|
4574
|
+
body=_body_params,
|
|
4575
|
+
post_params=_form_params,
|
|
4576
|
+
files=_files,
|
|
4577
|
+
auth_settings=_auth_settings,
|
|
4578
|
+
collection_formats=_collection_formats,
|
|
4579
|
+
_host=_host,
|
|
4580
|
+
_request_auth=_request_auth
|
|
4581
|
+
)
|
|
4582
|
+
|
|
4583
|
+
|
|
4584
|
+
|
|
4585
|
+
|
|
4586
|
+
@validate_call
|
|
4587
|
+
def update_webhook_endpoint(
|
|
4588
|
+
self,
|
|
4589
|
+
endpoint_id: StrictStr,
|
|
4590
|
+
environment: StrictStr,
|
|
4591
|
+
merchant_account_id: StrictStr,
|
|
4592
|
+
webhook_endpoint_update_request: WebhookEndpointUpdateRequest,
|
|
4593
|
+
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,
|
|
4594
|
+
_request_timeout: Union[
|
|
4595
|
+
None,
|
|
4596
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4597
|
+
Tuple[
|
|
4598
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4599
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4600
|
+
]
|
|
4601
|
+
] = None,
|
|
4602
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4603
|
+
_content_type: Optional[StrictStr] = None,
|
|
4604
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4605
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4606
|
+
) -> ApiWriteEnvelope:
|
|
4607
|
+
"""Update an outbound webhook endpoint
|
|
4608
|
+
|
|
4609
|
+
|
|
4610
|
+
:param endpoint_id: (required)
|
|
4611
|
+
:type endpoint_id: str
|
|
4612
|
+
:param environment: (required)
|
|
4613
|
+
:type environment: str
|
|
4614
|
+
:param merchant_account_id: (required)
|
|
4615
|
+
:type merchant_account_id: str
|
|
4616
|
+
:param webhook_endpoint_update_request: (required)
|
|
4617
|
+
:type webhook_endpoint_update_request: WebhookEndpointUpdateRequest
|
|
4618
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4619
|
+
:type idempotency_key: str
|
|
4620
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4621
|
+
number provided, it will be total request
|
|
4622
|
+
timeout. It can also be a pair (tuple) of
|
|
4623
|
+
(connection, read) timeouts.
|
|
4624
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4625
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4626
|
+
request; this effectively ignores the
|
|
4627
|
+
authentication in the spec for a single request.
|
|
4628
|
+
:type _request_auth: dict, optional
|
|
4629
|
+
:param _content_type: force content-type for the request.
|
|
4630
|
+
:type _content_type: str, Optional
|
|
4631
|
+
:param _headers: set to override the headers for a single
|
|
4632
|
+
request; this effectively ignores the headers
|
|
4633
|
+
in the spec for a single request.
|
|
4634
|
+
:type _headers: dict, optional
|
|
4635
|
+
:param _host_index: set to override the host_index for a single
|
|
4636
|
+
request; this effectively ignores the host_index
|
|
4637
|
+
in the spec for a single request.
|
|
4638
|
+
:type _host_index: int, optional
|
|
4639
|
+
:return: Returns the result object.
|
|
4640
|
+
""" # noqa: E501
|
|
4641
|
+
|
|
4642
|
+
_param = self._update_webhook_endpoint_serialize(
|
|
4643
|
+
endpoint_id=endpoint_id,
|
|
4644
|
+
environment=environment,
|
|
4645
|
+
merchant_account_id=merchant_account_id,
|
|
4646
|
+
webhook_endpoint_update_request=webhook_endpoint_update_request,
|
|
4647
|
+
idempotency_key=idempotency_key,
|
|
4648
|
+
_request_auth=_request_auth,
|
|
4649
|
+
_content_type=_content_type,
|
|
4650
|
+
_headers=_headers,
|
|
4651
|
+
_host_index=_host_index
|
|
4652
|
+
)
|
|
4653
|
+
|
|
4654
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4655
|
+
'200': "ApiWriteEnvelope",
|
|
4656
|
+
'400': "ApiError",
|
|
4657
|
+
'401': "ApiError",
|
|
4658
|
+
'409': "ApiError",
|
|
4659
|
+
'422': "ApiError",
|
|
4660
|
+
'429': "ApiError",
|
|
4661
|
+
}
|
|
4662
|
+
response_data = self.api_client.call_api(
|
|
4663
|
+
*_param,
|
|
4664
|
+
_request_timeout=_request_timeout
|
|
4665
|
+
)
|
|
4666
|
+
response_data.read()
|
|
4667
|
+
return self.api_client.response_deserialize(
|
|
4668
|
+
response_data=response_data,
|
|
4669
|
+
response_types_map=_response_types_map,
|
|
4670
|
+
).data
|
|
4671
|
+
|
|
4672
|
+
|
|
4673
|
+
@validate_call
|
|
4674
|
+
def update_webhook_endpoint_with_http_info(
|
|
4675
|
+
self,
|
|
4676
|
+
endpoint_id: StrictStr,
|
|
4677
|
+
environment: StrictStr,
|
|
4678
|
+
merchant_account_id: StrictStr,
|
|
4679
|
+
webhook_endpoint_update_request: WebhookEndpointUpdateRequest,
|
|
4680
|
+
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,
|
|
4681
|
+
_request_timeout: Union[
|
|
4682
|
+
None,
|
|
4683
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4684
|
+
Tuple[
|
|
4685
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4686
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4687
|
+
]
|
|
4688
|
+
] = None,
|
|
4689
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4690
|
+
_content_type: Optional[StrictStr] = None,
|
|
4691
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4692
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4693
|
+
) -> ApiResponse[ApiWriteEnvelope]:
|
|
4694
|
+
"""Update an outbound webhook endpoint
|
|
4695
|
+
|
|
4696
|
+
|
|
4697
|
+
:param endpoint_id: (required)
|
|
4698
|
+
:type endpoint_id: str
|
|
4699
|
+
:param environment: (required)
|
|
4700
|
+
:type environment: str
|
|
4701
|
+
:param merchant_account_id: (required)
|
|
4702
|
+
:type merchant_account_id: str
|
|
4703
|
+
:param webhook_endpoint_update_request: (required)
|
|
4704
|
+
:type webhook_endpoint_update_request: WebhookEndpointUpdateRequest
|
|
4705
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4706
|
+
:type idempotency_key: str
|
|
4707
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4708
|
+
number provided, it will be total request
|
|
4709
|
+
timeout. It can also be a pair (tuple) of
|
|
4710
|
+
(connection, read) timeouts.
|
|
4711
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4712
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4713
|
+
request; this effectively ignores the
|
|
4714
|
+
authentication in the spec for a single request.
|
|
4715
|
+
:type _request_auth: dict, optional
|
|
4716
|
+
:param _content_type: force content-type for the request.
|
|
4717
|
+
:type _content_type: str, Optional
|
|
4718
|
+
:param _headers: set to override the headers for a single
|
|
4719
|
+
request; this effectively ignores the headers
|
|
4720
|
+
in the spec for a single request.
|
|
4721
|
+
:type _headers: dict, optional
|
|
4722
|
+
:param _host_index: set to override the host_index for a single
|
|
4723
|
+
request; this effectively ignores the host_index
|
|
4724
|
+
in the spec for a single request.
|
|
4725
|
+
:type _host_index: int, optional
|
|
4726
|
+
:return: Returns the result object.
|
|
4727
|
+
""" # noqa: E501
|
|
4728
|
+
|
|
4729
|
+
_param = self._update_webhook_endpoint_serialize(
|
|
4730
|
+
endpoint_id=endpoint_id,
|
|
4731
|
+
environment=environment,
|
|
4732
|
+
merchant_account_id=merchant_account_id,
|
|
4733
|
+
webhook_endpoint_update_request=webhook_endpoint_update_request,
|
|
4734
|
+
idempotency_key=idempotency_key,
|
|
4735
|
+
_request_auth=_request_auth,
|
|
4736
|
+
_content_type=_content_type,
|
|
4737
|
+
_headers=_headers,
|
|
4738
|
+
_host_index=_host_index
|
|
4739
|
+
)
|
|
4740
|
+
|
|
4741
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4742
|
+
'200': "ApiWriteEnvelope",
|
|
4743
|
+
'400': "ApiError",
|
|
4744
|
+
'401': "ApiError",
|
|
4745
|
+
'409': "ApiError",
|
|
4746
|
+
'422': "ApiError",
|
|
4747
|
+
'429': "ApiError",
|
|
4748
|
+
}
|
|
4749
|
+
response_data = self.api_client.call_api(
|
|
4750
|
+
*_param,
|
|
4751
|
+
_request_timeout=_request_timeout
|
|
4752
|
+
)
|
|
4753
|
+
response_data.read()
|
|
4754
|
+
return self.api_client.response_deserialize(
|
|
4755
|
+
response_data=response_data,
|
|
4756
|
+
response_types_map=_response_types_map,
|
|
4757
|
+
)
|
|
4758
|
+
|
|
4759
|
+
|
|
4760
|
+
@validate_call
|
|
4761
|
+
def update_webhook_endpoint_without_preload_content(
|
|
4762
|
+
self,
|
|
4763
|
+
endpoint_id: StrictStr,
|
|
4764
|
+
environment: StrictStr,
|
|
4765
|
+
merchant_account_id: StrictStr,
|
|
4766
|
+
webhook_endpoint_update_request: WebhookEndpointUpdateRequest,
|
|
4767
|
+
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,
|
|
4768
|
+
_request_timeout: Union[
|
|
4769
|
+
None,
|
|
4770
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4771
|
+
Tuple[
|
|
4772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4773
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4774
|
+
]
|
|
4775
|
+
] = None,
|
|
4776
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4777
|
+
_content_type: Optional[StrictStr] = None,
|
|
4778
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4779
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4780
|
+
) -> RESTResponseType:
|
|
4781
|
+
"""Update an outbound webhook endpoint
|
|
4782
|
+
|
|
4783
|
+
|
|
4784
|
+
:param endpoint_id: (required)
|
|
4785
|
+
:type endpoint_id: str
|
|
4786
|
+
:param environment: (required)
|
|
4787
|
+
:type environment: str
|
|
4788
|
+
:param merchant_account_id: (required)
|
|
4789
|
+
:type merchant_account_id: str
|
|
4790
|
+
:param webhook_endpoint_update_request: (required)
|
|
4791
|
+
:type webhook_endpoint_update_request: WebhookEndpointUpdateRequest
|
|
4792
|
+
:param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
|
|
4793
|
+
:type idempotency_key: str
|
|
4794
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4795
|
+
number provided, it will be total request
|
|
4796
|
+
timeout. It can also be a pair (tuple) of
|
|
4797
|
+
(connection, read) timeouts.
|
|
4798
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4799
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4800
|
+
request; this effectively ignores the
|
|
4801
|
+
authentication in the spec for a single request.
|
|
4802
|
+
:type _request_auth: dict, optional
|
|
4803
|
+
:param _content_type: force content-type for the request.
|
|
4804
|
+
:type _content_type: str, Optional
|
|
4805
|
+
:param _headers: set to override the headers for a single
|
|
4806
|
+
request; this effectively ignores the headers
|
|
4807
|
+
in the spec for a single request.
|
|
4808
|
+
:type _headers: dict, optional
|
|
4809
|
+
:param _host_index: set to override the host_index for a single
|
|
4810
|
+
request; this effectively ignores the host_index
|
|
4811
|
+
in the spec for a single request.
|
|
4812
|
+
:type _host_index: int, optional
|
|
4813
|
+
:return: Returns the result object.
|
|
4814
|
+
""" # noqa: E501
|
|
4815
|
+
|
|
4816
|
+
_param = self._update_webhook_endpoint_serialize(
|
|
4817
|
+
endpoint_id=endpoint_id,
|
|
4818
|
+
environment=environment,
|
|
4819
|
+
merchant_account_id=merchant_account_id,
|
|
4820
|
+
webhook_endpoint_update_request=webhook_endpoint_update_request,
|
|
4821
|
+
idempotency_key=idempotency_key,
|
|
4822
|
+
_request_auth=_request_auth,
|
|
4823
|
+
_content_type=_content_type,
|
|
4824
|
+
_headers=_headers,
|
|
4825
|
+
_host_index=_host_index
|
|
4826
|
+
)
|
|
4827
|
+
|
|
4828
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4829
|
+
'200': "ApiWriteEnvelope",
|
|
4830
|
+
'400': "ApiError",
|
|
4831
|
+
'401': "ApiError",
|
|
4832
|
+
'409': "ApiError",
|
|
4833
|
+
'422': "ApiError",
|
|
4834
|
+
'429': "ApiError",
|
|
4835
|
+
}
|
|
4836
|
+
response_data = self.api_client.call_api(
|
|
4837
|
+
*_param,
|
|
4838
|
+
_request_timeout=_request_timeout
|
|
4839
|
+
)
|
|
4840
|
+
return response_data.response
|
|
4841
|
+
|
|
4842
|
+
|
|
4843
|
+
def _update_webhook_endpoint_serialize(
|
|
4844
|
+
self,
|
|
4845
|
+
endpoint_id,
|
|
4846
|
+
environment,
|
|
4847
|
+
merchant_account_id,
|
|
4848
|
+
webhook_endpoint_update_request,
|
|
4849
|
+
idempotency_key,
|
|
4850
|
+
_request_auth,
|
|
4851
|
+
_content_type,
|
|
4852
|
+
_headers,
|
|
4853
|
+
_host_index,
|
|
4854
|
+
) -> RequestSerialized:
|
|
4855
|
+
|
|
4856
|
+
_host = None
|
|
4857
|
+
|
|
4858
|
+
_collection_formats: Dict[str, str] = {
|
|
4859
|
+
}
|
|
4860
|
+
|
|
4861
|
+
_path_params: Dict[str, str] = {}
|
|
4862
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4863
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4864
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4865
|
+
_files: Dict[
|
|
4866
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4867
|
+
] = {}
|
|
4868
|
+
_body_params: Optional[bytes] = None
|
|
4869
|
+
|
|
4870
|
+
# process the path parameters
|
|
4871
|
+
if endpoint_id is not None:
|
|
4872
|
+
_path_params['endpointId'] = endpoint_id
|
|
4873
|
+
# process the query parameters
|
|
4874
|
+
if environment is not None:
|
|
4875
|
+
|
|
4876
|
+
_query_params.append(('environment', environment))
|
|
4877
|
+
|
|
4878
|
+
if merchant_account_id is not None:
|
|
4879
|
+
|
|
4880
|
+
_query_params.append(('merchantAccountId', merchant_account_id))
|
|
4881
|
+
|
|
4882
|
+
# process the header parameters
|
|
4883
|
+
if idempotency_key is not None:
|
|
4884
|
+
_header_params['Idempotency-Key'] = idempotency_key
|
|
4885
|
+
# process the form parameters
|
|
4886
|
+
# process the body parameter
|
|
4887
|
+
if webhook_endpoint_update_request is not None:
|
|
4888
|
+
_body_params = webhook_endpoint_update_request
|
|
4889
|
+
|
|
4890
|
+
|
|
4891
|
+
# set the HTTP header `Accept`
|
|
4892
|
+
if 'Accept' not in _header_params:
|
|
4893
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4894
|
+
[
|
|
4895
|
+
'application/json'
|
|
4896
|
+
]
|
|
4897
|
+
)
|
|
4898
|
+
|
|
4899
|
+
# set the HTTP header `Content-Type`
|
|
4900
|
+
if _content_type:
|
|
4901
|
+
_header_params['Content-Type'] = _content_type
|
|
4902
|
+
else:
|
|
4903
|
+
_default_content_type = (
|
|
4904
|
+
self.api_client.select_header_content_type(
|
|
4905
|
+
[
|
|
4906
|
+
'application/json'
|
|
4907
|
+
]
|
|
4908
|
+
)
|
|
4909
|
+
)
|
|
4910
|
+
if _default_content_type is not None:
|
|
4911
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4912
|
+
|
|
4913
|
+
# authentication setting
|
|
4914
|
+
_auth_settings: List[str] = [
|
|
4915
|
+
'api-key'
|
|
4916
|
+
]
|
|
4917
|
+
|
|
4918
|
+
return self.api_client.param_serialize(
|
|
4919
|
+
method='PATCH',
|
|
4920
|
+
resource_path='/v1/webhook-endpoints/{endpointId}',
|
|
4921
|
+
path_params=_path_params,
|
|
4922
|
+
query_params=_query_params,
|
|
4923
|
+
header_params=_header_params,
|
|
4924
|
+
body=_body_params,
|
|
4925
|
+
post_params=_form_params,
|
|
4926
|
+
files=_files,
|
|
4927
|
+
auth_settings=_auth_settings,
|
|
4928
|
+
collection_formats=_collection_formats,
|
|
4929
|
+
_host=_host,
|
|
4930
|
+
_request_auth=_request_auth
|
|
4931
|
+
)
|