vortex-sdk 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. vortex/__init__.py +265 -0
  2. vortex/api/__init__.py +24 -0
  3. vortex/api/billing_api.py +34608 -0
  4. vortex/api/catalog_api.py +708 -0
  5. vortex/api/checkout_api.py +372 -0
  6. vortex/api/credit_notes_api.py +1688 -0
  7. vortex/api/customer_balance_api.py +1747 -0
  8. vortex/api/customers_api.py +387 -0
  9. vortex/api/discounts_api.py +2623 -0
  10. vortex/api/entitlements_api.py +1646 -0
  11. vortex/api/hosted_api.py +2855 -0
  12. vortex/api/invoices_api.py +2402 -0
  13. vortex/api/payables_api.py +1380 -0
  14. vortex/api/payment_methods_api.py +2069 -0
  15. vortex/api/payment_requests_api.py +1877 -0
  16. vortex/api/payments_api.py +694 -0
  17. vortex/api/payments_readiness_api.py +2311 -0
  18. vortex/api/public_api.py +6931 -0
  19. vortex/api/quotes_api.py +6817 -0
  20. vortex/api/receipts_api.py +1111 -0
  21. vortex/api/subscriptions_api.py +1059 -0
  22. vortex/api/tax_api.py +1397 -0
  23. vortex/api/webhooks_api.py +4931 -0
  24. vortex/api_client.py +804 -0
  25. vortex/api_response.py +21 -0
  26. vortex/configuration.py +658 -0
  27. vortex/exceptions.py +218 -0
  28. vortex/models/__init__.py +104 -0
  29. vortex/models/api_error.py +103 -0
  30. vortex/models/api_error_error.py +114 -0
  31. vortex/models/api_write_envelope.py +101 -0
  32. vortex/models/apply_coupon_request.py +97 -0
  33. vortex/models/billing_order_form_sign_request.py +103 -0
  34. vortex/models/billing_order_form_signature_request_request.py +86 -0
  35. vortex/models/billing_order_form_void_request.py +86 -0
  36. vortex/models/billing_order_forms_expire_due_request.py +90 -0
  37. vortex/models/billing_order_update_request.py +99 -0
  38. vortex/models/billing_orders_execute_due_request.py +90 -0
  39. vortex/models/billing_quote_create_request.py +119 -0
  40. vortex/models/billing_quote_line_input.py +93 -0
  41. vortex/models/billing_quote_version_approve_request.py +87 -0
  42. vortex/models/billing_quote_version_create_request.py +103 -0
  43. vortex/models/billing_quote_version_update_request.py +102 -0
  44. vortex/models/billing_quote_version_void_request.py +96 -0
  45. vortex/models/checkout_session_line_item_request.py +91 -0
  46. vortex/models/coupon_targets.py +89 -0
  47. vortex/models/create_checkout_session_request.py +140 -0
  48. vortex/models/create_coupon_request.py +132 -0
  49. vortex/models/create_deposit_balance_payable_request.py +172 -0
  50. vortex/models/create_installment_payable_request.py +170 -0
  51. vortex/models/create_payable_request.py +158 -0
  52. vortex/models/create_recurring_payable_request.py +181 -0
  53. vortex/models/create_recurring_payable_request_cadence.py +96 -0
  54. vortex/models/credit_note_create_line.py +105 -0
  55. vortex/models/credit_note_create_request.py +112 -0
  56. vortex/models/credit_note_reason.py +39 -0
  57. vortex/models/credit_note_refund_reconcile_request.py +86 -0
  58. vortex/models/credit_note_refund_request.py +94 -0
  59. vortex/models/customer_balance_targets.py +102 -0
  60. vortex/models/customer_default_payment_method_request.py +88 -0
  61. vortex/models/customer_payment_method_archive_request.py +88 -0
  62. vortex/models/customer_payment_method_attach_request.py +94 -0
  63. vortex/models/customer_payment_method_setup_request.py +100 -0
  64. vortex/models/customer_upsert_request.py +96 -0
  65. vortex/models/expire_customer_balance_request.py +98 -0
  66. vortex/models/grant_customer_balance_from_payment_request.py +103 -0
  67. vortex/models/grant_customer_balance_request.py +106 -0
  68. vortex/models/grant_entitlement_request.py +106 -0
  69. vortex/models/invoice_collect_request.py +86 -0
  70. vortex/models/invoice_create_request.py +92 -0
  71. vortex/models/invoice_finalize_request.py +86 -0
  72. vortex/models/invoice_mark_uncollectible_request.py +90 -0
  73. vortex/models/invoice_tax.py +142 -0
  74. vortex/models/invoice_void_request.py +88 -0
  75. vortex/models/merchant_account_create_request.py +183 -0
  76. vortex/models/merchant_address.py +96 -0
  77. vortex/models/merchant_associated_identity.py +114 -0
  78. vortex/models/merchant_onboarding_link_request.py +95 -0
  79. vortex/models/merchant_profile_date.py +90 -0
  80. vortex/models/merchant_settlement_bank_account.py +94 -0
  81. vortex/models/merchant_tax_profile_request.py +125 -0
  82. vortex/models/merchant_tax_profile_request_registrations_inner.py +88 -0
  83. vortex/models/merchant_underwriting_data.py +127 -0
  84. vortex/models/merchant_underwriting_data_card_volume_distribution.py +90 -0
  85. vortex/models/merchant_underwriting_data_volume_distribution_by_business_type.py +90 -0
  86. vortex/models/open_api_invoice_tax_response.py +92 -0
  87. vortex/models/open_api_invoice_tax_response_all_of_data.py +92 -0
  88. vortex/models/payment_request_collect_request.py +86 -0
  89. vortex/models/payment_request_create_request.py +100 -0
  90. vortex/models/payment_request_link_create_request.py +89 -0
  91. vortex/models/price_create_request.py +122 -0
  92. vortex/models/product_create_request.py +92 -0
  93. vortex/models/reverse_customer_balance_request.py +98 -0
  94. vortex/models/revoke_entitlement_request.py +106 -0
  95. vortex/models/subscription_change_request.py +111 -0
  96. vortex/models/subscription_create_request.py +122 -0
  97. vortex/models/subscription_item_change_preview_request.py +100 -0
  98. vortex/models/subscription_item_change_request_item.py +91 -0
  99. vortex/models/tax_address.py +96 -0
  100. vortex/models/tax_behavior.py +36 -0
  101. vortex/models/tax_behavior_policy.py +100 -0
  102. vortex/models/tax_behavior_policy_request.py +89 -0
  103. vortex/models/tax_failure.py +104 -0
  104. vortex/models/tax_finalize_request.py +98 -0
  105. vortex/models/tax_jurisdiction_evidence.py +94 -0
  106. vortex/models/tax_line_evidence.py +103 -0
  107. vortex/models/tax_quote_request.py +98 -0
  108. vortex/models/terminate_applied_coupon_request.py +87 -0
  109. vortex/models/terminate_coupon_request.py +87 -0
  110. vortex/models/webhook_deliveries_dispatch_request.py +91 -0
  111. vortex/models/webhook_deliveries_redrive_request.py +107 -0
  112. vortex/models/webhook_delivery_replay_request.py +88 -0
  113. vortex/models/webhook_endpoint_create_request.py +91 -0
  114. vortex/models/webhook_endpoint_secret_rotate_request.py +87 -0
  115. vortex/models/webhook_endpoint_test_request.py +88 -0
  116. vortex/models/webhook_endpoint_update_request.py +103 -0
  117. vortex/models/webhook_event_resend_request.py +86 -0
  118. vortex/rest.py +263 -0
  119. vortex_sdk-0.2.0.dist-info/METADATA +34 -0
  120. vortex_sdk-0.2.0.dist-info/RECORD +123 -0
  121. vortex_sdk-0.2.0.dist-info/WHEEL +5 -0
  122. vortex_sdk-0.2.0.dist-info/licenses/LICENSE +21 -0
  123. vortex_sdk-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,372 @@
