inttegro.shared
Shared request and response shapes used by multiple Inttegro resources.
Import these cross-resource building blocks from inttegro.shared. Resource-specific models, requests, and enums remain in their singular resource namespace.
1"""Shared request and response shapes used by multiple Inttegro resources. 2 3Import these cross-resource building blocks from ``inttegro.shared``. Resource-specific models, requests, and enums remain in their singular resource namespace.""" 4 5from importlib import import_module 6from typing import TYPE_CHECKING, Any 7 8if TYPE_CHECKING: 9 from .address_input import AddressInput as AddressInput 10 from .billing_details_input import BillingDetailsInput as BillingDetailsInput 11 from .content_safety_status import ContentSafetyStatus as ContentSafetyStatus 12 from .country_bank import CountryBank as CountryBank 13 from .country_bank_branch import CountryBankBranch as CountryBankBranch 14 from .country_bank_directory import CountryBankDirectory as CountryBankDirectory 15 from .country_specification import CountrySpecification as CountrySpecification 16 from .error import Error as Error 17 from .fee_details_input import FeeDetailsInput as FeeDetailsInput 18 from .fee_line_item_input import FeeLineItemInput as FeeLineItemInput 19 from .line_item_input import LineItemInput as LineItemInput 20 from .list_country_specs_request import ListCountrySpecsRequest as ListCountrySpecsRequest 21 from .list_country_specs_response import ListCountrySpecsResponse as ListCountrySpecsResponse 22 from .request_confirmation_request import RequestConfirmationRequest as RequestConfirmationRequest 23 from .resource_supply import ResourceSupply as ResourceSupply 24 from .shipping_details_input import ShippingDetailsInput as ShippingDetailsInput 25 from .shipping_input import ShippingInput as ShippingInput 26 from .shipping_line_item_input import ShippingLineItemInput as ShippingLineItemInput 27 from .upload_fulfillment import UploadFulfillment as UploadFulfillment 28 29 30_EXPORTS: dict[str, tuple[str, str]] = { 31 "AddressInput": ("inttegro.shared.address_input", "AddressInput"), 32 "BillingDetailsInput": ("inttegro.shared.billing_details_input", "BillingDetailsInput"), 33 "ContentSafetyStatus": ("inttegro.shared.content_safety_status", "ContentSafetyStatus"), 34 "CountryBank": ("inttegro.shared.country_bank", "CountryBank"), 35 "CountryBankBranch": ("inttegro.shared.country_bank_branch", "CountryBankBranch"), 36 "CountryBankDirectory": ("inttegro.shared.country_bank_directory", "CountryBankDirectory"), 37 "CountrySpecification": ("inttegro.shared.country_specification", "CountrySpecification"), 38 "Error": ("inttegro.shared.error", "Error"), 39 "FeeDetailsInput": ("inttegro.shared.fee_details_input", "FeeDetailsInput"), 40 "FeeLineItemInput": ("inttegro.shared.fee_line_item_input", "FeeLineItemInput"), 41 "LineItemInput": ("inttegro.shared.line_item_input", "LineItemInput"), 42 "ListCountrySpecsRequest": ("inttegro.shared.list_country_specs_request", "ListCountrySpecsRequest"), 43 "ListCountrySpecsResponse": ("inttegro.shared.list_country_specs_response", "ListCountrySpecsResponse"), 44 "RequestConfirmationRequest": ("inttegro.shared.request_confirmation_request", "RequestConfirmationRequest"), 45 "ResourceSupply": ("inttegro.shared.resource_supply", "ResourceSupply"), 46 "ShippingDetailsInput": ("inttegro.shared.shipping_details_input", "ShippingDetailsInput"), 47 "ShippingInput": ("inttegro.shared.shipping_input", "ShippingInput"), 48 "ShippingLineItemInput": ("inttegro.shared.shipping_line_item_input", "ShippingLineItemInput"), 49 "UploadFulfillment": ("inttegro.shared.upload_fulfillment", "UploadFulfillment"), 50} 51 52__all__ = [ 53 "AddressInput", 54 "BillingDetailsInput", 55 "ContentSafetyStatus", 56 "CountryBank", 57 "CountryBankBranch", 58 "CountryBankDirectory", 59 "CountrySpecification", 60 "Error", 61 "FeeDetailsInput", 62 "FeeLineItemInput", 63 "LineItemInput", 64 "ListCountrySpecsRequest", 65 "ListCountrySpecsResponse", 66 "RequestConfirmationRequest", 67 "ResourceSupply", 68 "ShippingDetailsInput", 69 "ShippingInput", 70 "ShippingLineItemInput", 71 "UploadFulfillment", 72] 73 74 75def __getattr__(name: str) -> Any: 76 """Load a public resource type on first access.""" 77 try: 78 module_name, attribute_name = _EXPORTS[name] 79 except KeyError: 80 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None 81 value = getattr(import_module(module_name), attribute_name) 82 globals()[name] = value 83 return value
12@dataclass(frozen=True, slots=True, kw_only=True) 13class AddressInput(ApiRequest): 14 """Parameters accepted by the address input operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 """ 20 line2: str | UnsetType = field(default=UNSET) 21 """Street address line 2 (optional). Optional. Python type: ``str``; wire name: ``line2``; JSON type: string""" 22 region: str | UnsetType = field(default=UNSET) 23 """State, province, or region. Optional. Python type: ``str``; wire name: ``region``; JSON type: string""" 24 district: str | UnsetType = field(default=UNSET) 25 """District or area. Optional. Python type: ``str``; wire name: ``district``; JSON type: string""" 26 post_code: str | UnsetType = field(default=UNSET) 27 """Postal/ZIP code. Optional. Python type: ``str``; wire name: ``post_code``; JSON type: string""" 28 name: str 29 """Recipient name. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 30 phone_number: str 31 """Contact phone number. Required. Python type: ``str``; wire name: ``phone_number``; JSON type: string""" 32 line1: str 33 """Street address line 1. Required. Python type: ``str``; wire name: ``line1``; JSON type: string""" 34 town: str 35 """City or town. Required. Python type: ``str``; wire name: ``town``; JSON type: string""" 36 country: str 37 """Country name. Required. Python type: ``str``; wire name: ``country``; JSON type: string"""
Parameters accepted by the address input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
Street address line 2 (optional). Optional. Python type: str; wire name: line2; JSON type: string
State, province, or region. Optional. Python type: str; wire name: region; JSON type: string
District or area. Optional. Python type: str; wire name: district; JSON type: string
Postal/ZIP code. Optional. Python type: str; wire name: post_code; JSON type: string
Contact phone number. Required. Python type: str; wire name: phone_number; JSON type: string
12@dataclass(frozen=True, slots=True, kw_only=True) 13class BillingDetailsInput(ApiRequest): 14 """Parameters accepted by the billing details input operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 """ 20 address: AddressInput | UnsetType = field(default=UNSET) 21 """The address associated with this billing details input. Optional. Python type: ``AddressInput``; wire name: ``address``; JSON type: object (Address)""" 22 name: str 23 """Billing contact name. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 24 email_address: str 25 """Billing email address. Required. Python type: ``str``; wire name: ``email_address``; JSON type: string (email)""" 26 phone_number: str 27 """Billing phone number. Required. Python type: ``str``; wire name: ``phone_number``; JSON type: string"""
Parameters accepted by the billing details input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
The address associated with this billing details input. Optional. Python type: AddressInput; wire name: address; JSON type: object (Address)
Billing email address. Required. Python type: str; wire name: email_address; JSON type: string (email)
Billing phone number. Required. Python type: str; wire name: phone_number; JSON type: string
11class ContentSafetyStatus(WireEnum): 12 """Safety decision for the email content. 13 14 Members are strings as well as enum values, so they compare naturally 15 with API payloads and serialize to the lowercase wire value shown below. 16 """ 17 ALLOWED = "allowed" 18 """Wire value ``allowed`` (allowed) for safety decision for the email content""" 19 REJECTED = "rejected" 20 """Wire value ``rejected`` (rejected) for safety decision for the email content""" 21 QUARANTINED = "quarantined" 22 """Wire value ``quarantined`` (quarantined) for safety decision for the email content"""
Safety decision for the email content.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
Wire value allowed (allowed) for safety decision for the email content
Wire value rejected (rejected) for safety decision for the email content
Wire value quarantined (quarantined) for safety decision for the email content
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CountryBank(ApiModel): 14 """A banking institution available in a country. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 id: str = field(init=False) 23 """Stable bank identifier. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 24 name: str = field(init=False) 25 """Bank display name. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 26 swift_code: str | None = field(init=False) 27 """SWIFT/BIC code for the bank, when available. Optional; nullable. Python type: ``str | None``; wire name: ``swift_code``; JSON type: string""" 28 sort_code_prefix: str | None = field(init=False) 29 """Ghana sort code prefix for the bank. Optional; nullable. Python type: ``str | None``; wire name: ``sort_code_prefix``; JSON type: string""" 30 branches: list[CountryBankBranch] = field(init=False) 31 """Branches available for this bank. Required. Python type: ``list[CountryBankBranch]``; wire name: ``branches``; JSON type: array of object (CountryBankBranch) values"""
A banking institution available in a country.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
SWIFT/BIC code for the bank, when available. Optional; nullable. Python type: str | None; wire name: swift_code; JSON type: string
Ghana sort code prefix for the bank. Optional; nullable. Python type: str | None; wire name: sort_code_prefix; JSON type: string
Branches available for this bank. Required. Python type: list[CountryBankBranch]; wire name: branches; JSON type: array of object (CountryBankBranch) values
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CountryBankBranch(ApiModel): 14 """A bank branch in a country bank directory. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 id: str = field(init=False) 23 """Stable branch identifier. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 24 name: str = field(init=False) 25 """Branch display name. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 26 sort_code: str = field(init=False) 27 """Ghana bank branch sort code. Required. Python type: ``str``; wire name: ``sort_code``; JSON type: string"""
A bank branch in a country bank directory.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
Ghana bank branch sort code. Required. Python type: str; wire name: sort_code; JSON type: string
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CountryBankDirectory(ApiModel): 14 """Bank reference data available for country-specific bank accounts. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 bank_account_type: str = field(init=False) 23 """Country-specific bank account subtype used by financial account APIs. Required. Python type: ``str``; wire name: ``bank_account_type``; JSON type: string""" 24 code_scheme: str = field(init=False) 25 """Identifier scheme used for bank branch codes. Required. Python type: ``str``; wire name: ``code_scheme``; JSON type: string""" 26 items: list[CountryBank] = field(init=False) 27 """Banking institutions available in this country. Required. Python type: ``list[CountryBank]``; wire name: ``items``; JSON type: array of object (CountryBank) values"""
Bank reference data available for country-specific bank accounts.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
Country-specific bank account subtype used by financial account APIs. Required. Python type: str; wire name: bank_account_type; JSON type: string
Identifier scheme used for bank branch codes. Required. Python type: str; wire name: code_scheme; JSON type: string
Banking institutions available in this country. Required. Python type: list[CountryBank]; wire name: items; JSON type: array of object (CountryBank) values
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CountrySpecification(ApiModel): 14 """Complete specification for a country including supported features and requirements. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 country_code: str = field(init=False) 23 """ISO 3166-1 alpha-2 country code. Required. Python type: ``str``; wire name: ``country_code``; JSON type: string""" 24 country_name: str = field(init=False) 25 """Full country name. Required. Python type: ``str``; wire name: ``country_name``; JSON type: string""" 26 currencies: list[str] = field(init=False) 27 """Supported currencies in this country. Required. Python type: ``list[str]``; wire name: ``currencies``; JSON type: array of string values""" 28 payment_methods: list[str] = field(init=False) 29 """Supported payment methods in this country. Required. Python type: ``list[str]``; wire name: ``payment_methods``; JSON type: array of string values""" 30 payout_schedules: list[str] = field(init=False) 31 """Available payout schedules for this country. Required. Python type: ``list[str]``; wire name: ``payout_schedules``; JSON type: array of string values""" 32 bt_aging_specs: list[str] = field(init=False) 33 """Balance transaction aging specifications available. Required. Python type: ``list[str]``; wire name: ``bt_aging_specs``; JSON type: array of string values""" 34 legal_entity_types: list[str] = field(init=False) 35 """Legal entity types that can operate in this country. Required. Python type: ``list[str]``; wire name: ``legal_entity_types``; JSON type: array of string values""" 36 financial_account_types: list[str] = field(init=False) 37 """Financial account types available in this country. Required. Python type: ``list[str]``; wire name: ``financial_account_types``; JSON type: array of string values""" 38 id_document_types: list[str] = field(init=False) 39 """Identification document types accepted in this country. Required. Python type: ``list[str]``; wire name: ``id_document_types``; JSON type: array of string values""" 40 banks: CountryBankDirectory | None = field(init=False) 41 """Bank reference data available for country-specific bank accounts. Optional; nullable. Python type: ``CountryBankDirectory | None``; wire name: ``banks``; JSON type: object (CountryBankDirectory)"""
Complete specification for a country including supported features and requirements.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
ISO 3166-1 alpha-2 country code. Required. Python type: str; wire name: country_code; JSON type: string
Full country name. Required. Python type: str; wire name: country_name; JSON type: string
Supported currencies in this country. Required. Python type: list[str]; wire name: currencies; JSON type: array of string values
Supported payment methods in this country. Required. Python type: list[str]; wire name: payment_methods; JSON type: array of string values
Available payout schedules for this country. Required. Python type: list[str]; wire name: payout_schedules; JSON type: array of string values
Balance transaction aging specifications available. Required. Python type: list[str]; wire name: bt_aging_specs; JSON type: array of string values
Legal entity types that can operate in this country. Required. Python type: list[str]; wire name: legal_entity_types; JSON type: array of string values
Financial account types available in this country. Required. Python type: list[str]; wire name: financial_account_types; JSON type: array of string values
Identification document types accepted in this country. Required. Python type: list[str]; wire name: id_document_types; JSON type: array of string values
Bank reference data available for country-specific bank accounts. Optional; nullable. Python type: CountryBankDirectory | None; wire name: banks; JSON type: object (CountryBankDirectory)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Error(ApiModel): 14 """Standard error response structure returned by all API endpoints. Provides machine-readable codes, human-readable messages, and actionable guidance for resolution. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 message: str | None = field(init=False) 23 """Concise, caller-safe explanation of why the request was rejected or could not finish. Optional; nullable. Python type: ``str | None``; wire name: ``message``; JSON type: string""" 24 fix_code: str | None = field(init=False) 25 """Machine-readable suggestion for how to resolve the error (e.g., "retry_with_exponential_backoff", "change_request_parameters"). Optional; nullable. Python type: ``str | None``; wire name: ``fix_code``; JSON type: string""" 26 detail: str | None = field(init=False) 27 """Explanation of the relevant rule and next safe action. It never contains raw dependency, storage, or implementation errors. Optional; nullable. Python type: ``str | None``; wire name: ``detail``; JSON type: string""" 28 cause: str | None = field(init=False) 29 """Stable category describing the reason for failure, such as invalid input, an unmet precondition, or a state conflict. Optional; nullable. Python type: ``str | None``; wire name: ``cause``; JSON type: string""" 30 type: str = field(init=False) 31 """Broad error category to help clients determine retry strategies (e.g., "invalid_request_parameter", "transient_error"). Required. Python type: ``str``; wire name: ``type``; JSON type: string""" 32 code: str = field(init=False) 33 """Unique machine-readable identifier for this specific error condition. Unlike type and cause which group errors, code pinpoints the exact problem. Required. Python type: ``str``; wire name: ``code``; JSON type: string""" 34 url: str = field(init=False) 35 """Link to error reference documentation with detailed explanation, common causes, and resolution guidance. Required. Python type: ``str``; wire name: ``url``; JSON type: string (uri)"""
Standard error response structure returned by all API endpoints. Provides machine-readable codes, human-readable messages, and actionable guidance for resolution.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
Concise, caller-safe explanation of why the request was rejected or could not finish. Optional; nullable. Python type: str | None; wire name: message; JSON type: string
Machine-readable suggestion for how to resolve the error (e.g., "retry_with_exponential_backoff", "change_request_parameters"). Optional; nullable. Python type: str | None; wire name: fix_code; JSON type: string
Explanation of the relevant rule and next safe action. It never contains raw dependency, storage, or implementation errors. Optional; nullable. Python type: str | None; wire name: detail; JSON type: string
Stable category describing the reason for failure, such as invalid input, an unmet precondition, or a state conflict. Optional; nullable. Python type: str | None; wire name: cause; JSON type: string
Broad error category to help clients determine retry strategies (e.g., "invalid_request_parameter", "transient_error"). Required. Python type: str; wire name: type; JSON type: string
Unique machine-readable identifier for this specific error condition. Unlike type and cause which group errors, code pinpoints the exact problem. Required. Python type: str; wire name: code; JSON type: string
Link to error reference documentation with detailed explanation, common causes, and resolution guidance. Required. Python type: str; wire name: url; JSON type: string (uri)
15@dataclass(frozen=True, slots=True, kw_only=True) 16class FeeDetailsInput(ApiRequest): 17 """Parameters accepted by the fee details input operation. 18 19 This is an immutable, keyword-only request object. ``to_dict()`` uses 20 the documented wire names, omits fields left as ``UNSET``, serializes 21 string-backed enums by value, and requires timezone-aware datetimes. 22 """ 23 id: str | UnsetType = field(default=UNSET) 24 """Fee identifier. Optional. Python type: ``str``; wire name: ``id``; JSON type: string""" 25 label: str | UnsetType = field(default=UNSET) 26 """Customer-facing label for this fee. Optional. Python type: ``str``; wire name: ``label``; JSON type: string""" 27 tax_code: str | UnsetType = field(default=UNSET) 28 """The tax classification code for the shipping fee. Optional. Python type: ``str``; wire name: ``tax_code``; JSON type: string""" 29 description: str | UnsetType = field(default=UNSET) 30 """Customer-facing description for this fee. Optional. Python type: ``str``; wire name: ``description``; JSON type: string""" 31 custom_data: CustomData | UnsetType = field(default=UNSET) 32 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: ``CustomData``; wire name: ``custom_data``; JSON type: object (CustomData)""" 33 amount: AmountParams 34 """Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: ``AmountParams``; wire name: ``amount``; JSON type: object (AmountParams)"""
Parameters accepted by the fee details input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
Fee identifier. Optional. Python type: str; wire name: id; JSON type: string
Customer-facing label for this fee. Optional. Python type: str; wire name: label; JSON type: string
The tax classification code for the shipping fee. Optional. Python type: str; wire name: tax_code; JSON type: string
Customer-facing description for this fee. Optional. Python type: str; wire name: description; JSON type: string
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: CustomData; wire name: custom_data; JSON type: object (CustomData)
Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: AmountParams; wire name: amount; JSON type: object (AmountParams)
13@dataclass(frozen=True, slots=True, kw_only=True) 14class FeeLineItemInput(ApiRequest): 15 """Parameters accepted by the fee line item input operation. 16 17 This is an immutable, keyword-only request object. ``to_dict()`` uses 18 the documented wire names, omits fields left as ``UNSET``, serializes 19 string-backed enums by value, and requires timezone-aware datetimes. 20 """ 21 type: Literal['fee', LineItemType.FEE] 22 """Line item type discriminator. Required. Python type: ``Literal['fee', LineItemType.FEE]``; wire name: ``type``; JSON type: string. Constraints: allowed values ``fee``""" 23 fee: FeeDetailsInput 24 """The fee associated with this fee line item input. Required. Python type: ``FeeDetailsInput``; wire name: ``fee``; JSON type: object (FeeDetails)"""
Parameters accepted by the fee line item input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
The fee associated with this fee line item input. Required. Python type: FeeDetailsInput; wire name: fee; JSON type: object (FeeDetails)
12@dataclass(frozen=True, slots=True, kw_only=True) 13class ListCountrySpecsRequest(ApiRequest): 14 """Parameters accepted by the list country specs request operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 """ 20 pass
Parameters accepted by the list country specs request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class ListCountrySpecsResponse(ApiModel): 14 """Typed response returned by the list country specs operation. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 countries: dict[str, CountrySpecification] = field(init=False) 23 """The countries associated with this list country specs response. Required. Python type: ``dict[str, CountrySpecification]``; wire name: ``countries``; JSON type: object"""
Typed response returned by the list country specs operation.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
The countries associated with this list country specs response. Required. Python type: dict[str, CountrySpecification]; wire name: countries; JSON type: object
12@dataclass(frozen=True, slots=True, kw_only=True) 13class RequestConfirmationRequest(ApiRequest): 14 """Parameters accepted by the request confirmation request operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 """ 20 order_id: str 21 """Order whose hosted invoice or receipt link should be delivered. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string"""
Parameters accepted by the request confirmation request operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
Order whose hosted invoice or receipt link should be delivered. Required. Python type: str; wire name: order_id; JSON type: string
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class ResourceSupply(ApiModel): 15 """Typed resource supply data in the shared resource namespace. 16 17 Instances are immutable API responses. ``from_dict()`` decodes nested 18 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 19 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 20 Fields not returned by the API remain absent and can still be queried 21 through mapping-style access. 22 """ 23 attempt_id: str | None = field(init=False) 24 """Identifier of the related attempt. Optional; nullable. Python type: ``str | None``; wire name: ``attempt_id``; JSON type: string""" 25 by: str = field(init=False) 26 """The by associated with this resource supply. Required. Python type: ``str``; wire name: ``by``; JSON type: string""" 27 channel: str | None = field(init=False) 28 """The channel associated with this resource supply. Optional; nullable. Python type: ``str | None``; wire name: ``channel``; JSON type: string""" 29 resource_id: str | None = field(init=False) 30 """Identifier of the related resource. Optional; nullable. Python type: ``str | None``; wire name: ``resource_id``; JSON type: string""" 31 resource_type: str | None = field(init=False) 32 """The resource type associated with this resource supply. Optional; nullable. Python type: ``str | None``; wire name: ``resource_type``; JSON type: string""" 33 supplied_at: datetime = field(init=False) 34 """Timestamp for supplied at. Required. Python type: ``datetime``; wire name: ``supplied_at``; JSON type: string (date-time)"""
Typed resource supply data in the shared resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
Identifier of the related attempt. Optional; nullable. Python type: str | None; wire name: attempt_id; JSON type: string
The by associated with this resource supply. Required. Python type: str; wire name: by; JSON type: string
The channel associated with this resource supply. Optional; nullable. Python type: str | None; wire name: channel; JSON type: string
Identifier of the related resource. Optional; nullable. Python type: str | None; wire name: resource_id; JSON type: string
The resource type associated with this resource supply. Optional; nullable. Python type: str | None; wire name: resource_type; JSON type: string
Timestamp for supplied at. Required. Python type: datetime; wire name: supplied_at; JSON type: string (date-time)
15@dataclass(frozen=True, slots=True, kw_only=True) 16class ShippingDetailsInput(ApiRequest): 17 """Parameters accepted by the shipping details input operation. 18 19 This is an immutable, keyword-only request object. ``to_dict()`` uses 20 the documented wire names, omits fields left as ``UNSET``, serializes 21 string-backed enums by value, and requires timezone-aware datetimes. 22 """ 23 id: str | UnsetType = field(default=UNSET) 24 """Unique ID for this shipping charge. Optional. Python type: ``str``; wire name: ``id``; JSON type: string""" 25 tax_code: str | UnsetType = field(default=UNSET) 26 """The tax classification code for the shipping fee. Optional. Python type: ``str``; wire name: ``tax_code``; JSON type: string""" 27 custom_data: CustomData | UnsetType = field(default=UNSET) 28 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: ``CustomData``; wire name: ``custom_data``; JSON type: object (CustomData)""" 29 fee: AmountParams 30 """Monetary fee, represented by a currency and an integer minor-unit value. Required. Python type: ``AmountParams``; wire name: ``fee``; JSON type: object (AmountParams)"""
Parameters accepted by the shipping details input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
Unique ID for this shipping charge. Optional. Python type: str; wire name: id; JSON type: string
The tax classification code for the shipping fee. Optional. Python type: str; wire name: tax_code; JSON type: string
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional. Python type: CustomData; wire name: custom_data; JSON type: object (CustomData)
Monetary fee, represented by a currency and an integer minor-unit value. Required. Python type: AmountParams; wire name: fee; JSON type: object (AmountParams)
12@dataclass(frozen=True, slots=True, kw_only=True) 13class ShippingInput(ApiRequest): 14 """Parameters accepted by the shipping input operation. 15 16 This is an immutable, keyword-only request object. ``to_dict()`` uses 17 the documented wire names, omits fields left as ``UNSET``, serializes 18 string-backed enums by value, and requires timezone-aware datetimes. 19 """ 20 address: AddressInput 21 """The address associated with this shipping input. Required. Python type: ``AddressInput``; wire name: ``address``; JSON type: object (Address)"""
Parameters accepted by the shipping input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
The address associated with this shipping input. Required. Python type: AddressInput; wire name: address; JSON type: object (Address)
13@dataclass(frozen=True, slots=True, kw_only=True) 14class ShippingLineItemInput(ApiRequest): 15 """Parameters accepted by the shipping line item input operation. 16 17 This is an immutable, keyword-only request object. ``to_dict()`` uses 18 the documented wire names, omits fields left as ``UNSET``, serializes 19 string-backed enums by value, and requires timezone-aware datetimes. 20 """ 21 type: Literal['shipping', LineItemType.SHIPPING] 22 """Line item type discriminator. Required. Python type: ``Literal['shipping', LineItemType.SHIPPING]``; wire name: ``type``; JSON type: string. Constraints: allowed values ``shipping``""" 23 shipping: ShippingDetailsInput 24 """The shipping associated with this shipping line item input. Required. Python type: ``ShippingDetailsInput``; wire name: ``shipping``; JSON type: object (ShippingDetails)"""
Parameters accepted by the shipping line item input operation.
This is an immutable, keyword-only request object. to_dict() uses
the documented wire names, omits fields left as UNSET, serializes
string-backed enums by value, and requires timezone-aware datetimes.
The shipping associated with this shipping line item input. Required. Python type: ShippingDetailsInput; wire name: shipping; JSON type: object (ShippingDetails)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class UploadFulfillment(ApiModel): 14 """Typed upload fulfillment data in the shared resource namespace. 15 16 Instances are immutable API responses. ``from_dict()`` decodes nested 17 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 18 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 19 Fields not returned by the API remain absent and can still be queried 20 through mapping-style access. 21 """ 22 upload_request: UploadRequest = field(init=False) 23 """The upload request associated with this upload fulfillment. Required. Python type: ``UploadRequest``; wire name: ``upload_request``; JSON type: object (UploadRequestWithAttemptObject)""" 24 file: FileUploadReceipt = field(init=False) 25 """The file associated with this upload fulfillment. Required. Python type: ``FileUploadReceipt``; wire name: ``file``; JSON type: object (FileUploadReceipt)"""
Typed upload fulfillment data in the shared resource namespace.
Instances are immutable API responses. from_dict() decodes nested
objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
to_dict() returns the corresponding JSON-compatible wire shape.
Fields not returned by the API remain absent and can still be queried
through mapping-style access.
The upload request associated with this upload fulfillment. Required. Python type: UploadRequest; wire name: upload_request; JSON type: object (UploadRequestWithAttemptObject)
The file associated with this upload fulfillment. Required. Python type: FileUploadReceipt; wire name: file; JSON type: object (FileUploadReceipt)