vortex-sdk 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vortex/__init__.py +265 -0
- vortex/api/__init__.py +24 -0
- vortex/api/billing_api.py +34608 -0
- vortex/api/catalog_api.py +708 -0
- vortex/api/checkout_api.py +372 -0
- vortex/api/credit_notes_api.py +1688 -0
- vortex/api/customer_balance_api.py +1747 -0
- vortex/api/customers_api.py +387 -0
- vortex/api/discounts_api.py +2623 -0
- vortex/api/entitlements_api.py +1646 -0
- vortex/api/hosted_api.py +2855 -0
- vortex/api/invoices_api.py +2402 -0
- vortex/api/payables_api.py +1380 -0
- vortex/api/payment_methods_api.py +2069 -0
- vortex/api/payment_requests_api.py +1877 -0
- vortex/api/payments_api.py +694 -0
- vortex/api/payments_readiness_api.py +2311 -0
- vortex/api/public_api.py +6931 -0
- vortex/api/quotes_api.py +6817 -0
- vortex/api/receipts_api.py +1111 -0
- vortex/api/subscriptions_api.py +1059 -0
- vortex/api/tax_api.py +1397 -0
- vortex/api/webhooks_api.py +4931 -0
- vortex/api_client.py +804 -0
- vortex/api_response.py +21 -0
- vortex/configuration.py +658 -0
- vortex/exceptions.py +218 -0
- vortex/models/__init__.py +104 -0
- vortex/models/api_error.py +103 -0
- vortex/models/api_error_error.py +114 -0
- vortex/models/api_write_envelope.py +101 -0
- vortex/models/apply_coupon_request.py +97 -0
- vortex/models/billing_order_form_sign_request.py +103 -0
- vortex/models/billing_order_form_signature_request_request.py +86 -0
- vortex/models/billing_order_form_void_request.py +86 -0
- vortex/models/billing_order_forms_expire_due_request.py +90 -0
- vortex/models/billing_order_update_request.py +99 -0
- vortex/models/billing_orders_execute_due_request.py +90 -0
- vortex/models/billing_quote_create_request.py +119 -0
- vortex/models/billing_quote_line_input.py +93 -0
- vortex/models/billing_quote_version_approve_request.py +87 -0
- vortex/models/billing_quote_version_create_request.py +103 -0
- vortex/models/billing_quote_version_update_request.py +102 -0
- vortex/models/billing_quote_version_void_request.py +96 -0
- vortex/models/checkout_session_line_item_request.py +91 -0
- vortex/models/coupon_targets.py +89 -0
- vortex/models/create_checkout_session_request.py +140 -0
- vortex/models/create_coupon_request.py +132 -0
- vortex/models/create_deposit_balance_payable_request.py +172 -0
- vortex/models/create_installment_payable_request.py +170 -0
- vortex/models/create_payable_request.py +158 -0
- vortex/models/create_recurring_payable_request.py +181 -0
- vortex/models/create_recurring_payable_request_cadence.py +96 -0
- vortex/models/credit_note_create_line.py +105 -0
- vortex/models/credit_note_create_request.py +112 -0
- vortex/models/credit_note_reason.py +39 -0
- vortex/models/credit_note_refund_reconcile_request.py +86 -0
- vortex/models/credit_note_refund_request.py +94 -0
- vortex/models/customer_balance_targets.py +102 -0
- vortex/models/customer_default_payment_method_request.py +88 -0
- vortex/models/customer_payment_method_archive_request.py +88 -0
- vortex/models/customer_payment_method_attach_request.py +94 -0
- vortex/models/customer_payment_method_setup_request.py +100 -0
- vortex/models/customer_upsert_request.py +96 -0
- vortex/models/expire_customer_balance_request.py +98 -0
- vortex/models/grant_customer_balance_from_payment_request.py +103 -0
- vortex/models/grant_customer_balance_request.py +106 -0
- vortex/models/grant_entitlement_request.py +106 -0
- vortex/models/invoice_collect_request.py +86 -0
- vortex/models/invoice_create_request.py +92 -0
- vortex/models/invoice_finalize_request.py +86 -0
- vortex/models/invoice_mark_uncollectible_request.py +90 -0
- vortex/models/invoice_tax.py +142 -0
- vortex/models/invoice_void_request.py +88 -0
- vortex/models/merchant_account_create_request.py +183 -0
- vortex/models/merchant_address.py +96 -0
- vortex/models/merchant_associated_identity.py +114 -0
- vortex/models/merchant_onboarding_link_request.py +95 -0
- vortex/models/merchant_profile_date.py +90 -0
- vortex/models/merchant_settlement_bank_account.py +94 -0
- vortex/models/merchant_tax_profile_request.py +125 -0
- vortex/models/merchant_tax_profile_request_registrations_inner.py +88 -0
- vortex/models/merchant_underwriting_data.py +127 -0
- vortex/models/merchant_underwriting_data_card_volume_distribution.py +90 -0
- vortex/models/merchant_underwriting_data_volume_distribution_by_business_type.py +90 -0
- vortex/models/open_api_invoice_tax_response.py +92 -0
- vortex/models/open_api_invoice_tax_response_all_of_data.py +92 -0
- vortex/models/payment_request_collect_request.py +86 -0
- vortex/models/payment_request_create_request.py +100 -0
- vortex/models/payment_request_link_create_request.py +89 -0
- vortex/models/price_create_request.py +122 -0
- vortex/models/product_create_request.py +92 -0
- vortex/models/reverse_customer_balance_request.py +98 -0
- vortex/models/revoke_entitlement_request.py +106 -0
- vortex/models/subscription_change_request.py +111 -0
- vortex/models/subscription_create_request.py +122 -0
- vortex/models/subscription_item_change_preview_request.py +100 -0
- vortex/models/subscription_item_change_request_item.py +91 -0
- vortex/models/tax_address.py +96 -0
- vortex/models/tax_behavior.py +36 -0
- vortex/models/tax_behavior_policy.py +100 -0
- vortex/models/tax_behavior_policy_request.py +89 -0
- vortex/models/tax_failure.py +104 -0
- vortex/models/tax_finalize_request.py +98 -0
- vortex/models/tax_jurisdiction_evidence.py +94 -0
- vortex/models/tax_line_evidence.py +103 -0
- vortex/models/tax_quote_request.py +98 -0
- vortex/models/terminate_applied_coupon_request.py +87 -0
- vortex/models/terminate_coupon_request.py +87 -0
- vortex/models/webhook_deliveries_dispatch_request.py +91 -0
- vortex/models/webhook_deliveries_redrive_request.py +107 -0
- vortex/models/webhook_delivery_replay_request.py +88 -0
- vortex/models/webhook_endpoint_create_request.py +91 -0
- vortex/models/webhook_endpoint_secret_rotate_request.py +87 -0
- vortex/models/webhook_endpoint_test_request.py +88 -0
- vortex/models/webhook_endpoint_update_request.py +103 -0
- vortex/models/webhook_event_resend_request.py +86 -0
- vortex/rest.py +263 -0
- vortex_sdk-0.2.0.dist-info/METADATA +34 -0
- vortex_sdk-0.2.0.dist-info/RECORD +123 -0
- vortex_sdk-0.2.0.dist-info/WHEEL +5 -0
- vortex_sdk-0.2.0.dist-info/licenses/LICENSE +21 -0
- vortex_sdk-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,106 @@
|
|
|
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 GrantEntitlementRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
GrantEntitlementRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
customer_external_id: StrictStr = Field(alias="customerExternalId")
|
|
31
|
+
billing_account_id: Optional[StrictStr] = Field(default=None, alias="billingAccountId")
|
|
32
|
+
entitlement_key: StrictStr = Field(alias="entitlementKey")
|
|
33
|
+
source: Optional[StrictStr] = None
|
|
34
|
+
source_ref: Optional[StrictStr] = Field(default=None, alias="sourceRef")
|
|
35
|
+
metadata: Optional[Dict[str, StrictStr]] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["customerExternalId", "billingAccountId", "entitlementKey", "source", "sourceRef", "metadata"]
|
|
37
|
+
|
|
38
|
+
@field_validator('source')
|
|
39
|
+
def source_validate_enum(cls, value):
|
|
40
|
+
"""Validates the enum"""
|
|
41
|
+
if value is None:
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
if value not in set(['subscription', 'operator', 'promotion']):
|
|
45
|
+
raise ValueError("must be one of enum values ('subscription', 'operator', 'promotion')")
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
validate_by_name=True,
|
|
50
|
+
validate_by_alias=True,
|
|
51
|
+
validate_assignment=True,
|
|
52
|
+
protected_namespaces=(),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def to_str(self) -> str:
|
|
57
|
+
"""Returns the string representation of the model using alias"""
|
|
58
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
59
|
+
|
|
60
|
+
def to_json(self) -> str:
|
|
61
|
+
"""Returns the JSON representation of the model using alias"""
|
|
62
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of GrantEntitlementRequest from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
_dict = self.model_dump(
|
|
83
|
+
by_alias=True,
|
|
84
|
+
exclude=excluded_fields,
|
|
85
|
+
exclude_none=True,
|
|
86
|
+
)
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of GrantEntitlementRequest from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"customerExternalId": obj.get("customerExternalId"),
|
|
100
|
+
"billingAccountId": obj.get("billingAccountId"),
|
|
101
|
+
"entitlementKey": obj.get("entitlementKey"),
|
|
102
|
+
"source": obj.get("source"),
|
|
103
|
+
"sourceRef": obj.get("sourceRef"),
|
|
104
|
+
"metadata": obj.get("metadata")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
@@ -0,0 +1,86 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class InvoiceCollectRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceCollectRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
payment_method_id: Optional[StrictStr] = Field(default=None, alias="paymentMethodId")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["paymentMethodId"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of InvoiceCollectRequest from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of InvoiceCollectRequest from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"paymentMethodId": obj.get("paymentMethodId")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
@@ -0,0 +1,92 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class InvoiceCreateRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceCreateRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
customer_external_id: StrictStr = Field(alias="customerExternalId")
|
|
31
|
+
subscription_external_id: Optional[StrictStr] = Field(default=None, alias="subscriptionExternalId")
|
|
32
|
+
billing_account_id: Optional[StrictStr] = Field(default=None, alias="billingAccountId")
|
|
33
|
+
metadata: Optional[Dict[str, StrictStr]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["customerExternalId", "subscriptionExternalId", "billingAccountId", "metadata"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of InvoiceCreateRequest from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of InvoiceCreateRequest from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
_obj = cls.model_validate({
|
|
87
|
+
"customerExternalId": obj.get("customerExternalId"),
|
|
88
|
+
"subscriptionExternalId": obj.get("subscriptionExternalId"),
|
|
89
|
+
"billingAccountId": obj.get("billingAccountId"),
|
|
90
|
+
"metadata": obj.get("metadata")
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
@@ -0,0 +1,86 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class InvoiceFinalizeRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceFinalizeRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
finalized_by_ref: Optional[StrictStr] = Field(default=None, alias="finalizedByRef")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["finalizedByRef"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
validate_by_name=True,
|
|
35
|
+
validate_by_alias=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of InvoiceFinalizeRequest from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of InvoiceFinalizeRequest from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"finalizedByRef": obj.get("finalizedByRef")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
@@ -0,0 +1,90 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class InvoiceMarkUncollectibleRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceMarkUncollectibleRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
marked_uncollectible_by_ref: Optional[StrictStr] = Field(default=None, alias="markedUncollectibleByRef")
|
|
31
|
+
by: Optional[StrictStr] = None
|
|
32
|
+
reason: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["markedUncollectibleByRef", "by", "reason"]
|
|
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 InvoiceMarkUncollectibleRequest 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
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of InvoiceMarkUncollectibleRequest from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"markedUncollectibleByRef": obj.get("markedUncollectibleByRef"),
|
|
87
|
+
"by": obj.get("by"),
|
|
88
|
+
"reason": obj.get("reason")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,142 @@
|
|
|
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, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from vortex.models.tax_behavior_policy import TaxBehaviorPolicy
|
|
24
|
+
from vortex.models.tax_failure import TaxFailure
|
|
25
|
+
from vortex.models.tax_jurisdiction_evidence import TaxJurisdictionEvidence
|
|
26
|
+
from vortex.models.tax_line_evidence import TaxLineEvidence
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
from pydantic_core import to_jsonable_python
|
|
30
|
+
|
|
31
|
+
class InvoiceTax(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
InvoiceTax
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
invoice_number: StrictStr = Field(alias="invoiceNumber")
|
|
36
|
+
status: StrictStr
|
|
37
|
+
currency: StrictStr
|
|
38
|
+
subtotal: StrictInt
|
|
39
|
+
tax_total: StrictInt = Field(alias="taxTotal")
|
|
40
|
+
total: StrictInt
|
|
41
|
+
evidence_version: StrictStr = Field(alias="evidenceVersion")
|
|
42
|
+
tax_behavior_policy: TaxBehaviorPolicy = Field(alias="taxBehaviorPolicy")
|
|
43
|
+
quoted_at: Optional[datetime] = Field(default=None, alias="quotedAt")
|
|
44
|
+
finalized_at: Optional[datetime] = Field(default=None, alias="finalizedAt")
|
|
45
|
+
line_evidence: List[TaxLineEvidence] = Field(alias="lineEvidence")
|
|
46
|
+
jurisdiction_evidence: List[TaxJurisdictionEvidence] = Field(alias="jurisdictionEvidence")
|
|
47
|
+
failure: Optional[TaxFailure] = None
|
|
48
|
+
__properties: ClassVar[List[str]] = ["invoiceNumber", "status", "currency", "subtotal", "taxTotal", "total", "evidenceVersion", "taxBehaviorPolicy", "quotedAt", "finalizedAt", "lineEvidence", "jurisdictionEvidence", "failure"]
|
|
49
|
+
|
|
50
|
+
@field_validator('status')
|
|
51
|
+
def status_validate_enum(cls, value):
|
|
52
|
+
"""Validates the enum"""
|
|
53
|
+
if value not in set(['not_required', 'quote_pending', 'quoted', 'finalization_pending', 'finalized', 'failed', 'voided', 'reversed']):
|
|
54
|
+
raise ValueError("must be one of enum values ('not_required', 'quote_pending', 'quoted', 'finalization_pending', 'finalized', 'failed', 'voided', 'reversed')")
|
|
55
|
+
return value
|
|
56
|
+
|
|
57
|
+
model_config = ConfigDict(
|
|
58
|
+
validate_by_name=True,
|
|
59
|
+
validate_by_alias=True,
|
|
60
|
+
validate_assignment=True,
|
|
61
|
+
protected_namespaces=(),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def to_str(self) -> str:
|
|
66
|
+
"""Returns the string representation of the model using alias"""
|
|
67
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
68
|
+
|
|
69
|
+
def to_json(self) -> str:
|
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
|
71
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of InvoiceTax from a JSON string"""
|
|
76
|
+
return cls.from_dict(json.loads(json_str))
|
|
77
|
+
|
|
78
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
79
|
+
"""Return the dictionary representation of the model using alias.
|
|
80
|
+
|
|
81
|
+
This has the following differences from calling pydantic's
|
|
82
|
+
`self.model_dump(by_alias=True)`:
|
|
83
|
+
|
|
84
|
+
* `None` is only added to the output dict for nullable fields that
|
|
85
|
+
were set at model initialization. Other fields with value `None`
|
|
86
|
+
are ignored.
|
|
87
|
+
"""
|
|
88
|
+
excluded_fields: Set[str] = set([
|
|
89
|
+
])
|
|
90
|
+
|
|
91
|
+
_dict = self.model_dump(
|
|
92
|
+
by_alias=True,
|
|
93
|
+
exclude=excluded_fields,
|
|
94
|
+
exclude_none=True,
|
|
95
|
+
)
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of tax_behavior_policy
|
|
97
|
+
if self.tax_behavior_policy:
|
|
98
|
+
_dict['taxBehaviorPolicy'] = self.tax_behavior_policy.to_dict()
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of each item in line_evidence (list)
|
|
100
|
+
_items = []
|
|
101
|
+
if self.line_evidence:
|
|
102
|
+
for _item_line_evidence in self.line_evidence:
|
|
103
|
+
if _item_line_evidence:
|
|
104
|
+
_items.append(_item_line_evidence.to_dict())
|
|
105
|
+
_dict['lineEvidence'] = _items
|
|
106
|
+
# override the default output from pydantic by calling `to_dict()` of each item in jurisdiction_evidence (list)
|
|
107
|
+
_items = []
|
|
108
|
+
if self.jurisdiction_evidence:
|
|
109
|
+
for _item_jurisdiction_evidence in self.jurisdiction_evidence:
|
|
110
|
+
if _item_jurisdiction_evidence:
|
|
111
|
+
_items.append(_item_jurisdiction_evidence.to_dict())
|
|
112
|
+
_dict['jurisdictionEvidence'] = _items
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of failure
|
|
114
|
+
if self.failure:
|
|
115
|
+
_dict['failure'] = self.failure.to_dict()
|
|
116
|
+
return _dict
|
|
117
|
+
|
|
118
|
+
@classmethod
|
|
119
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
120
|
+
"""Create an instance of InvoiceTax from a dict"""
|
|
121
|
+
if obj is None:
|
|
122
|
+
return None
|
|
123
|
+
|
|
124
|
+
if not isinstance(obj, dict):
|
|
125
|
+
return cls.model_validate(obj)
|
|
126
|
+
|
|
127
|
+
_obj = cls.model_validate({
|
|
128
|
+
"invoiceNumber": obj.get("invoiceNumber"),
|
|
129
|
+
"status": obj.get("status"),
|
|
130
|
+
"currency": obj.get("currency"),
|
|
131
|
+
"subtotal": obj.get("subtotal"),
|
|
132
|
+
"taxTotal": obj.get("taxTotal"),
|
|
133
|
+
"total": obj.get("total"),
|
|
134
|
+
"evidenceVersion": obj.get("evidenceVersion"),
|
|
135
|
+
"taxBehaviorPolicy": TaxBehaviorPolicy.from_dict(obj["taxBehaviorPolicy"]) if obj.get("taxBehaviorPolicy") is not None else None,
|
|
136
|
+
"quotedAt": obj.get("quotedAt"),
|
|
137
|
+
"finalizedAt": obj.get("finalizedAt"),
|
|
138
|
+
"lineEvidence": [TaxLineEvidence.from_dict(_item) for _item in obj["lineEvidence"]] if obj.get("lineEvidence") is not None else None,
|
|
139
|
+
"jurisdictionEvidence": [TaxJurisdictionEvidence.from_dict(_item) for _item in obj["jurisdictionEvidence"]] if obj.get("jurisdictionEvidence") is not None else None,
|
|
140
|
+
"failure": TaxFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None
|
|
141
|
+
})
|
|
142
|
+
return _obj
|
|
@@ -0,0 +1,88 @@
|
|
|
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, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
from pydantic_core import to_jsonable_python
|
|
25
|
+
|
|
26
|
+
class InvoiceVoidRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvoiceVoidRequest
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
voided_by_ref: Optional[StrictStr] = Field(default=None, alias="voidedByRef")
|
|
31
|
+
reason: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["voidedByRef", "reason"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of InvoiceVoidRequest from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of InvoiceVoidRequest from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"voidedByRef": obj.get("voidedByRef"),
|
|
86
|
+
"reason": obj.get("reason")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|