1
+ """
2
+ Vortex Payments API
3
+
4
+ Public Vortex Payments API for customers, subscriptions, invoices, payment requests, checkout, receipts, webhooks, tax.
5
+
6
+ The version of the OpenAPI document: 2026-08
7
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+
9
+ Do not edit the class manually.
10
+ """ # noqa: E501
11
+
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictStr
19
+ from typing import Optional
20
+ from typing_extensions import Annotated
21
+ from vortex.models.api_write_envelope import ApiWriteEnvelope
22
+ from vortex.models.create_checkout_session_request import CreateCheckoutSessionRequest
23
+
24
+ from vortex.api_client import ApiClient, RequestSerialized
25
+ from vortex.api_response import ApiResponse
26
+ from vortex.rest import RESTResponseType
27
+
28
+
29
+ class CheckoutApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def create_checkout_session(
44
+ self,
45
+ environment: StrictStr,
46
+ merchant_account_id: StrictStr,
47
+ create_checkout_session_request: CreateCheckoutSessionRequest,
48
+ 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,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> ApiWriteEnvelope:
62
+ """Create a hosted checkout session
63
+
64
+
65
+ :param environment: (required)
66
+ :type environment: str
67
+ :param merchant_account_id: (required)
68
+ :type merchant_account_id: str
69
+ :param create_checkout_session_request: (required)
70
+ :type create_checkout_session_request: CreateCheckoutSessionRequest
71
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
72
+ :type idempotency_key: str
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._create_checkout_session_serialize(
96
+ environment=environment,
97
+ merchant_account_id=merchant_account_id,
98
+ create_checkout_session_request=create_checkout_session_request,
99
+ idempotency_key=idempotency_key,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ '201': "ApiWriteEnvelope",
108
+ '400': "ApiError",
109
+ '401': "ApiError",
110
+ '409': "ApiError",
111
+ '422': "ApiError",
112
+ '429': "ApiError",
113
+ }
114
+ response_data = self.api_client.call_api(
115
+ *_param,
116
+ _request_timeout=_request_timeout
117
+ )
118
+ response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+
125
+ @validate_call
126
+ def create_checkout_session_with_http_info(
127
+ self,
128
+ environment: StrictStr,
129
+ merchant_account_id: StrictStr,
130
+ create_checkout_session_request: CreateCheckoutSessionRequest,
131
+ 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,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Annotated[StrictFloat, Field(gt=0)]
138
+ ]
139
+ ] = None,
140
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
141
+ _content_type: Optional[StrictStr] = None,
142
+ _headers: Optional[Dict[StrictStr, Any]] = None,
143
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
144
+ ) -> ApiResponse[ApiWriteEnvelope]:
145
+ """Create a hosted checkout session
146
+
147
+
148
+ :param environment: (required)
149
+ :type environment: str
150
+ :param merchant_account_id: (required)
151
+ :type merchant_account_id: str
152
+ :param create_checkout_session_request: (required)
153
+ :type create_checkout_session_request: CreateCheckoutSessionRequest
154
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
155
+ :type idempotency_key: str
156
+ :param _request_timeout: timeout setting for this request. If one
157
+ number provided, it will be total request
158
+ timeout. It can also be a pair (tuple) of
159
+ (connection, read) timeouts.
160
+ :type _request_timeout: int, tuple(int, int), optional
161
+ :param _request_auth: set to override the auth_settings for an a single
162
+ request; this effectively ignores the
163
+ authentication in the spec for a single request.
164
+ :type _request_auth: dict, optional
165
+ :param _content_type: force content-type for the request.
166
+ :type _content_type: str, Optional
167
+ :param _headers: set to override the headers for a single
168
+ request; this effectively ignores the headers
169
+ in the spec for a single request.
170
+ :type _headers: dict, optional
171
+ :param _host_index: set to override the host_index for a single
172
+ request; this effectively ignores the host_index
173
+ in the spec for a single request.
174
+ :type _host_index: int, optional
175
+ :return: Returns the result object.
176
+ """ # noqa: E501
177
+
178
+ _param = self._create_checkout_session_serialize(
179
+ environment=environment,
180
+ merchant_account_id=merchant_account_id,
181
+ create_checkout_session_request=create_checkout_session_request,
182
+ idempotency_key=idempotency_key,
183
+ _request_auth=_request_auth,
184
+ _content_type=_content_type,
185
+ _headers=_headers,
186
+ _host_index=_host_index
187
+ )
188
+
189
+ _response_types_map: Dict[str, Optional[str]] = {
190
+ '201': "ApiWriteEnvelope",
191
+ '400': "ApiError",
192
+ '401': "ApiError",
193
+ '409': "ApiError",
194
+ '422': "ApiError",
195
+ '429': "ApiError",
196
+ }
197
+ response_data = self.api_client.call_api(
198
+ *_param,
199
+ _request_timeout=_request_timeout
200
+ )
201
+ response_data.read()
202
+ return self.api_client.response_deserialize(
203
+ response_data=response_data,
204
+ response_types_map=_response_types_map,
205
+ )
206
+
207
+
208
+ @validate_call
209
+ def create_checkout_session_without_preload_content(
210
+ self,
211
+ environment: StrictStr,
212
+ merchant_account_id: StrictStr,
213
+ create_checkout_session_request: CreateCheckoutSessionRequest,
214
+ 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,
215
+ _request_timeout: Union[
216
+ None,
217
+ Annotated[StrictFloat, Field(gt=0)],
218
+ Tuple[
219
+ Annotated[StrictFloat, Field(gt=0)],
220
+ Annotated[StrictFloat, Field(gt=0)]
221
+ ]
222
+ ] = None,
223
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
224
+ _content_type: Optional[StrictStr] = None,
225
+ _headers: Optional[Dict[StrictStr, Any]] = None,
226
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
227
+ ) -> RESTResponseType:
228
+ """Create a hosted checkout session
229
+
230
+
231
+ :param environment: (required)
232
+ :type environment: str
233
+ :param merchant_account_id: (required)
234
+ :type merchant_account_id: str
235
+ :param create_checkout_session_request: (required)
236
+ :type create_checkout_session_request: CreateCheckoutSessionRequest
237
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
238
+ :type idempotency_key: str
239
+ :param _request_timeout: timeout setting for this request. If one
240
+ number provided, it will be total request
241
+ timeout. It can also be a pair (tuple) of
242
+ (connection, read) timeouts.
243
+ :type _request_timeout: int, tuple(int, int), optional
244
+ :param _request_auth: set to override the auth_settings for an a single
245
+ request; this effectively ignores the
246
+ authentication in the spec for a single request.
247
+ :type _request_auth: dict, optional
248
+ :param _content_type: force content-type for the request.
249
+ :type _content_type: str, Optional
250
+ :param _headers: set to override the headers for a single
251
+ request; this effectively ignores the headers
252
+ in the spec for a single request.
253
+ :type _headers: dict, optional
254
+ :param _host_index: set to override the host_index for a single
255
+ request; this effectively ignores the host_index
256
+ in the spec for a single request.
257
+ :type _host_index: int, optional
258
+ :return: Returns the result object.
259
+ """ # noqa: E501
260
+
261
+ _param = self._create_checkout_session_serialize(
262
+ environment=environment,
263
+ merchant_account_id=merchant_account_id,
264
+ create_checkout_session_request=create_checkout_session_request,
265
+ idempotency_key=idempotency_key,
266
+ _request_auth=_request_auth,
267
+ _content_type=_content_type,
268
+ _headers=_headers,
269
+ _host_index=_host_index
270
+ )
271
+
272
+ _response_types_map: Dict[str, Optional[str]] = {
273
+ '201': "ApiWriteEnvelope",
274
+ '400': "ApiError",
275
+ '401': "ApiError",
276
+ '409': "ApiError",
277
+ '422': "ApiError",
278
+ '429': "ApiError",
279
+ }
280
+ response_data = self.api_client.call_api(
281
+ *_param,
282
+ _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+
287
+ def _create_checkout_session_serialize(
288
+ self,
289
+ environment,
290
+ merchant_account_id,
291
+ create_checkout_session_request,
292
+ idempotency_key,
293
+ _request_auth,
294
+ _content_type,
295
+ _headers,
296
+ _host_index,
297
+ ) -> RequestSerialized:
298
+
299
+ _host = None
300
+
301
+ _collection_formats: Dict[str, str] = {
302
+ }
303
+
304
+ _path_params: Dict[str, str] = {}
305
+ _query_params: List[Tuple[str, str]] = []
306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
307
+ _form_params: List[Tuple[str, str]] = []
308
+ _files: Dict[
309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
310
+ ] = {}
311
+ _body_params: Optional[bytes] = None
312
+
313
+ # process the path parameters
314
+ # process the query parameters
315
+ if environment is not None:
316
+
317
+ _query_params.append(('environment', environment))
318
+
319
+ if merchant_account_id is not None:
320
+
321
+ _query_params.append(('merchantAccountId', merchant_account_id))
322
+
323
+ # process the header parameters
324
+ if idempotency_key is not None:
325
+ _header_params['Idempotency-Key'] = idempotency_key
326
+ # process the form parameters
327
+ # process the body parameter
328
+ if create_checkout_session_request is not None:
329
+ _body_params = create_checkout_session_request
330
+
331
+
332
+ # set the HTTP header `Accept`
333
+ if 'Accept' not in _header_params:
334
+ _header_params['Accept'] = self.api_client.select_header_accept(
335
+ [
336
+ 'application/json'
337
+ ]
338
+ )
339
+
340
+ # set the HTTP header `Content-Type`
341
+ if _content_type:
342
+ _header_params['Content-Type'] = _content_type
343
+ else:
344
+ _default_content_type = (
345
+ self.api_client.select_header_content_type(
346
+ [
347
+ 'application/json'
348
+ ]
349
+ )
350
+ )
351
+ if _default_content_type is not None:
352
+ _header_params['Content-Type'] = _default_content_type
353
+
354
+ # authentication setting
355
+ _auth_settings: List[str] = [
356
+ 'api-key'
357
+ ]
358
+
359
+ return self.api_client.param_serialize(
360
+ method='POST',
361
+ resource_path='/v1/checkout/sessions',
362
+ path_params=_path_params,
363
+ query_params=_query_params,
364
+ header_params=_header_params,
365
+ body=_body_params,
366
+ post_params=_form_params,
367
+ files=_files,
368
+ auth_settings=_auth_settings,
369
+ collection_formats=_collection_formats,
370
+ _host=_host,
371
+ _request_auth=_request_auth
372
+ )