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,387 @@
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.customer_upsert_request import CustomerUpsertRequest
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 CustomersApi:
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 upsert_customer(
44
+ self,
45
+ customer_id: StrictStr,
46
+ environment: StrictStr,
47
+ merchant_account_id: StrictStr,
48
+ customer_upsert_request: CustomerUpsertRequest,
49
+ 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,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> ApiWriteEnvelope:
63
+ """Create or update a billing customer
64
+
65
+
66
+ :param customer_id: (required)
67
+ :type customer_id: str
68
+ :param environment: (required)
69
+ :type environment: str
70
+ :param merchant_account_id: (required)
71
+ :type merchant_account_id: str
72
+ :param customer_upsert_request: (required)
73
+ :type customer_upsert_request: CustomerUpsertRequest
74
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
75
+ :type idempotency_key: str
76
+ :param _request_timeout: timeout setting for this request. If one
77
+ number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :type _request_timeout: int, tuple(int, int), optional
81
+ :param _request_auth: set to override the auth_settings for an a single
82
+ request; this effectively ignores the
83
+ authentication in the spec for a single request.
84
+ :type _request_auth: dict, optional
85
+ :param _content_type: force content-type for the request.
86
+ :type _content_type: str, Optional
87
+ :param _headers: set to override the headers for a single
88
+ request; this effectively ignores the headers
89
+ in the spec for a single request.
90
+ :type _headers: dict, optional
91
+ :param _host_index: set to override the host_index for a single
92
+ request; this effectively ignores the host_index
93
+ in the spec for a single request.
94
+ :type _host_index: int, optional
95
+ :return: Returns the result object.
96
+ """ # noqa: E501
97
+
98
+ _param = self._upsert_customer_serialize(
99
+ customer_id=customer_id,
100
+ environment=environment,
101
+ merchant_account_id=merchant_account_id,
102
+ customer_upsert_request=customer_upsert_request,
103
+ idempotency_key=idempotency_key,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '200': "ApiWriteEnvelope",
112
+ '400': "ApiError",
113
+ '401': "ApiError",
114
+ '409': "ApiError",
115
+ '422': "ApiError",
116
+ '429': "ApiError",
117
+ }
118
+ response_data = self.api_client.call_api(
119
+ *_param,
120
+ _request_timeout=_request_timeout
121
+ )
122
+ response_data.read()
123
+ return self.api_client.response_deserialize(
124
+ response_data=response_data,
125
+ response_types_map=_response_types_map,
126
+ ).data
127
+
128
+
129
+ @validate_call
130
+ def upsert_customer_with_http_info(
131
+ self,
132
+ customer_id: StrictStr,
133
+ environment: StrictStr,
134
+ merchant_account_id: StrictStr,
135
+ customer_upsert_request: CustomerUpsertRequest,
136
+ 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,
137
+ _request_timeout: Union[
138
+ None,
139
+ Annotated[StrictFloat, Field(gt=0)],
140
+ Tuple[
141
+ Annotated[StrictFloat, Field(gt=0)],
142
+ Annotated[StrictFloat, Field(gt=0)]
143
+ ]
144
+ ] = None,
145
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
146
+ _content_type: Optional[StrictStr] = None,
147
+ _headers: Optional[Dict[StrictStr, Any]] = None,
148
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
149
+ ) -> ApiResponse[ApiWriteEnvelope]:
150
+ """Create or update a billing customer
151
+
152
+
153
+ :param customer_id: (required)
154
+ :type customer_id: str
155
+ :param environment: (required)
156
+ :type environment: str
157
+ :param merchant_account_id: (required)
158
+ :type merchant_account_id: str
159
+ :param customer_upsert_request: (required)
160
+ :type customer_upsert_request: CustomerUpsertRequest
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._upsert_customer_serialize(
186
+ customer_id=customer_id,
187
+ environment=environment,
188
+ merchant_account_id=merchant_account_id,
189
+ customer_upsert_request=customer_upsert_request,
190
+ idempotency_key=idempotency_key,
191
+ _request_auth=_request_auth,
192
+ _content_type=_content_type,
193
+ _headers=_headers,
194
+ _host_index=_host_index
195
+ )
196
+
197
+ _response_types_map: Dict[str, Optional[str]] = {
198
+ '200': "ApiWriteEnvelope",
199
+ '400': "ApiError",
200
+ '401': "ApiError",
201
+ '409': "ApiError",
202
+ '422': "ApiError",
203
+ '429': "ApiError",
204
+ }
205
+ response_data = self.api_client.call_api(
206
+ *_param,
207
+ _request_timeout=_request_timeout
208
+ )
209
+ response_data.read()
210
+ return self.api_client.response_deserialize(
211
+ response_data=response_data,
212
+ response_types_map=_response_types_map,
213
+ )
214
+
215
+
216
+ @validate_call
217
+ def upsert_customer_without_preload_content(
218
+ self,
219
+ customer_id: StrictStr,
220
+ environment: StrictStr,
221
+ merchant_account_id: StrictStr,
222
+ customer_upsert_request: CustomerUpsertRequest,
223
+ 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,
224
+ _request_timeout: Union[
225
+ None,
226
+ Annotated[StrictFloat, Field(gt=0)],
227
+ Tuple[
228
+ Annotated[StrictFloat, Field(gt=0)],
229
+ Annotated[StrictFloat, Field(gt=0)]
230
+ ]
231
+ ] = None,
232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
233
+ _content_type: Optional[StrictStr] = None,
234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
236
+ ) -> RESTResponseType:
237
+ """Create or update a billing customer
238
+
239
+
240
+ :param customer_id: (required)
241
+ :type customer_id: str
242
+ :param environment: (required)
243
+ :type environment: str
244
+ :param merchant_account_id: (required)
245
+ :type merchant_account_id: str
246
+ :param customer_upsert_request: (required)
247
+ :type customer_upsert_request: CustomerUpsertRequest
248
+ :param idempotency_key: Required for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
249
+ :type idempotency_key: str
250
+ :param _request_timeout: timeout setting for this request. If one
251
+ number provided, it will be total request
252
+ timeout. It can also be a pair (tuple) of
253
+ (connection, read) timeouts.
254
+ :type _request_timeout: int, tuple(int, int), optional
255
+ :param _request_auth: set to override the auth_settings for an a single
256
+ request; this effectively ignores the
257
+ authentication in the spec for a single request.
258
+ :type _request_auth: dict, optional
259
+ :param _content_type: force content-type for the request.
260
+ :type _content_type: str, Optional
261
+ :param _headers: set to override the headers for a single
262
+ request; this effectively ignores the headers
263
+ in the spec for a single request.
264
+ :type _headers: dict, optional
265
+ :param _host_index: set to override the host_index for a single
266
+ request; this effectively ignores the host_index
267
+ in the spec for a single request.
268
+ :type _host_index: int, optional
269
+ :return: Returns the result object.
270
+ """ # noqa: E501
271
+
272
+ _param = self._upsert_customer_serialize(
273
+ customer_id=customer_id,
274
+ environment=environment,
275
+ merchant_account_id=merchant_account_id,
276
+ customer_upsert_request=customer_upsert_request,
277
+ idempotency_key=idempotency_key,
278
+ _request_auth=_request_auth,
279
+ _content_type=_content_type,
280
+ _headers=_headers,
281
+ _host_index=_host_index
282
+ )
283
+
284
+ _response_types_map: Dict[str, Optional[str]] = {
285
+ '200': "ApiWriteEnvelope",
286
+ '400': "ApiError",
287
+ '401': "ApiError",
288
+ '409': "ApiError",
289
+ '422': "ApiError",
290
+ '429': "ApiError",
291
+ }
292
+ response_data = self.api_client.call_api(
293
+ *_param,
294
+ _request_timeout=_request_timeout
295
+ )
296
+ return response_data.response
297
+
298
+
299
+ def _upsert_customer_serialize(
300
+ self,
301
+ customer_id,
302
+ environment,
303
+ merchant_account_id,
304
+ customer_upsert_request,
305
+ idempotency_key,
306
+ _request_auth,
307
+ _content_type,
308
+ _headers,
309
+ _host_index,
310
+ ) -> RequestSerialized:
311
+
312
+ _host = None
313
+
314
+ _collection_formats: Dict[str, str] = {
315
+ }
316
+
317
+ _path_params: Dict[str, str] = {}
318
+ _query_params: List[Tuple[str, str]] = []
319
+ _header_params: Dict[str, Optional[str]] = _headers or {}
320
+ _form_params: List[Tuple[str, str]] = []
321
+ _files: Dict[
322
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
323
+ ] = {}
324
+ _body_params: Optional[bytes] = None
325
+
326
+ # process the path parameters
327
+ if customer_id is not None:
328
+ _path_params['customerId'] = customer_id
329
+ # process the query parameters
330
+ if environment is not None:
331
+
332
+ _query_params.append(('environment', environment))
333
+
334
+ if merchant_account_id is not None:
335
+
336
+ _query_params.append(('merchantAccountId', merchant_account_id))
337
+
338
+ # process the header parameters
339
+ if idempotency_key is not None:
340
+ _header_params['Idempotency-Key'] = idempotency_key
341
+ # process the form parameters
342
+ # process the body parameter
343
+ if customer_upsert_request is not None:
344
+ _body_params = customer_upsert_request
345
+
346
+
347
+ # set the HTTP header `Accept`
348
+ if 'Accept' not in _header_params:
349
+ _header_params['Accept'] = self.api_client.select_header_accept(
350
+ [
351
+ 'application/json'
352
+ ]
353
+ )
354
+
355
+ # set the HTTP header `Content-Type`
356
+ if _content_type:
357
+ _header_params['Content-Type'] = _content_type
358
+ else:
359
+ _default_content_type = (
360
+ self.api_client.select_header_content_type(
361
+ [
362
+ 'application/json'
363
+ ]
364
+ )
365
+ )
366
+ if _default_content_type is not None:
367
+ _header_params['Content-Type'] = _default_content_type
368
+
369
+ # authentication setting
370
+ _auth_settings: List[str] = [
371
+ 'api-key'
372
+ ]
373
+
374
+ return self.api_client.param_serialize(
375
+ method='PUT',
376
+ resource_path='/v1/customers/{customerId}',
377
+ path_params=_path_params,
378
+ query_params=_query_params,
379
+ header_params=_header_params,
380
+ body=_body_params,
381
+ post_params=_form_params,
382
+ files=_files,
383
+ auth_settings=_auth_settings,
384
+ collection_formats=_collection_formats,
385
+ _host=_host,
386
+ _request_auth=_request_auth
387
+ )