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,170 @@
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, StrictBool, 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 CreateInstallmentPayableRequest(BaseModel):
27
+ """
28
+ CreateInstallmentPayableRequest
29
+ """ # noqa: E501
30
+ source_type: StrictStr = Field(alias="sourceType")
31
+ source_id: StrictStr = Field(alias="sourceId")
32
+ document_id: StrictStr = Field(alias="documentId")
33
+ payment_field_id: StrictStr = Field(alias="paymentFieldId")
34
+ customer_external_id: StrictStr = Field(alias="customerExternalId")
35
+ billing_account_id: StrictStr = Field(alias="billingAccountId")
36
+ merchant_account_id: Optional[StrictStr] = Field(default=None, alias="merchantAccountId")
37
+ currency: StrictStr = Field(description="ISO 4217 alpha-3; only currencies processable on current rails are accepted", json_schema_extra={"examples": ["USD"]})
38
+ tax_mode: StrictStr = Field(alias="taxMode")
39
+ taxable: Optional[StrictBool] = None
40
+ tax_behavior: Optional[StrictStr] = Field(default=None, alias="taxBehavior")
41
+ tax_classification_key: Optional[StrictStr] = Field(default=None, alias="taxClassificationKey")
42
+ collection_intent: StrictStr = Field(alias="collectionIntent")
43
+ fee_policy: Dict[str, Any] = Field(description="Adopter fee policy (modeled, not settlement-executed). Structure passed through to Vortex Payments.", alias="feePolicy")
44
+ installments: List[Dict[str, Any]]
45
+ metadata: Dict[str, StrictStr]
46
+ additional_properties: Dict[str, Any] = {}
47
+ __properties: ClassVar[List[str]] = ["sourceType", "sourceId", "documentId", "paymentFieldId", "customerExternalId", "billingAccountId", "merchantAccountId", "currency", "taxMode", "taxable", "taxBehavior", "taxClassificationKey", "collectionIntent", "feePolicy", "installments", "metadata"]
48
+
49
+ @field_validator('source_type')
50
+ def source_type_validate_enum(cls, value):
51
+ """Validates the enum"""
52
+ if value not in set(['document_payment_field']):
53
+ raise ValueError("must be one of enum values ('document_payment_field')")
54
+ return value
55
+
56
+ @field_validator('tax_mode')
57
+ def tax_mode_validate_enum(cls, value):
58
+ """Validates the enum"""
59
+ if value not in set(['not_taxable', 'taxable_requires_evidence']):
60
+ raise ValueError("must be one of enum values ('not_taxable', 'taxable_requires_evidence')")
61
+ return value
62
+
63
+ @field_validator('tax_behavior')
64
+ def tax_behavior_validate_enum(cls, value):
65
+ """Validates the enum"""
66
+ if value is None:
67
+ return value
68
+
69
+ if value not in set(['inclusive', 'exclusive']):
70
+ raise ValueError("must be one of enum values ('inclusive', 'exclusive')")
71
+ return value
72
+
73
+ @field_validator('tax_classification_key')
74
+ def tax_classification_key_validate_enum(cls, value):
75
+ """Validates the enum"""
76
+ if value is None:
77
+ return value
78
+
79
+ if value not in set(['standard_taxable']):
80
+ raise ValueError("must be one of enum values ('standard_taxable')")
81
+ return value
82
+
83
+ @field_validator('collection_intent')
84
+ def collection_intent_validate_enum(cls, value):
85
+ """Validates the enum"""
86
+ if value not in set(['manual']):
87
+ raise ValueError("must be one of enum values ('manual')")
88
+ return value
89
+
90
+ model_config = ConfigDict(
91
+ validate_by_name=True,
92
+ validate_by_alias=True,
93
+ validate_assignment=True,
94
+ protected_namespaces=(),
95
+ )
96
+
97
+
98
+ def to_str(self) -> str:
99
+ """Returns the string representation of the model using alias"""
100
+ return pprint.pformat(self.model_dump(by_alias=True))
101
+
102
+ def to_json(self) -> str:
103
+ """Returns the JSON representation of the model using alias"""
104
+ return json.dumps(to_jsonable_python(self.to_dict()))
105
+
106
+ @classmethod
107
+ def from_json(cls, json_str: str) -> Optional[Self]:
108
+ """Create an instance of CreateInstallmentPayableRequest from a JSON string"""
109
+ return cls.from_dict(json.loads(json_str))
110
+
111
+ def to_dict(self) -> Dict[str, Any]:
112
+ """Return the dictionary representation of the model using alias.
113
+
114
+ This has the following differences from calling pydantic's
115
+ `self.model_dump(by_alias=True)`:
116
+
117
+ * `None` is only added to the output dict for nullable fields that
118
+ were set at model initialization. Other fields with value `None`
119
+ are ignored.
120
+ * Fields in `self.additional_properties` are added to the output dict.
121
+ """
122
+ excluded_fields: Set[str] = set([
123
+ "additional_properties",
124
+ ])
125
+
126
+ _dict = self.model_dump(
127
+ by_alias=True,
128
+ exclude=excluded_fields,
129
+ exclude_none=True,
130
+ )
131
+ # puts key-value pairs in additional_properties in the top level
132
+ if self.additional_properties is not None:
133
+ for _key, _value in self.additional_properties.items():
134
+ _dict[_key] = _value
135
+
136
+ return _dict
137
+
138
+ @classmethod
139
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
140
+ """Create an instance of CreateInstallmentPayableRequest from a dict"""
141
+ if obj is None:
142
+ return None
143
+
144
+ if not isinstance(obj, dict):
145
+ return cls.model_validate(obj)
146
+
147
+ _obj = cls.model_validate({
148
+ "sourceType": obj.get("sourceType"),
149
+ "sourceId": obj.get("sourceId"),
150
+ "documentId": obj.get("documentId"),
151
+ "paymentFieldId": obj.get("paymentFieldId"),
152
+ "customerExternalId": obj.get("customerExternalId"),
153
+ "billingAccountId": obj.get("billingAccountId"),
154
+ "merchantAccountId": obj.get("merchantAccountId"),
155
+ "currency": obj.get("currency"),
156
+ "taxMode": obj.get("taxMode"),
157
+ "taxable": obj.get("taxable"),
158
+ "taxBehavior": obj.get("taxBehavior"),
159
+ "taxClassificationKey": obj.get("taxClassificationKey"),
160
+ "collectionIntent": obj.get("collectionIntent"),
161
+ "feePolicy": obj.get("feePolicy"),
162
+ "installments": obj.get("installments"),
163
+ "metadata": obj.get("metadata")
164
+ })
165
+ # store additional fields in additional_properties
166
+ for _key in obj.keys():
167
+ if _key not in cls.__properties:
168
+ _obj.additional_properties[_key] = obj.get(_key)
169
+
170
+ return _obj
@@ -0,0 +1,158 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from vortex.models.tax_address import TaxAddress
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class CreatePayableRequest(BaseModel):
29
+ """
30
+ CreatePayableRequest
31
+ """ # noqa: E501
32
+ source_type: StrictStr = Field(alias="sourceType")
33
+ source_id: StrictStr = Field(alias="sourceId")
34
+ document_id: StrictStr = Field(alias="documentId")
35
+ payment_field_id: StrictStr = Field(alias="paymentFieldId")
36
+ customer_external_id: StrictStr = Field(alias="customerExternalId")
37
+ billing_account_id: StrictStr = Field(alias="billingAccountId")
38
+ collection_intent: StrictStr = Field(alias="collectionIntent")
39
+ fee_policy: Dict[str, Any] = Field(description="Adopter fee policy (modeled, not settlement-executed). Structure passed through to Vortex Payments.", alias="feePolicy")
40
+ due_at: Optional[datetime] = Field(default=None, alias="dueAt")
41
+ line_items: List[Dict[str, Any]] = Field(alias="lineItems")
42
+ taxable: Optional[StrictBool] = None
43
+ tax_behavior: Optional[StrictStr] = Field(default=None, alias="taxBehavior")
44
+ tax_classification_key: Optional[StrictStr] = Field(default=None, alias="taxClassificationKey")
45
+ customer_tax_address: Optional[TaxAddress] = Field(default=None, alias="customerTaxAddress")
46
+ ship_from_address: Optional[TaxAddress] = Field(default=None, alias="shipFromAddress")
47
+ metadata: Dict[str, StrictStr]
48
+ __properties: ClassVar[List[str]] = ["sourceType", "sourceId", "documentId", "paymentFieldId", "customerExternalId", "billingAccountId", "collectionIntent", "feePolicy", "dueAt", "lineItems", "taxable", "taxBehavior", "taxClassificationKey", "customerTaxAddress", "shipFromAddress", "metadata"]
49
+
50
+ @field_validator('source_type')
51
+ def source_type_validate_enum(cls, value):
52
+ """Validates the enum"""
53
+ if value not in set(['document_payment_field']):
54
+ raise ValueError("must be one of enum values ('document_payment_field')")
55
+ return value
56
+
57
+ @field_validator('collection_intent')
58
+ def collection_intent_validate_enum(cls, value):
59
+ """Validates the enum"""
60
+ if value not in set(['manual']):
61
+ raise ValueError("must be one of enum values ('manual')")
62
+ return value
63
+
64
+ @field_validator('tax_behavior')
65
+ def tax_behavior_validate_enum(cls, value):
66
+ """Validates the enum"""
67
+ if value is None:
68
+ return value
69
+
70
+ if value not in set(['inclusive', 'exclusive']):
71
+ raise ValueError("must be one of enum values ('inclusive', 'exclusive')")
72
+ return value
73
+
74
+ @field_validator('tax_classification_key')
75
+ def tax_classification_key_validate_enum(cls, value):
76
+ """Validates the enum"""
77
+ if value is None:
78
+ return value
79
+
80
+ if value not in set(['standard_taxable']):
81
+ raise ValueError("must be one of enum values ('standard_taxable')")
82
+ return value
83
+
84
+ model_config = ConfigDict(
85
+ validate_by_name=True,
86
+ validate_by_alias=True,
87
+ validate_assignment=True,
88
+ protected_namespaces=(),
89
+ )
90
+
91
+
92
+ def to_str(self) -> str:
93
+ """Returns the string representation of the model using alias"""
94
+ return pprint.pformat(self.model_dump(by_alias=True))
95
+
96
+ def to_json(self) -> str:
97
+ """Returns the JSON representation of the model using alias"""
98
+ return json.dumps(to_jsonable_python(self.to_dict()))
99
+
100
+ @classmethod
101
+ def from_json(cls, json_str: str) -> Optional[Self]:
102
+ """Create an instance of CreatePayableRequest from a JSON string"""
103
+ return cls.from_dict(json.loads(json_str))
104
+
105
+ def to_dict(self) -> Dict[str, Any]:
106
+ """Return the dictionary representation of the model using alias.
107
+
108
+ This has the following differences from calling pydantic's
109
+ `self.model_dump(by_alias=True)`:
110
+
111
+ * `None` is only added to the output dict for nullable fields that
112
+ were set at model initialization. Other fields with value `None`
113
+ are ignored.
114
+ """
115
+ excluded_fields: Set[str] = set([
116
+ ])
117
+
118
+ _dict = self.model_dump(
119
+ by_alias=True,
120
+ exclude=excluded_fields,
121
+ exclude_none=True,
122
+ )
123
+ # override the default output from pydantic by calling `to_dict()` of customer_tax_address
124
+ if self.customer_tax_address:
125
+ _dict['customerTaxAddress'] = self.customer_tax_address.to_dict()
126
+ # override the default output from pydantic by calling `to_dict()` of ship_from_address
127
+ if self.ship_from_address:
128
+ _dict['shipFromAddress'] = self.ship_from_address.to_dict()
129
+ return _dict
130
+
131
+ @classmethod
132
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
133
+ """Create an instance of CreatePayableRequest from a dict"""
134
+ if obj is None:
135
+ return None
136
+
137
+ if not isinstance(obj, dict):
138
+ return cls.model_validate(obj)
139
+
140
+ _obj = cls.model_validate({
141
+ "sourceType": obj.get("sourceType"),
142
+ "sourceId": obj.get("sourceId"),
143
+ "documentId": obj.get("documentId"),
144
+ "paymentFieldId": obj.get("paymentFieldId"),
145
+ "customerExternalId": obj.get("customerExternalId"),
146
+ "billingAccountId": obj.get("billingAccountId"),
147
+ "collectionIntent": obj.get("collectionIntent"),
148
+ "feePolicy": obj.get("feePolicy"),
149
+ "dueAt": obj.get("dueAt"),
150
+ "lineItems": obj.get("lineItems"),
151
+ "taxable": obj.get("taxable"),
152
+ "taxBehavior": obj.get("taxBehavior"),
153
+ "taxClassificationKey": obj.get("taxClassificationKey"),
154
+ "customerTaxAddress": TaxAddress.from_dict(obj["customerTaxAddress"]) if obj.get("customerTaxAddress") is not None else None,
155
+ "shipFromAddress": TaxAddress.from_dict(obj["shipFromAddress"]) if obj.get("shipFromAddress") is not None else None,
156
+ "metadata": obj.get("metadata")
157
+ })
158
+ return _obj
@@ -0,0 +1,181 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from vortex.models.create_recurring_payable_request_cadence import CreateRecurringPayableRequestCadence
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class CreateRecurringPayableRequest(BaseModel):
29
+ """
30
+ CreateRecurringPayableRequest
31
+ """ # noqa: E501
32
+ source_type: StrictStr = Field(alias="sourceType")
33
+ source_id: StrictStr = Field(alias="sourceId")
34
+ document_id: StrictStr = Field(alias="documentId")
35
+ payment_field_id: StrictStr = Field(alias="paymentFieldId")
36
+ customer_external_id: StrictStr = Field(alias="customerExternalId")
37
+ billing_account_id: StrictStr = Field(alias="billingAccountId")
38
+ merchant_account_id: Optional[StrictStr] = Field(default=None, alias="merchantAccountId")
39
+ currency: StrictStr = Field(description="ISO 4217 alpha-3; only currencies processable on current rails are accepted", json_schema_extra={"examples": ["USD"]})
40
+ line_items: List[Dict[str, Any]] = Field(alias="lineItems")
41
+ tax_mode: StrictStr = Field(alias="taxMode")
42
+ taxable: Optional[StrictBool] = None
43
+ tax_behavior: Optional[StrictStr] = Field(default=None, alias="taxBehavior")
44
+ tax_classification_key: Optional[StrictStr] = Field(default=None, alias="taxClassificationKey")
45
+ collection_intent: StrictStr = Field(alias="collectionIntent")
46
+ fee_policy: Dict[str, Any] = Field(description="Adopter fee policy (modeled, not settlement-executed). Structure passed through to Vortex Payments.", alias="feePolicy")
47
+ cadence: CreateRecurringPayableRequestCadence
48
+ end_policy: Dict[str, Any] = Field(alias="endPolicy")
49
+ start_at: datetime = Field(alias="startAt")
50
+ metadata: Dict[str, StrictStr]
51
+ additional_properties: Dict[str, Any] = {}
52
+ __properties: ClassVar[List[str]] = ["sourceType", "sourceId", "documentId", "paymentFieldId", "customerExternalId", "billingAccountId", "merchantAccountId", "currency", "lineItems", "taxMode", "taxable", "taxBehavior", "taxClassificationKey", "collectionIntent", "feePolicy", "cadence", "endPolicy", "startAt", "metadata"]
53
+
54
+ @field_validator('source_type')
55
+ def source_type_validate_enum(cls, value):
56
+ """Validates the enum"""
57
+ if value not in set(['document_payment_field']):
58
+ raise ValueError("must be one of enum values ('document_payment_field')")
59
+ return value
60
+
61
+ @field_validator('tax_mode')
62
+ def tax_mode_validate_enum(cls, value):
63
+ """Validates the enum"""
64
+ if value not in set(['not_taxable', 'taxable_requires_evidence']):
65
+ raise ValueError("must be one of enum values ('not_taxable', 'taxable_requires_evidence')")
66
+ return value
67
+
68
+ @field_validator('tax_behavior')
69
+ def tax_behavior_validate_enum(cls, value):
70
+ """Validates the enum"""
71
+ if value is None:
72
+ return value
73
+
74
+ if value not in set(['inclusive', 'exclusive']):
75
+ raise ValueError("must be one of enum values ('inclusive', 'exclusive')")
76
+ return value
77
+
78
+ @field_validator('tax_classification_key')
79
+ def tax_classification_key_validate_enum(cls, value):
80
+ """Validates the enum"""
81
+ if value is None:
82
+ return value
83
+
84
+ if value not in set(['standard_taxable']):
85
+ raise ValueError("must be one of enum values ('standard_taxable')")
86
+ return value
87
+
88
+ @field_validator('collection_intent')
89
+ def collection_intent_validate_enum(cls, value):
90
+ """Validates the enum"""
91
+ if value not in set(['manual']):
92
+ raise ValueError("must be one of enum values ('manual')")
93
+ return value
94
+
95
+ model_config = ConfigDict(
96
+ validate_by_name=True,
97
+ validate_by_alias=True,
98
+ validate_assignment=True,
99
+ protected_namespaces=(),
100
+ )
101
+
102
+
103
+ def to_str(self) -> str:
104
+ """Returns the string representation of the model using alias"""
105
+ return pprint.pformat(self.model_dump(by_alias=True))
106
+
107
+ def to_json(self) -> str:
108
+ """Returns the JSON representation of the model using alias"""
109
+ return json.dumps(to_jsonable_python(self.to_dict()))
110
+
111
+ @classmethod
112
+ def from_json(cls, json_str: str) -> Optional[Self]:
113
+ """Create an instance of CreateRecurringPayableRequest from a JSON string"""
114
+ return cls.from_dict(json.loads(json_str))
115
+
116
+ def to_dict(self) -> Dict[str, Any]:
117
+ """Return the dictionary representation of the model using alias.
118
+
119
+ This has the following differences from calling pydantic's
120
+ `self.model_dump(by_alias=True)`:
121
+
122
+ * `None` is only added to the output dict for nullable fields that
123
+ were set at model initialization. Other fields with value `None`
124
+ are ignored.
125
+ * Fields in `self.additional_properties` are added to the output dict.
126
+ """
127
+ excluded_fields: Set[str] = set([
128
+ "additional_properties",
129
+ ])
130
+
131
+ _dict = self.model_dump(
132
+ by_alias=True,
133
+ exclude=excluded_fields,
134
+ exclude_none=True,
135
+ )
136
+ # override the default output from pydantic by calling `to_dict()` of cadence
137
+ if self.cadence:
138
+ _dict['cadence'] = self.cadence.to_dict()
139
+ # puts key-value pairs in additional_properties in the top level
140
+ if self.additional_properties is not None:
141
+ for _key, _value in self.additional_properties.items():
142
+ _dict[_key] = _value
143
+
144
+ return _dict
145
+
146
+ @classmethod
147
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
148
+ """Create an instance of CreateRecurringPayableRequest from a dict"""
149
+ if obj is None:
150
+ return None
151
+
152
+ if not isinstance(obj, dict):
153
+ return cls.model_validate(obj)
154
+
155
+ _obj = cls.model_validate({
156
+ "sourceType": obj.get("sourceType"),
157
+ "sourceId": obj.get("sourceId"),
158
+ "documentId": obj.get("documentId"),
159
+ "paymentFieldId": obj.get("paymentFieldId"),
160
+ "customerExternalId": obj.get("customerExternalId"),
161
+ "billingAccountId": obj.get("billingAccountId"),
162
+ "merchantAccountId": obj.get("merchantAccountId"),
163
+ "currency": obj.get("currency"),
164
+ "lineItems": obj.get("lineItems"),
165
+ "taxMode": obj.get("taxMode"),
166
+ "taxable": obj.get("taxable"),
167
+ "taxBehavior": obj.get("taxBehavior"),
168
+ "taxClassificationKey": obj.get("taxClassificationKey"),
169
+ "collectionIntent": obj.get("collectionIntent"),
170
+ "feePolicy": obj.get("feePolicy"),
171
+ "cadence": CreateRecurringPayableRequestCadence.from_dict(obj["cadence"]) if obj.get("cadence") is not None else None,
172
+ "endPolicy": obj.get("endPolicy"),
173
+ "startAt": obj.get("startAt"),
174
+ "metadata": obj.get("metadata")
175
+ })
176
+ # store additional fields in additional_properties
177
+ for _key in obj.keys():
178
+ if _key not in cls.__properties:
179
+ _obj.additional_properties[_key] = obj.get(_key)
180
+
181
+ return _obj
@@ -0,0 +1,96 @@
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
22
+ from typing_extensions import Annotated
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+ from pydantic_core import to_jsonable_python
26
+
27
+ class CreateRecurringPayableRequestCadence(BaseModel):
28
+ """
29
+ CreateRecurringPayableRequestCadence
30
+ """ # noqa: E501
31
+ interval: StrictStr
32
+ interval_count: Annotated[int, Field(strict=True, ge=1)] = Field(alias="intervalCount")
33
+ __properties: ClassVar[List[str]] = ["interval", "intervalCount"]
34
+
35
+ @field_validator('interval')
36
+ def interval_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in set(['week', 'month', 'year']):
39
+ raise ValueError("must be one of enum values ('week', 'month', 'year')")
40
+ return value
41
+
42
+ model_config = ConfigDict(
43
+ validate_by_name=True,
44
+ validate_by_alias=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.model_dump(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(to_jsonable_python(self.to_dict()))
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of CreateRecurringPayableRequestCadence from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of CreateRecurringPayableRequestCadence 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
+ "interval": obj.get("interval"),
94
+ "intervalCount": obj.get("intervalCount")
95
+ })
96
+ return _obj