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
vortex/exceptions.py
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
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
|
+
from typing import Any, Optional
|
|
14
|
+
from typing_extensions import Self
|
|
15
|
+
|
|
16
|
+
class OpenApiException(Exception):
|
|
17
|
+
"""The base exception class for all OpenAPIExceptions"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ApiTypeError(OpenApiException, TypeError):
|
|
21
|
+
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
22
|
+
key_type=None) -> None:
|
|
23
|
+
""" Raises an exception for TypeErrors
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
msg (str): the exception message
|
|
27
|
+
|
|
28
|
+
Keyword Args:
|
|
29
|
+
path_to_item (list): a list of keys an indices to get to the
|
|
30
|
+
current_item
|
|
31
|
+
None if unset
|
|
32
|
+
valid_classes (tuple): the primitive classes that current item
|
|
33
|
+
should be an instance of
|
|
34
|
+
None if unset
|
|
35
|
+
key_type (bool): False if our value is a value in a dict
|
|
36
|
+
True if it is a key in a dict
|
|
37
|
+
False if our item is an item in a list
|
|
38
|
+
None if unset
|
|
39
|
+
"""
|
|
40
|
+
self.path_to_item = path_to_item
|
|
41
|
+
self.valid_classes = valid_classes
|
|
42
|
+
self.key_type = key_type
|
|
43
|
+
full_msg = msg
|
|
44
|
+
if path_to_item:
|
|
45
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
46
|
+
super(ApiTypeError, self).__init__(full_msg)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class ApiValueError(OpenApiException, ValueError):
|
|
50
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
51
|
+
"""
|
|
52
|
+
Args:
|
|
53
|
+
msg (str): the exception message
|
|
54
|
+
|
|
55
|
+
Keyword Args:
|
|
56
|
+
path_to_item (list) the path to the exception in the
|
|
57
|
+
received_data dict. None if unset
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
self.path_to_item = path_to_item
|
|
61
|
+
full_msg = msg
|
|
62
|
+
if path_to_item:
|
|
63
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
64
|
+
super(ApiValueError, self).__init__(full_msg)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ApiAttributeError(OpenApiException, AttributeError):
|
|
68
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
69
|
+
"""
|
|
70
|
+
Raised when an attribute reference or assignment fails.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
msg (str): the exception message
|
|
74
|
+
|
|
75
|
+
Keyword Args:
|
|
76
|
+
path_to_item (None/list) the path to the exception in the
|
|
77
|
+
received_data dict
|
|
78
|
+
"""
|
|
79
|
+
self.path_to_item = path_to_item
|
|
80
|
+
full_msg = msg
|
|
81
|
+
if path_to_item:
|
|
82
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
83
|
+
super(ApiAttributeError, self).__init__(full_msg)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ApiKeyError(OpenApiException, KeyError):
|
|
87
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
88
|
+
"""
|
|
89
|
+
Args:
|
|
90
|
+
msg (str): the exception message
|
|
91
|
+
|
|
92
|
+
Keyword Args:
|
|
93
|
+
path_to_item (None/list) the path to the exception in the
|
|
94
|
+
received_data dict
|
|
95
|
+
"""
|
|
96
|
+
self.path_to_item = path_to_item
|
|
97
|
+
full_msg = msg
|
|
98
|
+
if path_to_item:
|
|
99
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
100
|
+
super(ApiKeyError, self).__init__(full_msg)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class ApiException(OpenApiException):
|
|
104
|
+
|
|
105
|
+
def __init__(
|
|
106
|
+
self,
|
|
107
|
+
status=None,
|
|
108
|
+
reason=None,
|
|
109
|
+
http_resp=None,
|
|
110
|
+
*,
|
|
111
|
+
body: Optional[str] = None,
|
|
112
|
+
data: Optional[Any] = None,
|
|
113
|
+
) -> None:
|
|
114
|
+
self.status = status
|
|
115
|
+
self.reason = reason
|
|
116
|
+
self.body = body
|
|
117
|
+
self.data = data
|
|
118
|
+
self.headers = None
|
|
119
|
+
|
|
120
|
+
if http_resp:
|
|
121
|
+
if self.status is None:
|
|
122
|
+
self.status = http_resp.status
|
|
123
|
+
if self.reason is None:
|
|
124
|
+
self.reason = http_resp.reason
|
|
125
|
+
if self.body is None:
|
|
126
|
+
try:
|
|
127
|
+
self.body = http_resp.data.decode('utf-8')
|
|
128
|
+
except Exception:
|
|
129
|
+
pass
|
|
130
|
+
self.headers = http_resp.headers
|
|
131
|
+
|
|
132
|
+
@classmethod
|
|
133
|
+
def from_response(
|
|
134
|
+
cls,
|
|
135
|
+
*,
|
|
136
|
+
http_resp,
|
|
137
|
+
body: Optional[str],
|
|
138
|
+
data: Optional[Any],
|
|
139
|
+
) -> Self:
|
|
140
|
+
if http_resp.status == 400:
|
|
141
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
142
|
+
|
|
143
|
+
if http_resp.status == 401:
|
|
144
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
145
|
+
|
|
146
|
+
if http_resp.status == 403:
|
|
147
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
148
|
+
|
|
149
|
+
if http_resp.status == 404:
|
|
150
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
151
|
+
|
|
152
|
+
# Added new conditions for 409 and 422
|
|
153
|
+
if http_resp.status == 409:
|
|
154
|
+
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
|
155
|
+
|
|
156
|
+
if http_resp.status == 422:
|
|
157
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
|
158
|
+
|
|
159
|
+
if 500 <= http_resp.status <= 599:
|
|
160
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
161
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
162
|
+
|
|
163
|
+
def __str__(self):
|
|
164
|
+
"""Custom error messages for exception"""
|
|
165
|
+
error_message = "({0})\n"\
|
|
166
|
+
"Reason: {1}\n".format(self.status, self.reason)
|
|
167
|
+
if self.headers:
|
|
168
|
+
error_message += "HTTP response headers: {0}\n".format(
|
|
169
|
+
self.headers)
|
|
170
|
+
|
|
171
|
+
if self.body:
|
|
172
|
+
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
173
|
+
|
|
174
|
+
if self.data:
|
|
175
|
+
error_message += "HTTP response data: {0}\n".format(self.data)
|
|
176
|
+
|
|
177
|
+
return error_message
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class BadRequestException(ApiException):
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class NotFoundException(ApiException):
|
|
185
|
+
pass
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class UnauthorizedException(ApiException):
|
|
189
|
+
pass
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class ForbiddenException(ApiException):
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class ServiceException(ApiException):
|
|
197
|
+
pass
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class ConflictException(ApiException):
|
|
201
|
+
"""Exception for HTTP 409 Conflict."""
|
|
202
|
+
pass
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class UnprocessableEntityException(ApiException):
|
|
206
|
+
"""Exception for HTTP 422 Unprocessable Entity."""
|
|
207
|
+
pass
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
def render_path(path_to_item):
|
|
211
|
+
"""Returns a string representation of a path"""
|
|
212
|
+
result = ""
|
|
213
|
+
for pth in path_to_item:
|
|
214
|
+
if isinstance(pth, int):
|
|
215
|
+
result += "[{0}]".format(pth)
|
|
216
|
+
else:
|
|
217
|
+
result += "['{0}']".format(pth)
|
|
218
|
+
return result
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Vortex Payments API
|
|
6
|
+
|
|
7
|
+
Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: 2026-08
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
# import models into model package
|
|
16
|
+
from vortex.models.api_error import ApiError
|
|
17
|
+
from vortex.models.api_error_error import ApiErrorError
|
|
18
|
+
from vortex.models.api_write_envelope import ApiWriteEnvelope
|
|
19
|
+
from vortex.models.apply_coupon_request import ApplyCouponRequest
|
|
20
|
+
from vortex.models.billing_order_form_sign_request import BillingOrderFormSignRequest
|
|
21
|
+
from vortex.models.billing_order_form_signature_request_request import BillingOrderFormSignatureRequestRequest
|
|
22
|
+
from vortex.models.billing_order_form_void_request import BillingOrderFormVoidRequest
|
|
23
|
+
from vortex.models.billing_order_forms_expire_due_request import BillingOrderFormsExpireDueRequest
|
|
24
|
+
from vortex.models.billing_order_update_request import BillingOrderUpdateRequest
|
|
25
|
+
from vortex.models.billing_orders_execute_due_request import BillingOrdersExecuteDueRequest
|
|
26
|
+
from vortex.models.billing_quote_create_request import BillingQuoteCreateRequest
|
|
27
|
+
from vortex.models.billing_quote_line_input import BillingQuoteLineInput
|
|
28
|
+
from vortex.models.billing_quote_version_approve_request import BillingQuoteVersionApproveRequest
|
|
29
|
+
from vortex.models.billing_quote_version_create_request import BillingQuoteVersionCreateRequest
|
|
30
|
+
from vortex.models.billing_quote_version_update_request import BillingQuoteVersionUpdateRequest
|
|
31
|
+
from vortex.models.billing_quote_version_void_request import BillingQuoteVersionVoidRequest
|
|
32
|
+
from vortex.models.checkout_session_line_item_request import CheckoutSessionLineItemRequest
|
|
33
|
+
from vortex.models.coupon_targets import CouponTargets
|
|
34
|
+
from vortex.models.create_checkout_session_request import CreateCheckoutSessionRequest
|
|
35
|
+
from vortex.models.create_coupon_request import CreateCouponRequest
|
|
36
|
+
from vortex.models.create_deposit_balance_payable_request import CreateDepositBalancePayableRequest
|
|
37
|
+
from vortex.models.create_installment_payable_request import CreateInstallmentPayableRequest
|
|
38
|
+
from vortex.models.create_payable_request import CreatePayableRequest
|
|
39
|
+
from vortex.models.create_recurring_payable_request import CreateRecurringPayableRequest
|
|
40
|
+
from vortex.models.create_recurring_payable_request_cadence import CreateRecurringPayableRequestCadence
|
|
41
|
+
from vortex.models.credit_note_create_line import CreditNoteCreateLine
|
|
42
|
+
from vortex.models.credit_note_create_request import CreditNoteCreateRequest
|
|
43
|
+
from vortex.models.credit_note_reason import CreditNoteReason
|
|
44
|
+
from vortex.models.credit_note_refund_reconcile_request import CreditNoteRefundReconcileRequest
|
|
45
|
+
from vortex.models.credit_note_refund_request import CreditNoteRefundRequest
|
|
46
|
+
from vortex.models.customer_balance_targets import CustomerBalanceTargets
|
|
47
|
+
from vortex.models.customer_default_payment_method_request import CustomerDefaultPaymentMethodRequest
|
|
48
|
+
from vortex.models.customer_payment_method_archive_request import CustomerPaymentMethodArchiveRequest
|
|
49
|
+
from vortex.models.customer_payment_method_attach_request import CustomerPaymentMethodAttachRequest
|
|
50
|
+
from vortex.models.customer_payment_method_setup_request import CustomerPaymentMethodSetupRequest
|
|
51
|
+
from vortex.models.customer_upsert_request import CustomerUpsertRequest
|
|
52
|
+
from vortex.models.expire_customer_balance_request import ExpireCustomerBalanceRequest
|
|
53
|
+
from vortex.models.grant_customer_balance_from_payment_request import GrantCustomerBalanceFromPaymentRequest
|
|
54
|
+
from vortex.models.grant_customer_balance_request import GrantCustomerBalanceRequest
|
|
55
|
+
from vortex.models.grant_entitlement_request import GrantEntitlementRequest
|
|
56
|
+
from vortex.models.invoice_collect_request import InvoiceCollectRequest
|
|
57
|
+
from vortex.models.invoice_create_request import InvoiceCreateRequest
|
|
58
|
+
from vortex.models.invoice_finalize_request import InvoiceFinalizeRequest
|
|
59
|
+
from vortex.models.invoice_mark_uncollectible_request import InvoiceMarkUncollectibleRequest
|
|
60
|
+
from vortex.models.invoice_tax import InvoiceTax
|
|
61
|
+
from vortex.models.invoice_void_request import InvoiceVoidRequest
|
|
62
|
+
from vortex.models.merchant_account_create_request import MerchantAccountCreateRequest
|
|
63
|
+
from vortex.models.merchant_address import MerchantAddress
|
|
64
|
+
from vortex.models.merchant_associated_identity import MerchantAssociatedIdentity
|
|
65
|
+
from vortex.models.merchant_onboarding_link_request import MerchantOnboardingLinkRequest
|
|
66
|
+
from vortex.models.merchant_profile_date import MerchantProfileDate
|
|
67
|
+
from vortex.models.merchant_settlement_bank_account import MerchantSettlementBankAccount
|
|
68
|
+
from vortex.models.merchant_tax_profile_request import MerchantTaxProfileRequest
|
|
69
|
+
from vortex.models.merchant_tax_profile_request_registrations_inner import MerchantTaxProfileRequestRegistrationsInner
|
|
70
|
+
from vortex.models.merchant_underwriting_data import MerchantUnderwritingData
|
|
71
|
+
from vortex.models.merchant_underwriting_data_card_volume_distribution import MerchantUnderwritingDataCardVolumeDistribution
|
|
72
|
+
from vortex.models.merchant_underwriting_data_volume_distribution_by_business_type import MerchantUnderwritingDataVolumeDistributionByBusinessType
|
|
73
|
+
from vortex.models.open_api_invoice_tax_response import OpenApiInvoiceTaxResponse
|
|
74
|
+
from vortex.models.open_api_invoice_tax_response_all_of_data import OpenApiInvoiceTaxResponseAllOfData
|
|
75
|
+
from vortex.models.payment_request_collect_request import PaymentRequestCollectRequest
|
|
76
|
+
from vortex.models.payment_request_create_request import PaymentRequestCreateRequest
|
|
77
|
+
from vortex.models.payment_request_link_create_request import PaymentRequestLinkCreateRequest
|
|
78
|
+
from vortex.models.price_create_request import PriceCreateRequest
|
|
79
|
+
from vortex.models.product_create_request import ProductCreateRequest
|
|
80
|
+
from vortex.models.reverse_customer_balance_request import ReverseCustomerBalanceRequest
|
|
81
|
+
from vortex.models.revoke_entitlement_request import RevokeEntitlementRequest
|
|
82
|
+
from vortex.models.subscription_change_request import SubscriptionChangeRequest
|
|
83
|
+
from vortex.models.subscription_create_request import SubscriptionCreateRequest
|
|
84
|
+
from vortex.models.subscription_item_change_preview_request import SubscriptionItemChangePreviewRequest
|
|
85
|
+
from vortex.models.subscription_item_change_request_item import SubscriptionItemChangeRequestItem
|
|
86
|
+
from vortex.models.tax_address import TaxAddress
|
|
87
|
+
from vortex.models.tax_behavior import TaxBehavior
|
|
88
|
+
from vortex.models.tax_behavior_policy import TaxBehaviorPolicy
|
|
89
|
+
from vortex.models.tax_behavior_policy_request import TaxBehaviorPolicyRequest
|
|
90
|
+
from vortex.models.tax_failure import TaxFailure
|
|
91
|
+
from vortex.models.tax_finalize_request import TaxFinalizeRequest
|
|
92
|
+
from vortex.models.tax_jurisdiction_evidence import TaxJurisdictionEvidence
|
|
93
|
+
from vortex.models.tax_line_evidence import TaxLineEvidence
|
|
94
|
+
from vortex.models.tax_quote_request import TaxQuoteRequest
|
|
95
|
+
from vortex.models.terminate_applied_coupon_request import TerminateAppliedCouponRequest
|
|
96
|
+
from vortex.models.terminate_coupon_request import TerminateCouponRequest
|
|
97
|
+
from vortex.models.webhook_deliveries_dispatch_request import WebhookDeliveriesDispatchRequest
|
|
98
|
+
from vortex.models.webhook_deliveries_redrive_request import WebhookDeliveriesRedriveRequest
|
|
99
|
+
from vortex.models.webhook_delivery_replay_request import WebhookDeliveryReplayRequest
|
|
100
|
+
from vortex.models.webhook_endpoint_create_request import WebhookEndpointCreateRequest
|
|
101
|
+
from vortex.models.webhook_endpoint_secret_rotate_request import WebhookEndpointSecretRotateRequest
|
|
102
|
+
from vortex.models.webhook_endpoint_test_request import WebhookEndpointTestRequest
|
|
103
|
+
from vortex.models.webhook_endpoint_update_request import WebhookEndpointUpdateRequest
|
|
104
|
+
from vortex.models.webhook_event_resend_request import WebhookEventResendRequest
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Vortex Payments API
|
|
5
|
+
|
|
6
|
+
Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-08
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from vortex.models.api_error_error import ApiErrorError
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
26
|
+
|
|
27
|
+
class ApiError(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ApiError
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
error: ApiErrorError
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["error"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ApiError from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of error
|
|
77
|
+
if self.error:
|
|
78
|
+
_dict['error'] = self.error.to_dict()
|
|
79
|
+
# puts key-value pairs in additional_properties in the top level
|
|
80
|
+
if self.additional_properties is not None:
|
|
81
|
+
for _key, _value in self.additional_properties.items():
|
|
82
|
+
_dict[_key] = _value
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of ApiError from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"error": ApiErrorError.from_dict(obj["error"]) if obj.get("error") is not None else None
|
|
97
|
+
})
|
|
98
|
+
# store additional fields in additional_properties
|
|
99
|
+
for _key in obj.keys():
|
|
100
|
+
if _key not in cls.__properties:
|
|
101
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
102
|
+
|
|
103
|
+
return _obj
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Vortex Payments API
|
|
5
|
+
|
|
6
|
+
Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-08
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class ApiErrorError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ApiErrorError
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
code: StrictStr
|
|
31
|
+
message: StrictStr
|
|
32
|
+
request_id: Optional[StrictStr] = Field(default=None, alias="requestId")
|
|
33
|
+
docs_url: Optional[StrictStr] = Field(default=None, description="Deep link to the errors guide section for this code.", alias="docsUrl")
|
|
34
|
+
details: Optional[Dict[str, Any]] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["code", "message", "requestId", "docsUrl", "details"]
|
|
37
|
+
|
|
38
|
+
@field_validator('code')
|
|
39
|
+
def code_validate_enum(cls, value):
|
|
40
|
+
"""Validates the enum"""
|
|
41
|
+
if value not in set(['bad_request', 'unauthorized', 'forbidden', 'not_found', 'conflict', 'rate_limited', 'validation_failure', 'not_implemented', 'internal_error']):
|
|
42
|
+
raise ValueError("must be one of enum values ('bad_request', 'unauthorized', 'forbidden', 'not_found', 'conflict', 'rate_limited', 'validation_failure', 'not_implemented', 'internal_error')")
|
|
43
|
+
return value
|
|
44
|
+
|
|
45
|
+
model_config = ConfigDict(
|
|
46
|
+
validate_by_name=True,
|
|
47
|
+
validate_by_alias=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""Returns the JSON representation of the model using alias"""
|
|
59
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
+
"""Create an instance of ApiErrorError from a JSON string"""
|
|
64
|
+
return cls.from_dict(json.loads(json_str))
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
+
"""Return the dictionary representation of the model using alias.
|
|
68
|
+
|
|
69
|
+
This has the following differences from calling pydantic's
|
|
70
|
+
`self.model_dump(by_alias=True)`:
|
|
71
|
+
|
|
72
|
+
* `None` is only added to the output dict for nullable fields that
|
|
73
|
+
were set at model initialization. Other fields with value `None`
|
|
74
|
+
are ignored.
|
|
75
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
76
|
+
"""
|
|
77
|
+
excluded_fields: Set[str] = set([
|
|
78
|
+
"additional_properties",
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
_dict = self.model_dump(
|
|
82
|
+
by_alias=True,
|
|
83
|
+
exclude=excluded_fields,
|
|
84
|
+
exclude_none=True,
|
|
85
|
+
)
|
|
86
|
+
# puts key-value pairs in additional_properties in the top level
|
|
87
|
+
if self.additional_properties is not None:
|
|
88
|
+
for _key, _value in self.additional_properties.items():
|
|
89
|
+
_dict[_key] = _value
|
|
90
|
+
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
+
"""Create an instance of ApiErrorError from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return cls.model_validate(obj)
|
|
101
|
+
|
|
102
|
+
_obj = cls.model_validate({
|
|
103
|
+
"code": obj.get("code"),
|
|
104
|
+
"message": obj.get("message"),
|
|
105
|
+
"requestId": obj.get("requestId"),
|
|
106
|
+
"docsUrl": obj.get("docsUrl"),
|
|
107
|
+
"details": obj.get("details")
|
|
108
|
+
})
|
|
109
|
+
# store additional fields in additional_properties
|
|
110
|
+
for _key in obj.keys():
|
|
111
|
+
if _key not in cls.__properties:
|
|
112
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
113
|
+
|
|
114
|
+
return _obj
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Vortex Payments API
|
|
5
|
+
|
|
6
|
+
Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2026-08
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class ApiWriteEnvelope(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ApiWriteEnvelope
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
data: Dict[str, Any]
|
|
31
|
+
request_id: StrictStr = Field(alias="requestId")
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["data", "requestId"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ApiWriteEnvelope from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ApiWriteEnvelope from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"data": obj.get("data"),
|
|
94
|
+
"requestId": obj.get("requestId")
|
|
95
|
+
})
|
|
96
|
+
# store additional fields in additional_properties
|
|
97
|
+
for _key in obj.keys():
|
|
98
|
+
if _key not in cls.__properties:
|
|
99
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
100
|
+
|
|
101
|
+
return _obj
|