inttegro.order
Models, requests, and enums for the Inttegro order resource.
The primary returned object is inttegro.order.Order. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK.
1"""Models, requests, and enums for the Inttegro order resource. 2 3The primary returned object is ``inttegro.order.Order``. Related request types, nested response shapes, and string-backed enums are exported from this singular namespace. Public members load lazily, so importing one resource does not eagerly import the entire SDK.""" 4 5from importlib import import_module 6from typing import TYPE_CHECKING, Any 7 8if TYPE_CHECKING: 9 from .document_delivery_summary import DocumentDeliveryChannelSummary as DocumentDeliveryChannelSummary 10 from .document_delivery_summary import DocumentDeliverySummary as DocumentDeliverySummary 11 from .document_delivery_summary import DocumentDeliverySummaryChannels as DocumentDeliverySummaryChannels 12 from .address import Address as Address 13 from .cancel_request import CancelRequest as CancelRequest 14 from .checkout_settings import CheckoutSettings as CheckoutSettings 15 from .complete_envelope import CompleteEnvelope as CompleteEnvelope 16 from .complete_request import CompleteRequest as CompleteRequest 17 from .create_existing_customer_input import CreateExistingCustomerInput as CreateExistingCustomerInput 18 from .create_existing_customer_input_checkout_settings import CreateExistingCustomerInputCheckoutSettings as CreateExistingCustomerInputCheckoutSettings 19 from .create_existing_customer_input_request_meta import CreateExistingCustomerInputRequestMeta as CreateExistingCustomerInputRequestMeta 20 from .create_new_customer_input import CreateNewCustomerInput as CreateNewCustomerInput 21 from .create_new_customer_input_checkout_settings import CreateNewCustomerInputCheckoutSettings as CreateNewCustomerInputCheckoutSettings 22 from .create_new_customer_input_request_meta import CreateNewCustomerInputRequestMeta as CreateNewCustomerInputRequestMeta 23 from .create_request import CreateRequest as CreateRequest 24 from .created_from import CreatedFrom as CreatedFrom 25 from .created_from_resource_type import CreatedFromResourceType as CreatedFromResourceType 26 from .customer import Customer as Customer 27 from .delivery_channel import DeliveryChannel as DeliveryChannel 28 from .discount_line_item import DiscountLineItem as DiscountLineItem 29 from .discount_line_item_discount import DiscountLineItemDiscount as DiscountLineItemDiscount 30 from .document_delivery import DocumentDelivery as DocumentDelivery 31 from .document_delivery_attempt import DocumentDeliveryAttempt as DocumentDeliveryAttempt 32 from .document_delivery_failure import DocumentDeliveryFailure as DocumentDeliveryFailure 33 from .document_delivery_request import DocumentDeliveryRequest as DocumentDeliveryRequest 34 from .document_delivery_result import DocumentDeliveryResult as DocumentDeliveryResult 35 from .document_format import DocumentFormat as DocumentFormat 36 from .document_kind import DocumentKind as DocumentKind 37 from .envelope import Envelope as Envelope 38 from .fee_line_item import FeeLineItem as FeeLineItem 39 from .fee_line_item_fee import FeeLineItemFee as FeeLineItemFee 40 from .finalize_envelope import FinalizeEnvelope as FinalizeEnvelope 41 from .finalize_request import FinalizeRequest as FinalizeRequest 42 from .invoice import Invoice as Invoice 43 from .invoice_format import InvoiceFormat as InvoiceFormat 44 from .invoice_settings import InvoiceSettings as InvoiceSettings 45 from .invoice_settings_input import InvoiceSettingsInput as InvoiceSettingsInput 46 from .line_item import LineItem as LineItem 47 from .line_item_group import LineItemGroup as LineItemGroup 48 from .line_item_type import LineItemType as LineItemType 49 from .lookup_request import LookupRequest as LookupRequest 50 from .order import Order as Order 51 from .page import Page as Page 52 from .page_envelope import PageEnvelope as PageEnvelope 53 from .page_request import PageRequest as PageRequest 54 from .pay_request import PayRequest as PayRequest 55 from .payout_settings_request import PayoutSettingsRequest as PayoutSettingsRequest 56 from .payout_settings_request_destination import PayoutSettingsRequestDestination as PayoutSettingsRequestDestination 57 from .product_line_item import ProductLineItem as ProductLineItem 58 from .product_line_item_product import ProductLineItemProduct as ProductLineItemProduct 59 from .receipt import Receipt as Receipt 60 from .receipt_format import ReceiptFormat as ReceiptFormat 61 from .shipping_line_item import ShippingLineItem as ShippingLineItem 62 from .shipping_line_item_shipping import ShippingLineItemShipping as ShippingLineItemShipping 63 from .status import Status as Status 64 from .update_request import UpdateRequest as UpdateRequest 65 from .update_request_payment_method_data import UpdateRequestPaymentMethodData as UpdateRequestPaymentMethodData 66 from .update_request_payment_method_data_mobile_money import UpdateRequestPaymentMethodDataMobileMoney as UpdateRequestPaymentMethodDataMobileMoney 67 68 69_EXPORTS: dict[str, tuple[str, str]] = { 70 "DocumentDeliveryChannelSummary": ("inttegro.order.document_delivery_summary", "DocumentDeliveryChannelSummary"), 71 "DocumentDeliverySummary": ("inttegro.order.document_delivery_summary", "DocumentDeliverySummary"), 72 "DocumentDeliverySummaryChannels": ("inttegro.order.document_delivery_summary", "DocumentDeliverySummaryChannels"), 73 "Address": ("inttegro.order.address", "Address"), 74 "CancelRequest": ("inttegro.order.cancel_request", "CancelRequest"), 75 "CheckoutSettings": ("inttegro.order.checkout_settings", "CheckoutSettings"), 76 "CompleteEnvelope": ("inttegro.order.complete_envelope", "CompleteEnvelope"), 77 "CompleteRequest": ("inttegro.order.complete_request", "CompleteRequest"), 78 "CreateExistingCustomerInput": ("inttegro.order.create_existing_customer_input", "CreateExistingCustomerInput"), 79 "CreateExistingCustomerInputCheckoutSettings": ("inttegro.order.create_existing_customer_input_checkout_settings", "CreateExistingCustomerInputCheckoutSettings"), 80 "CreateExistingCustomerInputRequestMeta": ("inttegro.order.create_existing_customer_input_request_meta", "CreateExistingCustomerInputRequestMeta"), 81 "CreateNewCustomerInput": ("inttegro.order.create_new_customer_input", "CreateNewCustomerInput"), 82 "CreateNewCustomerInputCheckoutSettings": ("inttegro.order.create_new_customer_input_checkout_settings", "CreateNewCustomerInputCheckoutSettings"), 83 "CreateNewCustomerInputRequestMeta": ("inttegro.order.create_new_customer_input_request_meta", "CreateNewCustomerInputRequestMeta"), 84 "CreateRequest": ("inttegro.order.create_request", "CreateRequest"), 85 "CreatedFrom": ("inttegro.order.created_from", "CreatedFrom"), 86 "CreatedFromResourceType": ("inttegro.order.created_from_resource_type", "CreatedFromResourceType"), 87 "Customer": ("inttegro.order.customer", "Customer"), 88 "DeliveryChannel": ("inttegro.order.delivery_channel", "DeliveryChannel"), 89 "DiscountLineItem": ("inttegro.order.discount_line_item", "DiscountLineItem"), 90 "DiscountLineItemDiscount": ("inttegro.order.discount_line_item_discount", "DiscountLineItemDiscount"), 91 "DocumentDelivery": ("inttegro.order.document_delivery", "DocumentDelivery"), 92 "DocumentDeliveryAttempt": ("inttegro.order.document_delivery_attempt", "DocumentDeliveryAttempt"), 93 "DocumentDeliveryFailure": ("inttegro.order.document_delivery_failure", "DocumentDeliveryFailure"), 94 "DocumentDeliveryRequest": ("inttegro.order.document_delivery_request", "DocumentDeliveryRequest"), 95 "DocumentDeliveryResult": ("inttegro.order.document_delivery_result", "DocumentDeliveryResult"), 96 "DocumentFormat": ("inttegro.order.document_format", "DocumentFormat"), 97 "DocumentKind": ("inttegro.order.document_kind", "DocumentKind"), 98 "Envelope": ("inttegro.order.envelope", "Envelope"), 99 "FeeLineItem": ("inttegro.order.fee_line_item", "FeeLineItem"), 100 "FeeLineItemFee": ("inttegro.order.fee_line_item_fee", "FeeLineItemFee"), 101 "FinalizeEnvelope": ("inttegro.order.finalize_envelope", "FinalizeEnvelope"), 102 "FinalizeRequest": ("inttegro.order.finalize_request", "FinalizeRequest"), 103 "Invoice": ("inttegro.order.invoice", "Invoice"), 104 "InvoiceFormat": ("inttegro.order.invoice_format", "InvoiceFormat"), 105 "InvoiceSettings": ("inttegro.order.invoice_settings", "InvoiceSettings"), 106 "InvoiceSettingsInput": ("inttegro.order.invoice_settings_input", "InvoiceSettingsInput"), 107 "LineItem": ("inttegro.order.line_item", "LineItem"), 108 "LineItemGroup": ("inttegro.order.line_item_group", "LineItemGroup"), 109 "LineItemType": ("inttegro.order.line_item_type", "LineItemType"), 110 "LookupRequest": ("inttegro.order.lookup_request", "LookupRequest"), 111 "Order": ("inttegro.order.order", "Order"), 112 "Page": ("inttegro.order.page", "Page"), 113 "PageEnvelope": ("inttegro.order.page_envelope", "PageEnvelope"), 114 "PageRequest": ("inttegro.order.page_request", "PageRequest"), 115 "PayRequest": ("inttegro.order.pay_request", "PayRequest"), 116 "PayoutSettingsRequest": ("inttegro.order.payout_settings_request", "PayoutSettingsRequest"), 117 "PayoutSettingsRequestDestination": ("inttegro.order.payout_settings_request_destination", "PayoutSettingsRequestDestination"), 118 "ProductLineItem": ("inttegro.order.product_line_item", "ProductLineItem"), 119 "ProductLineItemProduct": ("inttegro.order.product_line_item_product", "ProductLineItemProduct"), 120 "Receipt": ("inttegro.order.receipt", "Receipt"), 121 "ReceiptFormat": ("inttegro.order.receipt_format", "ReceiptFormat"), 122 "ShippingLineItem": ("inttegro.order.shipping_line_item", "ShippingLineItem"), 123 "ShippingLineItemShipping": ("inttegro.order.shipping_line_item_shipping", "ShippingLineItemShipping"), 124 "Status": ("inttegro.order.status", "Status"), 125 "UpdateRequest": ("inttegro.order.update_request", "UpdateRequest"), 126 "UpdateRequestPaymentMethodData": ("inttegro.order.update_request_payment_method_data", "UpdateRequestPaymentMethodData"), 127 "UpdateRequestPaymentMethodDataMobileMoney": ("inttegro.order.update_request_payment_method_data_mobile_money", "UpdateRequestPaymentMethodDataMobileMoney"), 128} 129 130__all__ = [ 131 "DocumentDeliveryChannelSummary", 132 "DocumentDeliverySummary", 133 "DocumentDeliverySummaryChannels", 134 "Address", 135 "CancelRequest", 136 "CheckoutSettings", 137 "CompleteEnvelope", 138 "CompleteRequest", 139 "CreateExistingCustomerInput", 140 "CreateExistingCustomerInputCheckoutSettings", 141 "CreateExistingCustomerInputRequestMeta", 142 "CreateNewCustomerInput", 143 "CreateNewCustomerInputCheckoutSettings", 144 "CreateNewCustomerInputRequestMeta", 145 "CreateRequest", 146 "CreatedFrom", 147 "CreatedFromResourceType", 148 "Customer", 149 "DeliveryChannel", 150 "DiscountLineItem", 151 "DiscountLineItemDiscount", 152 "DocumentDelivery", 153 "DocumentDeliveryAttempt", 154 "DocumentDeliveryFailure", 155 "DocumentDeliveryRequest", 156 "DocumentDeliveryResult", 157 "DocumentFormat", 158 "DocumentKind", 159 "Envelope", 160 "FeeLineItem", 161 "FeeLineItemFee", 162 "FinalizeEnvelope", 163 "FinalizeRequest", 164 "Invoice", 165 "InvoiceFormat", 166 "InvoiceSettings", 167 "InvoiceSettingsInput", 168 "LineItem", 169 "LineItemGroup", 170 "LineItemType", 171 "LookupRequest", 172 "Order", 173 "Page", 174 "PageEnvelope", 175 "PageRequest", 176 "PayRequest", 177 "PayoutSettingsRequest", 178 "PayoutSettingsRequestDestination", 179 "ProductLineItem", 180 "ProductLineItemProduct", 181 "Receipt", 182 "ReceiptFormat", 183 "ShippingLineItem", 184 "ShippingLineItemShipping", 185 "Status", 186 "UpdateRequest", 187 "UpdateRequestPaymentMethodData", 188 "UpdateRequestPaymentMethodDataMobileMoney", 189] 190 191 192def __getattr__(name: str) -> Any: 193 """Load a public resource type on first access.""" 194 try: 195 module_name, attribute_name = _EXPORTS[name] 196 except KeyError: 197 raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None 198 value = getattr(import_module(module_name), attribute_name) 199 globals()[name] = value 200 return value
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class DocumentDeliveryChannelSummary(ApiModel): 14 """Accepted deliveries aggregated for one channel.""" 15 16 count: int = field(init=False) 17 latest_sent_at: datetime = field(init=False)
Accepted deliveries aggregated for one channel.
28@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 29class DocumentDeliverySummary(ApiModel): 30 """Accepted invoice or receipt deliveries aggregated across channels.""" 31 32 channels: DocumentDeliverySummaryChannels = field(init=False) 33 latest_sent_at: datetime = field(init=False) 34 total_count: int = field(init=False)
Accepted invoice or receipt deliveries aggregated across channels.
20@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 21class DocumentDeliverySummaryChannels(ApiModel): 22 """Accepted delivery totals grouped by channel.""" 23 24 email: DocumentDeliveryChannelSummary | None = field(init=False) 25 sms: DocumentDeliveryChannelSummary | None = field(init=False)
Accepted delivery totals grouped by channel.
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Address(ApiModel): 14 """Typed address data in the order 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 API contract schema: ``OrderAddress``. 23 """ 24 name: str | None = field(init=False) 25 """Human-readable name of the address. Optional; nullable. Python type: ``str | None``; wire name: ``name``; JSON type: string""" 26 phone_number: str | None = field(init=False) 27 """Customer or recipient phone number in international form. Optional; nullable. Python type: ``str | None``; wire name: ``phone_number``; JSON type: string""" 28 line1: str | None = field(init=False) 29 """The line1 associated with this address. Optional; nullable. Python type: ``str | None``; wire name: ``line1``; JSON type: string""" 30 line2: str | None = field(init=False) 31 """The line2 associated with this address. Optional; nullable. Python type: ``str | None``; wire name: ``line2``; JSON type: string""" 32 city: str | None = field(init=False) 33 """The city associated with this address. Optional; nullable. Python type: ``str | None``; wire name: ``city``; JSON type: string""" 34 region: str | None = field(init=False) 35 """The region associated with this address. Optional; nullable. Python type: ``str | None``; wire name: ``region``; JSON type: string""" 36 post_code: str | None = field(init=False) 37 """The post code associated with this address. Optional; nullable. Python type: ``str | None``; wire name: ``post_code``; JSON type: string""" 38 country: str = field(init=False) 39 """The country associated with this address. Required. Python type: ``str``; wire name: ``country``; JSON type: string"""
Typed address data in the order 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.
API contract schema: OrderAddress.
Human-readable name of the address. Optional; nullable. Python type: str | None; wire name: name; JSON type: string
Customer or recipient phone number in international form. Optional; nullable. Python type: str | None; wire name: phone_number; JSON type: string
The line1 associated with this address. Optional; nullable. Python type: str | None; wire name: line1; JSON type: string
The line2 associated with this address. Optional; nullable. Python type: str | None; wire name: line2; JSON type: string
The city associated with this address. Optional; nullable. Python type: str | None; wire name: city; JSON type: string
The region associated with this address. Optional; nullable. Python type: str | None; wire name: region; JSON type: string
The post code associated with this address. Optional; nullable. Python type: str | None; wire name: post_code; JSON type: string
The country associated with this address. Required. Python type: str; wire name: country; JSON type: string
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CancelRequest(ApiRequest): 14 """Parameters accepted by the cancel 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 API contract schema: ``CancelOrderRequest``. 21 """ 22 reason: str | UnsetType = field(default=UNSET) 23 """The reason associated with this cancel request. Optional. Python type: ``str``; wire name: ``reason``; JSON type: string""" 24 execute_refund: bool | UnsetType = field(default=UNSET) 25 """Whether execute refund. Optional. Python type: ``bool``; wire name: ``execute_refund``; JSON type: boolean""" 26 order_id: str 27 """The finalized Order to inspect or pay. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
Parameters accepted by the cancel 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.
API contract schema: CancelOrderRequest.
The reason associated with this cancel request. Optional. Python type: str; wire name: reason; JSON type: string
Whether execute refund. Optional. Python type: bool; wire name: execute_refund; JSON type: boolean
The finalized Order to inspect or pay. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CheckoutSettings(ApiModel): 14 """Checkout and payment flow configuration for this order. 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 API contract schema: ``OrderCheckoutSettings``. 23 """ 24 redirect_url: str | None = field(init=False) 25 """URL to redirect the customer after payment completion. Optional; nullable. Python type: ``str | None``; wire name: ``redirect_url``; JSON type: string (uri)""" 26 cancel_url: str | None = field(init=False) 27 """URL to redirect the customer after canceling checkout. Optional; nullable. Python type: ``str | None``; wire name: ``cancel_url``; JSON type: string (uri)"""
Checkout and payment flow configuration for this order.
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.
API contract schema: OrderCheckoutSettings.
URL to redirect the customer after payment completion. Optional; nullable. Python type: str | None; wire name: redirect_url; JSON type: string (uri)
URL to redirect the customer after canceling checkout. Optional; nullable. Python type: str | None; wire name: cancel_url; JSON type: string (uri)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class CompleteEnvelope(ApiModel): 14 """Typed complete envelope data in the order 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 API contract schema: ``CompleteOrderEnvelope``. 23 """ 24 order: Order | None = field(init=False) 25 """Complete order record with line items, customer details, payment state, and fulfillment information. Required; nullable. Python type: ``Order | None``; wire name: ``order``; JSON type: object (Order)"""
Typed complete envelope data in the order 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.
API contract schema: CompleteOrderEnvelope.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CompleteRequest(ApiRequest): 14 """Parameters accepted by the complete 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 API contract schema: ``CompleteOrderRequest``. 21 """ 22 paid_out_of_band: bool | UnsetType = field(default=UNSET) 23 """Whether paid out of band. Optional. Python type: ``bool``; wire name: ``paid_out_of_band``; JSON type: boolean""" 24 order_id: str 25 """The finalized Order to inspect or pay. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
Parameters accepted by the complete 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.
API contract schema: CompleteOrderRequest.
Whether paid out of band. Optional. Python type: bool; wire name: paid_out_of_band; JSON type: boolean
The finalized Order to inspect or pay. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CreateExistingCustomerInput(ApiRequest): 14 """Parameters accepted by the create existing customer 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 API contract schema: ``CreateOrderExistingCustomerInput``. 21 """ 22 payment_method_id: str | UnsetType = field(default=UNSET) 23 """ID of saved payment method to use. Optional. Python type: ``str``; wire name: ``payment_method_id``; JSON type: string""" 24 payment_method_data: PaymentMethodDataInput | UnsetType = field(default=UNSET) 25 """New payment instrument details to use instead of a saved payment method. Optional. Python type: ``PaymentMethodDataInput``; wire name: ``payment_method_data``; JSON type: object (PaymentMethodData)""" 26 receipt_number: str | UnsetType = field(default=UNSET) 27 """Optional receipt number for downstream reconciliation. Uses the same length rules as `number`. Optional. Python type: ``str``; wire name: ``receipt_number``; JSON type: string""" 28 statement_descriptor: str | UnsetType = field(default=UNSET) 29 """Optional statement descriptor shown on the customer's bank statement. Optional. Python type: ``str``; wire name: ``statement_descriptor``; JSON type: string. Constraints: maximum length 22""" 30 statement_descriptor_prefix: str | UnsetType = field(default=UNSET) 31 """Optional static prefix used to build the statement descriptor as `prefix*order_id`. Mutually exclusive with `statement_descriptor`. Optional. Python type: ``str``; wire name: ``statement_descriptor_prefix``; JSON type: string. Constraints: minimum length 2; maximum length 10""" 32 execute_payment: bool | UnsetType = field(default=UNSET) 33 """Whether to execute payment immediately. Optional. Python type: ``bool``; wire name: ``execute_payment``; JSON type: boolean""" 34 finalize: bool | UnsetType = field(default=UNSET) 35 """Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: ``bool``; wire name: ``finalize``; JSON type: boolean""" 36 request_meta: CreateOrderExistingCustomerInputRequestMeta | UnsetType = field(default=UNSET) 37 """Optional metadata controlling request processing. Optional. Python type: ``CreateOrderExistingCustomerInputRequestMeta``; wire name: ``request_meta``; JSON type: object""" 38 checkout_settings: CreateOrderExistingCustomerInputCheckoutSettings | UnsetType = field(default=UNSET) 39 """Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. Optional. Python type: ``CreateOrderExistingCustomerInputCheckoutSettings``; wire name: ``checkout_settings``; JSON type: object""" 40 invoice_settings: InvoiceSettingsInput | UnsetType = field(default=UNSET) 41 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: ``InvoiceSettingsInput``; wire name: ``invoice_settings``; JSON type: object (InvoiceSettings)""" 42 payout_settings: OrderPayoutSettingsRequest | UnsetType = field(default=UNSET) 43 """The payout settings associated with this create existing customer input. Optional. Python type: ``OrderPayoutSettingsRequest``; wire name: ``payout_settings``; JSON type: object (OrderPayoutSettingsRequest)""" 44 custom_data: CustomData | UnsetType = field(default=UNSET) 45 """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)""" 46 billing_details: BillingDetailsInput | UnsetType = field(default=UNSET) 47 """The billing details associated with this create existing customer input. Optional. Python type: ``BillingDetailsInput``; wire name: ``billing_details``; JSON type: object (BillingDetails)""" 48 shipping: ShippingInput | UnsetType = field(default=UNSET) 49 """The shipping associated with this create existing customer input. Optional. Python type: ``ShippingInput``; wire name: ``shipping``; JSON type: object (Shipping)""" 50 customer_id: str 51 """ID of existing customer. Required. Python type: ``str``; wire name: ``customer_id``; JSON type: string""" 52 line_items: list[LineItemInput] 53 """The line items associated with this create existing customer input. Required. Python type: ``list[LineItemInput]``; wire name: ``line_items``; JSON type: array of object (LineItem) values. Constraints: minimum items 1"""
Parameters accepted by the create existing customer 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.
API contract schema: CreateOrderExistingCustomerInput.
ID of saved payment method to use. Optional. Python type: str; wire name: payment_method_id; JSON type: string
New payment instrument details to use instead of a saved payment method. Optional. Python type: PaymentMethodDataInput; wire name: payment_method_data; JSON type: object (PaymentMethodData)
Optional receipt number for downstream reconciliation. Uses the same length rules as number. Optional. Python type: str; wire name: receipt_number; JSON type: string
Optional statement descriptor shown on the customer's bank statement. Optional. Python type: str; wire name: statement_descriptor; JSON type: string. Constraints: maximum length 22
Optional static prefix used to build the statement descriptor as prefix*order_id. Mutually exclusive with statement_descriptor. Optional. Python type: str; wire name: statement_descriptor_prefix; JSON type: string. Constraints: minimum length 2; maximum length 10
Whether to execute payment immediately. Optional. Python type: bool; wire name: execute_payment; JSON type: boolean
Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: bool; wire name: finalize; JSON type: boolean
Optional metadata controlling request processing. Optional. Python type: CreateOrderExistingCustomerInputRequestMeta; wire name: request_meta; JSON type: object
Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. Optional. Python type: CreateOrderExistingCustomerInputCheckoutSettings; wire name: checkout_settings; JSON type: object
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: InvoiceSettingsInput; wire name: invoice_settings; JSON type: object (InvoiceSettings)
The payout settings associated with this create existing customer input. Optional. Python type: OrderPayoutSettingsRequest; wire name: payout_settings; JSON type: object (OrderPayoutSettingsRequest)
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)
The billing details associated with this create existing customer input. Optional. Python type: BillingDetailsInput; wire name: billing_details; JSON type: object (BillingDetails)
The shipping associated with this create existing customer input. Optional. Python type: ShippingInput; wire name: shipping; JSON type: object (Shipping)
ID of existing customer. Required. Python type: str; wire name: customer_id; JSON type: string
The line items associated with this create existing customer input. Required. Python type: list[LineItemInput]; wire name: line_items; JSON type: array of object (LineItem) values. Constraints: minimum items 1
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CreateExistingCustomerInputCheckoutSettings(ApiRequest): 14 """Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. 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 API contract schema: ``CreateOrderExistingCustomerInputCheckoutSettings``. 21 """ 22 redirect_url: str | UnsetType = field(default=UNSET) 23 """URL to redirect customer after payment completion. Optional. Python type: ``str``; wire name: ``redirect_url``; JSON type: string (uri)""" 24 cancel_url: str | UnsetType = field(default=UNSET) 25 """URL to redirect customer if they cancel payment. Optional. Python type: ``str``; wire name: ``cancel_url``; JSON type: string (uri)"""
Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience.
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.
API contract schema: CreateOrderExistingCustomerInputCheckoutSettings.
URL to redirect customer after payment completion. Optional. Python type: str; wire name: redirect_url; JSON type: string (uri)
URL to redirect customer if they cancel payment. Optional. Python type: str; wire name: cancel_url; JSON type: string (uri)
13@dataclass(frozen=True, slots=True, kw_only=True) 14class CreateExistingCustomerInputRequestMeta(ApiRequest): 15 """Optional metadata controlling request processing. 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 API contract schema: ``CreateOrderExistingCustomerInputRequestMeta``. 22 """ 23 idempotency_key: str | UnsetType = field(default=UNSET) 24 """Unique key to prevent duplicate order creation. Optional. Python type: ``str``; wire name: ``idempotency_key``; JSON type: string""" 25 response: Response | UnsetType = field(default=UNSET) 26 """Optional typed selection of public response properties. Python type: ``Response``; wire name: ``response``; JSON type: object (RequestResponse)"""
Optional metadata controlling request processing.
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.
API contract schema: CreateOrderExistingCustomerInputRequestMeta.
Unique key to prevent duplicate order creation. Optional. Python type: str; wire name: idempotency_key; JSON type: string
Optional typed selection of public response properties. Python type: Response; wire name: response; JSON type: object (RequestResponse)
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CreateNewCustomerInput(ApiRequest): 14 """Parameters accepted by the create new customer 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 API contract schema: ``CreateOrderNewCustomerInput``. 21 """ 22 number: str | UnsetType = field(default=UNSET) 23 """Optional order number for reference. When omitted, Inttegro uses the generated order ID. Optional. Python type: ``str``; wire name: ``number``; JSON type: string""" 24 receipt_number: str | UnsetType = field(default=UNSET) 25 """Optional receipt number for downstream reconciliation. Uses the same length rules as `number`. Optional. Python type: ``str``; wire name: ``receipt_number``; JSON type: string""" 26 statement_descriptor: str | UnsetType = field(default=UNSET) 27 """Optional statement descriptor shown on the customer's bank statement. Optional. Python type: ``str``; wire name: ``statement_descriptor``; JSON type: string. Constraints: maximum length 22""" 28 statement_descriptor_prefix: str | UnsetType = field(default=UNSET) 29 """Optional static prefix used to build the statement descriptor as `prefix*order_id`. Mutually exclusive with `statement_descriptor`. Optional. Python type: ``str``; wire name: ``statement_descriptor_prefix``; JSON type: string. Constraints: minimum length 2; maximum length 10""" 30 execute_payment: bool | UnsetType = field(default=UNSET) 31 """Whether to execute payment immediately after order creation. Optional. Python type: ``bool``; wire name: ``execute_payment``; JSON type: boolean""" 32 finalize: bool | UnsetType = field(default=UNSET) 33 """Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: ``bool``; wire name: ``finalize``; JSON type: boolean""" 34 request_meta: CreateOrderNewCustomerInputRequestMeta | UnsetType = field(default=UNSET) 35 """Optional metadata controlling request processing. Optional. Python type: ``CreateOrderNewCustomerInputRequestMeta``; wire name: ``request_meta``; JSON type: object""" 36 checkout_settings: CreateOrderNewCustomerInputCheckoutSettings | UnsetType = field(default=UNSET) 37 """Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. Optional. Python type: ``CreateOrderNewCustomerInputCheckoutSettings``; wire name: ``checkout_settings``; JSON type: object""" 38 invoice_settings: InvoiceSettingsInput | UnsetType = field(default=UNSET) 39 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: ``InvoiceSettingsInput``; wire name: ``invoice_settings``; JSON type: object (InvoiceSettings)""" 40 payout_settings: OrderPayoutSettingsRequest | UnsetType = field(default=UNSET) 41 """The payout settings associated with this create new customer input. Optional. Python type: ``OrderPayoutSettingsRequest``; wire name: ``payout_settings``; JSON type: object (OrderPayoutSettingsRequest)""" 42 custom_data: CustomData | UnsetType = field(default=UNSET) 43 """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)""" 44 billing_details: BillingDetailsInput | UnsetType = field(default=UNSET) 45 """The billing details associated with this create new customer input. Optional. Python type: ``BillingDetailsInput``; wire name: ``billing_details``; JSON type: object (BillingDetails)""" 46 shipping: ShippingInput | UnsetType = field(default=UNSET) 47 """The shipping associated with this create new customer input. Optional. Python type: ``ShippingInput``; wire name: ``shipping``; JSON type: object (Shipping)""" 48 payment_method_data: PaymentMethodDataInput | UnsetType = field(default=UNSET) 49 """New payment instrument details to use when executing payment for the order. Optional. Python type: ``PaymentMethodDataInput``; wire name: ``payment_method_data``; JSON type: object (PaymentMethodData)""" 50 customer_data: CustomerDataInput 51 """The customer data associated with this create new customer input. Required. Python type: ``CustomerDataInput``; wire name: ``customer_data``; JSON type: object (CustomerData)""" 52 line_items: list[LineItemInput] 53 """Items included in the order. Product line items may use inline product data, `product_id` with explicit `price`, or `product_id` with `price_id`. Required. Python type: ``list[LineItemInput]``; wire name: ``line_items``; JSON type: array of object (LineItem) values. Constraints: minimum items 1"""
Parameters accepted by the create new customer 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.
API contract schema: CreateOrderNewCustomerInput.
Optional order number for reference. When omitted, Inttegro uses the generated order ID. Optional. Python type: str; wire name: number; JSON type: string
Optional receipt number for downstream reconciliation. Uses the same length rules as number. Optional. Python type: str; wire name: receipt_number; JSON type: string
Optional statement descriptor shown on the customer's bank statement. Optional. Python type: str; wire name: statement_descriptor; JSON type: string. Constraints: maximum length 22
Optional static prefix used to build the statement descriptor as prefix*order_id. Mutually exclusive with statement_descriptor. Optional. Python type: str; wire name: statement_descriptor_prefix; JSON type: string. Constraints: minimum length 2; maximum length 10
Whether to execute payment immediately after order creation. Optional. Python type: bool; wire name: execute_payment; JSON type: boolean
Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: bool; wire name: finalize; JSON type: boolean
Optional metadata controlling request processing. Optional. Python type: CreateOrderNewCustomerInputRequestMeta; wire name: request_meta; JSON type: object
Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. Optional. Python type: CreateOrderNewCustomerInputCheckoutSettings; wire name: checkout_settings; JSON type: object
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: InvoiceSettingsInput; wire name: invoice_settings; JSON type: object (InvoiceSettings)
The payout settings associated with this create new customer input. Optional. Python type: OrderPayoutSettingsRequest; wire name: payout_settings; JSON type: object (OrderPayoutSettingsRequest)
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)
The billing details associated with this create new customer input. Optional. Python type: BillingDetailsInput; wire name: billing_details; JSON type: object (BillingDetails)
The shipping associated with this create new customer input. Optional. Python type: ShippingInput; wire name: shipping; JSON type: object (Shipping)
New payment instrument details to use when executing payment for the order. Optional. Python type: PaymentMethodDataInput; wire name: payment_method_data; JSON type: object (PaymentMethodData)
The customer data associated with this create new customer input. Required. Python type: CustomerDataInput; wire name: customer_data; JSON type: object (CustomerData)
Items included in the order. Product line items may use inline product data, product_id with explicit price, or product_id with price_id. Required. Python type: list[LineItemInput]; wire name: line_items; JSON type: array of object (LineItem) values. Constraints: minimum items 1
12@dataclass(frozen=True, slots=True, kw_only=True) 13class CreateNewCustomerInputCheckoutSettings(ApiRequest): 14 """Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience. 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 API contract schema: ``CreateOrderNewCustomerInputCheckoutSettings``. 21 """ 22 redirect_url: str | UnsetType = field(default=UNSET) 23 """URL to redirect customer after payment completion. Optional. Python type: ``str``; wire name: ``redirect_url``; JSON type: string (uri)""" 24 cancel_url: str | UnsetType = field(default=UNSET) 25 """URL to redirect customer if they cancel payment. Optional. Python type: ``str``; wire name: ``cancel_url``; JSON type: string (uri)"""
Checkout and payment flow configuration. Strongly recommended to provide both redirect_url and cancel_url for a delightful customer experience.
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.
API contract schema: CreateOrderNewCustomerInputCheckoutSettings.
URL to redirect customer after payment completion. Optional. Python type: str; wire name: redirect_url; JSON type: string (uri)
URL to redirect customer if they cancel payment. Optional. Python type: str; wire name: cancel_url; JSON type: string (uri)
13@dataclass(frozen=True, slots=True, kw_only=True) 14class CreateNewCustomerInputRequestMeta(ApiRequest): 15 """Optional metadata controlling request processing. 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 API contract schema: ``CreateOrderNewCustomerInputRequestMeta``. 22 """ 23 idempotency_key: str | UnsetType = field(default=UNSET) 24 """Unique key to prevent duplicate order creation. Optional. Python type: ``str``; wire name: ``idempotency_key``; JSON type: string""" 25 response: Response | UnsetType = field(default=UNSET) 26 """Optional typed selection of public response properties. Python type: ``Response``; wire name: ``response``; JSON type: object (RequestResponse)"""
Optional metadata controlling request processing.
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.
API contract schema: CreateOrderNewCustomerInputRequestMeta.
Unique key to prevent duplicate order creation. Optional. Python type: str; wire name: idempotency_key; JSON type: string
Optional typed selection of public response properties. Python type: Response; wire name: response; JSON type: object (RequestResponse)
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class CreatedFrom(ApiModel): 15 """Attribution for the public resource that created this order, when available. 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 API contract schema: ``OrderCreatedFrom``. 24 """ 25 source: str | None = field(init=False) 26 """The source associated with this created from. Optional; nullable. Python type: ``str | None``; wire name: ``source``; JSON type: string""" 27 resource_type: Literal['purchase_intent'] | None = field(init=False) 28 """The resource type associated with this created from. Optional; nullable. Python type: ``Literal['purchase_intent'] | None``; wire name: ``resource_type``; JSON type: string. Constraints: allowed values ``purchase_intent``""" 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"""
Attribution for the public resource that created this order, when available.
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.
API contract schema: OrderCreatedFrom.
The source associated with this created from. Optional; nullable. Python type: str | None; wire name: source; JSON type: string
The resource type associated with this created from. Optional; nullable. Python type: Literal['purchase_intent'] | None; wire name: resource_type; JSON type: string. Constraints: allowed values purchase_intent
Identifier of the related resource. Optional; nullable. Python type: str | None; wire name: resource_id; JSON type: string
11class CreatedFromResourceType(WireEnum): 12 """Typed created from resource type data in the order resource namespace. 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 API contract schema: ``OrderCreatedFromResourceType``. 18 """ 19 PURCHASE_INTENT = "purchase_intent" 20 """Wire value ``purchase_intent`` (purchase intent)"""
Typed created from resource type data in the order resource namespace.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: OrderCreatedFromResourceType.
Wire value purchase_intent (purchase intent)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Customer(ApiModel): 14 """Typed customer data in the order 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 API contract schema: ``OrderCustomer``. 23 """ 24 id: str = field(init=False) 25 """Unique identifier for this customer. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 26 guest: bool = field(init=False) 27 """Whether guest. Required. Python type: ``bool``; wire name: ``guest``; JSON type: boolean""" 28 name: str = field(init=False) 29 """Human-readable name of the customer. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 30 email_address: str | None = field(init=False) 31 """Customer or recipient email address. Optional; nullable. Python type: ``str | None``; wire name: ``email_address``; JSON type: string (email)""" 32 phone_number: str | None = field(init=False) 33 """Customer or recipient phone number in international form. Optional; nullable. Python type: ``str | None``; wire name: ``phone_number``; JSON type: string""" 34 billing_address: OrderAddress | None = field(init=False) 35 """The billing address associated with this customer. Optional; nullable. Python type: ``OrderAddress | None``; wire name: ``billing_address``; JSON type: object (OrderAddress)""" 36 shipping_address: OrderAddress | None = field(init=False) 37 """The shipping address associated with this customer. Optional; nullable. Python type: ``OrderAddress | None``; wire name: ``shipping_address``; JSON type: object (OrderAddress)"""
Typed customer data in the order 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.
API contract schema: OrderCustomer.
Unique identifier for this customer. Required. Python type: str; wire name: id; JSON type: string
Human-readable name of the customer. Required. Python type: str; wire name: name; JSON type: string
Customer or recipient email address. Optional; nullable. Python type: str | None; wire name: email_address; JSON type: string (email)
Customer or recipient phone number in international form. Optional; nullable. Python type: str | None; wire name: phone_number; JSON type: string
The billing address associated with this customer. Optional; nullable. Python type: OrderAddress | None; wire name: billing_address; JSON type: object (OrderAddress)
The shipping address associated with this customer. Optional; nullable. Python type: OrderAddress | None; wire name: shipping_address; JSON type: object (OrderAddress)
11class DeliveryChannel(WireEnum): 12 """Delivery channel. 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 EMAIL = "email" 18 """Wire value ``email`` (email) for delivery channel""" 19 SMS = "sms" 20 """Wire value ``sms`` (sms) for delivery channel"""
Delivery channel.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class DiscountLineItem(ApiModel): 15 """Typed discount line item data in the order 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 API contract schema: ``OrderDiscountLineItem``. 24 """ 25 type: Literal['discount'] = field(init=False) 26 """Discriminator identifying the discount line item type. Required. Python type: ``Literal['discount']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``discount``""" 27 discount: OrderDiscountLineItemDiscount = field(init=False) 28 """The discount associated with this discount line item. Required. Python type: ``OrderDiscountLineItemDiscount``; wire name: ``discount``; JSON type: object (OrderDiscount)"""
Typed discount line item data in the order 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.
API contract schema: OrderDiscountLineItem.
The discount associated with this discount line item. Required. Python type: OrderDiscountLineItemDiscount; wire name: discount; JSON type: object (OrderDiscount)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class DiscountLineItemDiscount(ApiModel): 14 """Typed discount line item discount data in the order 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 API contract schema: ``OrderDiscountLineItemDiscount``. 23 """ 24 pass
Typed discount line item discount data in the order 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.
API contract schema: OrderDiscountLineItemDiscount.
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class DocumentDelivery(ApiModel): 15 """Delivery result for one hosted order document link. 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 API contract schema: ``OrderDocumentDelivery``. 24 """ 25 deliveries: list[OrderDocumentDeliveryAttempt] | None = field(init=False) 26 """Chime messages that were accepted for delivery. Optional; nullable. Python type: ``list[OrderDocumentDeliveryAttempt] | None``; wire name: ``deliveries``; JSON type: array of object (OrderDocumentDeliveryAttempt) values""" 27 document_kind: Literal['invoice', 'receipt'] | None = field(init=False) 28 """Hosted document that was delivered. Optional; nullable. Python type: ``Literal['invoice', 'receipt'] | None``; wire name: ``document_kind``; JSON type: string. Constraints: allowed values ``invoice``, ``receipt``""" 29 document_url: str | None = field(init=False) 30 """Hosted invoice or receipt URL sent to the customer. Receipt URLs use the hosted receipt path, not the invoice PDF path. Optional; nullable. Python type: ``str | None``; wire name: ``document_url``; JSON type: string (uri)""" 31 failed_channels: list[Literal['email', 'sms']] | None = field(init=False) 32 """Channels that failed to send. Optional; nullable. Python type: ``list[Literal['email', 'sms']] | None``; wire name: ``failed_channels``; JSON type: array of string values""" 33 failures: list[OrderDocumentDeliveryFailure] | None = field(init=False) 34 """Per-channel delivery failures. Optional; nullable. Python type: ``list[OrderDocumentDeliveryFailure] | None``; wire name: ``failures``; JSON type: array of object (OrderDocumentDeliveryFailure) values""" 35 sent_channels: list[Literal['email', 'sms']] | None = field(init=False) 36 """Channels accepted by Chime. Optional; nullable. Python type: ``list[Literal['email', 'sms']] | None``; wire name: ``sent_channels``; JSON type: array of string values"""
Delivery result for one hosted order document link.
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.
API contract schema: OrderDocumentDelivery.
Chime messages that were accepted for delivery. Optional; nullable. Python type: list[OrderDocumentDeliveryAttempt] | None; wire name: deliveries; JSON type: array of object (OrderDocumentDeliveryAttempt) values
Hosted document that was delivered. Optional; nullable. Python type: Literal['invoice', 'receipt'] | None; wire name: document_kind; JSON type: string. Constraints: allowed values invoice, receipt
Hosted invoice or receipt URL sent to the customer. Receipt URLs use the hosted receipt path, not the invoice PDF path. Optional; nullable. Python type: str | None; wire name: document_url; JSON type: string (uri)
Channels that failed to send. Optional; nullable. Python type: list[Literal['email', 'sms']] | None; wire name: failed_channels; JSON type: array of string values
Per-channel delivery failures. Optional; nullable. Python type: list[OrderDocumentDeliveryFailure] | None; wire name: failures; JSON type: array of object (OrderDocumentDeliveryFailure) values
Channels accepted by Chime. Optional; nullable. Python type: list[Literal['email', 'sms']] | None; wire name: sent_channels; JSON type: array of string values
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class DocumentDeliveryAttempt(ApiModel): 15 """Chime delivery accepted for one channel. 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 API contract schema: ``OrderDocumentDeliveryAttempt``. 24 """ 25 channel: Literal['email', 'sms'] | None = field(init=False) 26 """Delivery channel. Optional; nullable. Python type: ``Literal['email', 'sms'] | None``; wire name: ``channel``; JSON type: string. Constraints: allowed values ``email``, ``sms``""" 27 chime_id: str | None = field(init=False) 28 """Chime ID created for this delivery. Optional; nullable. Python type: ``str | None``; wire name: ``chime_id``; JSON type: string"""
Chime delivery accepted for one channel.
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.
API contract schema: OrderDocumentDeliveryAttempt.
Delivery channel. Optional; nullable. Python type: Literal['email', 'sms'] | None; wire name: channel; JSON type: string. Constraints: allowed values email, sms
Chime ID created for this delivery. Optional; nullable. Python type: str | None; wire name: chime_id; JSON type: string
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class DocumentDeliveryFailure(ApiModel): 15 """Chime delivery failure for one channel. 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 API contract schema: ``OrderDocumentDeliveryFailure``. 24 """ 25 channel: Literal['email', 'sms'] | None = field(init=False) 26 """Delivery channel. Optional; nullable. Python type: ``Literal['email', 'sms'] | None``; wire name: ``channel``; JSON type: string. Constraints: allowed values ``email``, ``sms``"""
Chime delivery failure for one channel.
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.
API contract schema: OrderDocumentDeliveryFailure.
Delivery channel. Optional; nullable. Python type: Literal['email', 'sms'] | None; wire name: channel; JSON type: string. Constraints: allowed values email, sms
12@dataclass(frozen=True, slots=True, kw_only=True) 13class DocumentDeliveryRequest(ApiRequest): 14 """Parameters accepted by the document delivery 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 API contract schema: ``OrderDocumentDeliveryRequest``. 21 """ 22 order_id: str 23 """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 document delivery 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.
API contract schema: OrderDocumentDeliveryRequest.
Order whose hosted invoice or receipt link should be delivered. Required. Python type: str; wire name: order_id; JSON type: string
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class DocumentDeliveryResult(ApiModel): 14 """Response returned by deliberate order document delivery endpoints. 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 API contract schema: ``OrderDocumentDeliveryResult``. 23 """ 24 delivery: OrderDocumentDelivery | None = field(init=False) 25 """Delivery result for one hosted order document link. Optional; nullable. Python type: ``OrderDocumentDelivery | None``; wire name: ``delivery``; JSON type: object (OrderDocumentDelivery)""" 26 error: Error | None = field(init=False) 27 """Standard error response structure returned by all API endpoints. Provides machine-readable codes, human-readable messages, and actionable guidance for resolution. Optional; nullable. Python type: ``Error | None``; wire name: ``error``; JSON type: object (Error)""" 28 order: Order | None = field(init=False) 29 """Complete order record with line items, customer details, payment state, and fulfillment information. Optional; nullable. Python type: ``Order | None``; wire name: ``order``; JSON type: object (Order)"""
Response returned by deliberate order document delivery endpoints.
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.
API contract schema: OrderDocumentDeliveryResult.
Delivery result for one hosted order document link. Optional; nullable. Python type: OrderDocumentDelivery | None; wire name: delivery; JSON type: object (OrderDocumentDelivery)
Standard error response structure returned by all API endpoints. Provides machine-readable codes, human-readable messages, and actionable guidance for resolution. Optional; nullable. Python type: Error | None; wire name: error; JSON type: object (Error)
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class DocumentFormat(ApiModel): 14 """Typed document format data in the order 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 API contract schema: ``OrderDocumentFormat``. 23 """ 24 url: str = field(init=False) 25 """URL associated with the document format. Required. Python type: ``str``; wire name: ``url``; JSON type: string (uri)"""
Typed document format data in the order 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.
API contract schema: OrderDocumentFormat.
URL associated with the document format. Required. Python type: str; wire name: url; JSON type: string (uri)
11class DocumentKind(WireEnum): 12 """Hosted document that was delivered. 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 API contract schema: ``OrderDocumentKind``. 18 """ 19 INVOICE = "invoice" 20 """Wire value ``invoice`` (invoice) for hosted document that was delivered""" 21 RECEIPT = "receipt" 22 """Wire value ``receipt`` (receipt) for hosted document that was delivered"""
Hosted document that was delivered.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: OrderDocumentKind.
Wire value invoice (invoice) for hosted document that was delivered
Wire value receipt (receipt) for hosted document that was delivered
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Envelope(ApiModel): 14 """Typed envelope data in the order 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 API contract schema: ``OrderEnvelope``. 23 """ 24 order: Order = field(init=False) 25 """Complete order record with line items, customer details, payment state, and fulfillment information. Required. Python type: ``Order``; wire name: ``order``; JSON type: object (Order)"""
Typed envelope data in the order 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.
API contract schema: OrderEnvelope.
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class FeeLineItem(ApiModel): 15 """Typed fee line item data in the order 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 API contract schema: ``OrderFeeLineItem``. 24 """ 25 type: Literal['fee'] = field(init=False) 26 """Discriminator identifying the fee line item type. Required. Python type: ``Literal['fee']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``fee``""" 27 fee: OrderFeeLineItemFee = field(init=False) 28 """The fee associated with this fee line item. Required. Python type: ``OrderFeeLineItemFee``; wire name: ``fee``; JSON type: object"""
Typed fee line item data in the order 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.
API contract schema: OrderFeeLineItem.
The fee associated with this fee line item. Required. Python type: OrderFeeLineItemFee; wire name: fee; JSON type: object
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class FeeLineItemFee(ApiModel): 15 """Typed fee line item fee data in the order 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 API contract schema: ``OrderFeeLineItemFee``. 24 """ 25 id: str = field(init=False) 26 """Immutable order-line identifier with the `oli_` prefix. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 27 description: str | None = field(init=False) 28 """Human-readable description of the fee line item fee. Optional; nullable. Python type: ``str | None``; wire name: ``description``; JSON type: string""" 29 tax_code: str | None = field(init=False) 30 """The tax code associated with this fee line item fee. Optional; nullable. Python type: ``str | None``; wire name: ``tax_code``; JSON type: string""" 31 amount: Amount = field(init=False) 32 """Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``amount``; JSON type: object (Amount)""" 33 label: str = field(init=False) 34 """The label associated with this fee line item fee. Required. Python type: ``str``; wire name: ``label``; JSON type: string"""
Typed fee line item fee data in the order 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.
API contract schema: OrderFeeLineItemFee.
Immutable order-line identifier with the oli_ prefix. Required. Python type: str; wire name: id; JSON type: string
Human-readable description of the fee line item fee. Optional; nullable. Python type: str | None; wire name: description; JSON type: string
The tax code associated with this fee line item fee. Optional; nullable. Python type: str | None; wire name: tax_code; JSON type: string
Monetary amount, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: amount; JSON type: object (Amount)
The label associated with this fee line item fee. Required. Python type: str; wire name: label; JSON type: string
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class FinalizeEnvelope(ApiModel): 14 """Typed finalize envelope data in the order 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 API contract schema: ``FinalizeOrderEnvelope``. 23 """ 24 order: Order | None = field(init=False) 25 """Complete order record with line items, customer details, payment state, and fulfillment information. Required; nullable. Python type: ``Order | None``; wire name: ``order``; JSON type: object (Order)"""
Typed finalize envelope data in the order 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.
API contract schema: FinalizeOrderEnvelope.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class FinalizeRequest(ApiRequest): 14 """Parameters accepted by the finalize 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 API contract schema: ``FinalizeOrderRequest``. 21 """ 22 order_id: str 23 """The finalized Order to inspect or pay. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
Parameters accepted by the finalize 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.
API contract schema: FinalizeOrderRequest.
The finalized Order to inspect or pay. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Invoice(ApiModel): 14 """Typed invoice data in the order 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 API contract schema: ``OrderInvoice``. 23 """ 24 number: str | None = field(init=False) 25 """Human-readable number assigned to the invoice. Optional; nullable. Python type: ``str | None``; wire name: ``number``; JSON type: string""" 26 format: OrderInvoiceFormat = field(init=False) 27 """The format associated with this invoice. Required. Python type: ``OrderInvoiceFormat``; wire name: ``format``; JSON type: object"""
Typed invoice data in the order 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.
API contract schema: OrderInvoice.
Human-readable number assigned to the invoice. Optional; nullable. Python type: str | None; wire name: number; JSON type: string
The format associated with this invoice. Required. Python type: OrderInvoiceFormat; wire name: format; JSON type: object
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class InvoiceFormat(ApiModel): 14 """Typed invoice format data in the order 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 API contract schema: ``OrderInvoiceFormat``. 23 """ 24 web: OrderDocumentFormat = field(init=False) 25 """The web associated with this invoice format. Required. Python type: ``OrderDocumentFormat``; wire name: ``web``; JSON type: object (OrderDocumentFormat)""" 26 pdf: OrderDocumentFormat = field(init=False) 27 """The pdf associated with this invoice format. Required. Python type: ``OrderDocumentFormat``; wire name: ``pdf``; JSON type: object (OrderDocumentFormat)"""
Typed invoice format data in the order 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.
API contract schema: OrderInvoiceFormat.
The web associated with this invoice format. Required. Python type: OrderDocumentFormat; wire name: web; JSON type: object (OrderDocumentFormat)
The pdf associated with this invoice format. Required. Python type: OrderDocumentFormat; wire name: pdf; JSON type: object (OrderDocumentFormat)
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class InvoiceSettings(ApiModel): 15 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. 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 number: str | None = field(init=False) 24 """Optional invoice number. When omitted, invoice delivery falls back to the order number and then the order ID for labels. Optional; nullable. Python type: ``str | None``; wire name: ``number``; JSON type: string""" 25 memo: str | None = field(init=False) 26 """Optional invoice memo. Optional; nullable. Python type: ``str | None``; wire name: ``memo``; JSON type: string""" 27 footer: str | None = field(init=False) 28 """Optional invoice footer. Optional; nullable. Python type: ``str | None``; wire name: ``footer``; JSON type: string""" 29 custom_data: CustomData | None = field(init=False) 30 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: ``CustomData | None``; wire name: ``custom_data``; JSON type: object (CustomData)"""
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views.
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.
Optional invoice number. When omitted, invoice delivery falls back to the order number and then the order ID for labels. Optional; nullable. Python type: str | None; wire name: number; JSON type: string
Optional invoice memo. Optional; nullable. Python type: str | None; wire name: memo; JSON type: string
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: CustomData | None; wire name: custom_data; JSON type: object (CustomData)
13@dataclass(frozen=True, slots=True, kw_only=True) 14class InvoiceSettingsInput(ApiRequest): 15 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. 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 number: str | UnsetType = field(default=UNSET) 22 """Optional invoice number. When omitted, invoice delivery falls back to the order number and then the order ID for labels. Optional. Python type: ``str``; wire name: ``number``; JSON type: string""" 23 memo: str | UnsetType = field(default=UNSET) 24 """Optional invoice memo. Optional. Python type: ``str``; wire name: ``memo``; JSON type: string""" 25 footer: str | UnsetType = field(default=UNSET) 26 """Optional invoice footer. Optional. Python type: ``str``; wire name: ``footer``; 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)"""
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views.
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.
Optional invoice number. When omitted, invoice delivery falls back to the order number and then the order ID for labels. Optional. Python type: str; wire name: number; JSON type: string
Optional invoice memo. Optional. Python type: str; wire name: memo; 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)
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class LineItemGroup(ApiModel): 15 """Cart contents and totals. 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 API contract schema: ``OrderLineItemGroup``. 24 """ 25 line_items: list[OrderLineItem] = field(init=False) 26 """Array of products, fees, and shipping charges. Required. Python type: ``list[OrderLineItem]``; wire name: ``line_items``; JSON type: array of object (OrderLineItem) values""" 27 total: Amount = field(init=False) 28 """Monetary total, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``total``; JSON type: object (Amount)"""
Cart contents and totals.
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.
API contract schema: OrderLineItemGroup.
Array of products, fees, and shipping charges. Required. Python type: list[OrderLineItem]; wire name: line_items; JSON type: array of object (OrderLineItem) values
Monetary total, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: total; JSON type: object (Amount)
11class LineItemType(WireEnum): 12 """Type of line item. 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 PRODUCT = "product" 18 """Wire value ``product`` (product) for type of line item""" 19 FEE = "fee" 20 """Wire value ``fee`` (fee) for type of line item""" 21 SHIPPING = "shipping" 22 """Wire value ``shipping`` (shipping) for type of line item"""
Type of line item.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class LookupRequest(ApiRequest): 14 """Parameters accepted by the lookup 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 API contract schema: ``LookupOrderRequest``. 21 """ 22 order_id: str 23 """The finalized Order to inspect or pay. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
Parameters accepted by the lookup 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.
API contract schema: LookupOrderRequest.
The finalized Order to inspect or pay. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 15class Order(ApiModel): 16 """Complete order record with line items, customer details, payment state, and fulfillment information. 17 18 Instances are immutable API responses. ``from_dict()`` decodes nested 19 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 20 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 21 Fields not returned by the API remain absent and can still be queried 22 through mapping-style access. 23 """ 24 canceled_at: datetime | None = field(init=False) 25 """When the order was canceled. Omitted otherwise. Optional; nullable. Python type: ``datetime | None``; wire name: ``canceled_at``; JSON type: string (date-time)""" 26 checkout_settings: OrderCheckoutSettings | None = field(init=False) 27 """Checkout and payment flow configuration for this order. Optional; nullable. Python type: ``OrderCheckoutSettings | None``; wire name: ``checkout_settings``; JSON type: object""" 28 completed_at: datetime | None = field(init=False) 29 """When the order was completed. Omitted otherwise. Optional; nullable. Python type: ``datetime | None``; wire name: ``completed_at``; JSON type: string (date-time)""" 30 created_from: OrderCreatedFrom | None = field(init=False) 31 """Attribution for the public resource that created this order, when available. Optional; nullable. Python type: ``OrderCreatedFrom | None``; wire name: ``created_from``; JSON type: object""" 32 custom_data: CustomData | None = field(init=False) 33 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: ``CustomData | None``; wire name: ``custom_data``; JSON type: object (CustomData)""" 34 customer: OrderCustomer = field(init=False) 35 """The customer associated with this order. Required. Python type: ``OrderCustomer``; wire name: ``customer``; JSON type: object""" 36 expires_at: datetime | None = field(init=False) 37 """When the order expires. Omitted when no expiry is set. Optional; nullable. Python type: ``datetime | None``; wire name: ``expires_at``; JSON type: string (date-time)""" 38 id: str = field(init=False) 39 """Unique identifier for this order. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 40 initiated_at: datetime = field(init=False) 41 """When order processing began. Required. Python type: ``datetime``; wire name: ``initiated_at``; JSON type: string (date-time)""" 42 invoice: OrderInvoice | None = field(init=False) 43 """The invoice associated with this order. Optional; nullable. Python type: ``OrderInvoice | None``; wire name: ``invoice``; JSON type: object""" 44 number: str | None = field(init=False) 45 """Human-readable order number. Optional; nullable. Python type: ``str | None``; wire name: ``number``; JSON type: string""" 46 receipt_number: str | None = field(init=False) 47 """Merchant-provided receipt number, when set. Optional; nullable. Python type: ``str | None``; wire name: ``receipt_number``; JSON type: string""" 48 refunds: list[Refund] | None = field(init=False) 49 """All refunds issued for this order, newest first. Omitted when no refunds exist. Optional; nullable. Python type: ``list[Refund] | None``; wire name: ``refunds``; JSON type: array of object (Refund) values""" 50 invoice_settings: InvoiceSettings | None = field(init=False) 51 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional; nullable. Python type: ``InvoiceSettings | None``; wire name: ``invoice_settings``; JSON type: object (InvoiceSettings)""" 52 status: Literal['preparing', 'requires_payment', 'paid', 'completed', 'canceled', 'expired', 'unknown'] = field(init=False) 53 """Current lifecycle state of the order. Required. Python type: ``Literal['preparing', 'requires_payment', 'paid', 'completed', 'canceled', 'expired', 'unknown']``; wire name: ``status``; JSON type: string. Constraints: allowed values ``preparing``, ``requires_payment``, ``paid``, ``completed``, ``canceled``, ``expired``, ``unknown``""" 54 sealed_at: datetime | None = field(init=False) 55 """When the order was finalized and became immutable—ready for payment or fulfillment. Optional; nullable. Python type: ``datetime | None``; wire name: ``sealed_at``; JSON type: string (date-time)""" 56 line_item_group: OrderLineItemGroup | None = field(init=False) 57 """Cart contents and totals. Optional; nullable. Python type: ``OrderLineItemGroup | None``; wire name: ``line_item_group``; JSON type: object""" 58 payment: Payment | None = field(init=False) 59 """Payment intent tied to this order. Optional; nullable. Python type: ``Payment | None``; wire name: ``payment``; JSON type: object""" 60 paid_at: datetime | None = field(init=False) 61 """When the order became paid. Optional; nullable. Python type: ``datetime | None``; wire name: ``paid_at``; JSON type: string (date-time)""" 62 payment_due_at: datetime | None = field(init=False) 63 """When the order payment becomes overdue. Optional; nullable. Python type: ``datetime | None``; wire name: ``payment_due_at``; JSON type: string (date-time)""" 64 reference: str | None = field(init=False) 65 """External order reference when present. Optional; nullable. Python type: ``str | None``; wire name: ``reference``; JSON type: string""" 66 67 def is_paid(self) -> bool: 68 """Whether the order has recorded payment, including after completion.""" 69 return self.status == "paid" or getattr(self, "paid_at", None) is not None 70 71 def requires_payment(self) -> bool: 72 """Whether the order is waiting for payment.""" 73 return self.status == "requires_payment" 74 75 def is_terminal(self) -> bool: 76 """Whether the order has reached a final state.""" 77 return self.status in {"paid", "completed", "canceled", "expired"} 78 79 def required_payment_action(self) -> PaymentNextAction | None: 80 """Return nested action details when the order payment requires action.""" 81 payment = getattr(self, "payment", None) 82 return payment.required_action() if payment is not None else None
Complete order record with line items, customer details, payment state, and fulfillment information.
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.
When the order was canceled. Omitted otherwise. Optional; nullable. Python type: datetime | None; wire name: canceled_at; JSON type: string (date-time)
Checkout and payment flow configuration for this order. Optional; nullable. Python type: OrderCheckoutSettings | None; wire name: checkout_settings; JSON type: object
When the order was completed. Omitted otherwise. Optional; nullable. Python type: datetime | None; wire name: completed_at; JSON type: string (date-time)
Attribution for the public resource that created this order, when available. Optional; nullable. Python type: OrderCreatedFrom | None; wire name: created_from; JSON type: object
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: CustomData | None; wire name: custom_data; JSON type: object (CustomData)
The customer associated with this order. Required. Python type: OrderCustomer; wire name: customer; JSON type: object
When the order expires. Omitted when no expiry is set. Optional; nullable. Python type: datetime | None; wire name: expires_at; JSON type: string (date-time)
Unique identifier for this order. Required. Python type: str; wire name: id; JSON type: string
When order processing began. Required. Python type: datetime; wire name: initiated_at; JSON type: string (date-time)
The invoice associated with this order. Optional; nullable. Python type: OrderInvoice | None; wire name: invoice; JSON type: object
Human-readable order number. Optional; nullable. Python type: str | None; wire name: number; JSON type: string
Merchant-provided receipt number, when set. Optional; nullable. Python type: str | None; wire name: receipt_number; JSON type: string
All refunds issued for this order, newest first. Omitted when no refunds exist. Optional; nullable. Python type: list[Refund] | None; wire name: refunds; JSON type: array of object (Refund) values
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional; nullable. Python type: InvoiceSettings | None; wire name: invoice_settings; JSON type: object (InvoiceSettings)
Current lifecycle state of the order. Required. Python type: Literal['preparing', 'requires_payment', 'paid', 'completed', 'canceled', 'expired', 'unknown']; wire name: status; JSON type: string. Constraints: allowed values preparing, requires_payment, paid, completed, canceled, expired, unknown
When the order was finalized and became immutable—ready for payment or fulfillment. Optional; nullable. Python type: datetime | None; wire name: sealed_at; JSON type: string (date-time)
Cart contents and totals. Optional; nullable. Python type: OrderLineItemGroup | None; wire name: line_item_group; JSON type: object
Payment intent tied to this order. Optional; nullable. Python type: Payment | None; wire name: payment; JSON type: object
When the order became paid. Optional; nullable. Python type: datetime | None; wire name: paid_at; JSON type: string (date-time)
When the order payment becomes overdue. Optional; nullable. Python type: datetime | None; wire name: payment_due_at; JSON type: string (date-time)
External order reference when present. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string
67 def is_paid(self) -> bool: 68 """Whether the order has recorded payment, including after completion.""" 69 return self.status == "paid" or getattr(self, "paid_at", None) is not None
Whether the order has recorded payment, including after completion.
71 def requires_payment(self) -> bool: 72 """Whether the order is waiting for payment.""" 73 return self.status == "requires_payment"
Whether the order is waiting for payment.
75 def is_terminal(self) -> bool: 76 """Whether the order has reached a final state.""" 77 return self.status in {"paid", "completed", "canceled", "expired"}
Whether the order has reached a final state.
79 def required_payment_action(self) -> PaymentNextAction | None: 80 """Return nested action details when the order payment requires action.""" 81 payment = getattr(self, "payment", None) 82 return payment.required_action() if payment is not None else None
Return nested action details when the order payment requires action.
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class Page(ApiModel): 14 """One page of page resources. 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 API contract schema: ``OrderPage``. 23 """ 24 number: int = field(init=False) 25 """Human-readable number assigned to the page. Required. Python type: ``int``; wire name: ``number``; JSON type: integer""" 26 size: int = field(init=False) 27 """Number of customers returned. Required. Python type: ``int``; wire name: ``size``; JSON type: integer""" 28 orders: list[Order] = field(init=False) 29 """The orders associated with this page. Optional. Python type: ``list[Order]``; wire name: ``orders``; JSON type: array"""
One page of page resources.
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.
API contract schema: OrderPage.
Human-readable number assigned to the page. Required. Python type: int; wire name: number; JSON type: integer
Number of customers returned. Required. Python type: int; wire name: size; JSON type: integer
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 13class PageEnvelope(ApiModel): 14 """Typed page envelope data in the order 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 API contract schema: ``PageOrdersEnvelope``. 23 """ 24 page: OrderPage | None = field(init=False) 25 """Numeric page used by this operation. Required; nullable. Python type: ``OrderPage | None``; wire name: ``page``; JSON type: object (MessageTemplatesPage)"""
Typed page envelope data in the order 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.
API contract schema: PageOrdersEnvelope.
12@dataclass(frozen=True, slots=True, kw_only=True) 13class PageRequest(ApiRequest): 14 """Parameters accepted by the page 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 API contract schema: ``PageOrdersRequest``. 21 """ 22 page_number: int | UnsetType = field(default=UNSET) 23 """Page index to fetch. `0` is accepted and normalized to page 1; returned pages are numbered 1-10. Optional. Python type: ``int``; wire name: ``page_number``; JSON type: integer. Constraints: minimum 0; maximum 10""" 24 customer_id: str | UnsetType = field(default=UNSET) 25 """Optional customer ID to scope the page to a single customer. Optional. Python type: ``str``; wire name: ``customer_id``; JSON type: string""" 26 page_size: int 27 """Number of payment methods per page (1-256). Required. Python type: ``int``; wire name: ``page_size``; JSON type: integer. Constraints: minimum 1; maximum 256"""
Parameters accepted by the page 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.
API contract schema: PageOrdersRequest.
Page index to fetch. 0 is accepted and normalized to page 1; returned pages are numbered 1-10. Optional. Python type: int; wire name: page_number; JSON type: integer. Constraints: minimum 0; maximum 10
Optional customer ID to scope the page to a single customer. Optional. Python type: str; wire name: customer_id; JSON type: string
Number of payment methods per page (1-256). Required. Python type: int; wire name: page_size; JSON type: integer. Constraints: minimum 1; maximum 256
12@dataclass(frozen=True, slots=True, kw_only=True) 13class PayRequest(ApiRequest): 14 """Parameters accepted by the pay 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 API contract schema: ``PayOrderRequest``. 21 """ 22 payment_method_data: PaymentMethodDataInput | UnsetType = field(default=UNSET) 23 """New payment method details supplied by the payer. Mutually exclusive with `payment_method_id`. Shipping details are not accepted here because checkout cannot change the Order's shipping address. Optional. Python type: ``PaymentMethodDataInput``; wire name: ``payment_method_data``; JSON type: object""" 24 payment_method_id: str | UnsetType = field(default=UNSET) 25 """A saved payment method owned by the Order's immutable customer. Mutually exclusive with `payment_method_data`. Optional. Python type: ``str``; wire name: ``payment_method_id``; JSON type: string. Constraints: minimum length 1""" 26 paid_out_of_band: bool | UnsetType = field(default=UNSET) 27 """Whether paid out of band. Optional. Python type: ``bool``; wire name: ``paid_out_of_band``; JSON type: boolean""" 28 order_id: str 29 """The finalized Order to pay. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string. Constraints: minimum length 1"""
Parameters accepted by the pay 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.
API contract schema: PayOrderRequest.
New payment method details supplied by the payer. Mutually exclusive with payment_method_id. Shipping details are not accepted here because checkout cannot change the Order's shipping address. Optional. Python type: PaymentMethodDataInput; wire name: payment_method_data; JSON type: object
A saved payment method owned by the Order's immutable customer. Mutually exclusive with payment_method_data. Optional. Python type: str; wire name: payment_method_id; JSON type: string. Constraints: minimum length 1
Whether paid out of band. Optional. Python type: bool; wire name: paid_out_of_band; JSON type: boolean
The finalized Order to pay. Required. Python type: str; wire name: order_id; JSON type: string. Constraints: minimum length 1
13@dataclass(frozen=True, slots=True, kw_only=True) 14class PayoutSettingsRequest(ApiRequest): 15 """Parameters accepted by the payout settings request 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 API contract schema: ``OrderPayoutSettingsRequest``. 22 """ 23 destination: OrderPayoutSettingsRequestDestination | UnsetType = field(default=UNSET) 24 """The destination associated with this payout settings request. Optional. Python type: ``OrderPayoutSettingsRequestDestination``; wire name: ``destination``; JSON type: object""" 25 enable_fx: Literal[False] | UnsetType = field(default=UNSET) 26 """Omit this field or set it to false. Cross-currency payouts are not currently available. Optional. Python type: ``Literal[False]``; wire name: ``enable_fx``; JSON type: boolean. Constraints: allowed values ``False``"""
Parameters accepted by the payout settings 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.
API contract schema: OrderPayoutSettingsRequest.
The destination associated with this payout settings request. Optional. Python type: OrderPayoutSettingsRequestDestination; wire name: destination; JSON type: object
Omit this field or set it to false. Cross-currency payouts are not currently available. Optional. Python type: Literal[False]; wire name: enable_fx; JSON type: boolean. Constraints: allowed values False
12@dataclass(frozen=True, slots=True, kw_only=True) 13class PayoutSettingsRequestDestination(ApiRequest): 14 """Parameters accepted by the payout settings request destination 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 API contract schema: ``OrderPayoutSettingsRequestDestination``. 21 """ 22 financial_account_id: str 23 """Same-currency financial account with push capability enabled. Required. Python type: ``str``; wire name: ``financial_account_id``; JSON type: string"""
Parameters accepted by the payout settings request destination 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.
API contract schema: OrderPayoutSettingsRequestDestination.
Same-currency financial account with push capability enabled. Required. Python type: str; wire name: financial_account_id; JSON type: string
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class ProductLineItem(ApiModel): 15 """Typed product line item data in the order 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 API contract schema: ``OrderProductLineItem``. 24 """ 25 type: Literal['product'] = field(init=False) 26 """Discriminator identifying the product line item type. Required. Python type: ``Literal['product']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``product``""" 27 product: OrderProductLineItemProduct = field(init=False) 28 """The product associated with this product line item. Required. Python type: ``OrderProductLineItemProduct``; wire name: ``product``; JSON type: object"""
Typed product line item data in the order 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.
API contract schema: OrderProductLineItem.
The product associated with this product line item. Required. Python type: OrderProductLineItemProduct; wire name: product; JSON type: object
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 15class ProductLineItemProduct(ApiModel): 16 """Typed product line item product data in the order resource namespace. 17 18 Instances are immutable API responses. ``from_dict()`` decodes nested 19 objects, string-backed enums, and timezone-aware ISO-8601 timestamps; 20 ``to_dict()`` returns the corresponding JSON-compatible wire shape. 21 Fields not returned by the API remain absent and can still be queried 22 through mapping-style access. 23 24 API contract schema: ``OrderProductLineItemProduct``. 25 """ 26 id: str = field(init=False) 27 """Immutable order-line identifier with the `oli_` prefix. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 28 product_id: str | None = field(init=False) 29 """Source catalog product ID when this line snapshots a catalog product. Optional; nullable. Python type: ``str | None``; wire name: ``product_id``; JSON type: string""" 30 price_id: str | None = field(init=False) 31 """Source catalog price ID when this line snapshots a saved price. Optional; nullable. Python type: ``str | None``; wire name: ``price_id``; JSON type: string""" 32 reference: str | None = field(init=False) 33 """Merchant-defined external reference for the product line item product. Optional; nullable. Python type: ``str | None``; wire name: ``reference``; JSON type: string""" 34 about: str | None = field(init=False) 35 """The about associated with this product line item product. Optional; nullable. Python type: ``str | None``; wire name: ``about``; JSON type: string""" 36 custom_data: CustomData | None = field(init=False) 37 """Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: ``CustomData | None``; wire name: ``custom_data``; JSON type: object (CustomData)""" 38 tax_code: str | None = field(init=False) 39 """The tax code associated with this product line item product. Optional; nullable. Python type: ``str | None``; wire name: ``tax_code``; JSON type: string""" 40 name: str = field(init=False) 41 """Human-readable name of the product line item product. Required. Python type: ``str``; wire name: ``name``; JSON type: string""" 42 category: str | None = field(init=False) 43 """The category associated with this product line item product. Optional; nullable. Python type: ``str | None``; wire name: ``category``; JSON type: string""" 44 type: str | None = field(init=False) 45 """Discriminator identifying the product line item product type. Optional; nullable. Python type: ``str | None``; wire name: ``type``; JSON type: string""" 46 price: Price = field(init=False) 47 """An inline price returned by the API. Required. Python type: ``Price``; wire name: ``price``; JSON type: object (Price)""" 48 quantity: int = field(init=False) 49 """Numeric quantity used by this operation. Required. Python type: ``int``; wire name: ``quantity``; JSON type: integer"""
Typed product line item product data in the order 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.
API contract schema: OrderProductLineItemProduct.
Immutable order-line identifier with the oli_ prefix. Required. Python type: str; wire name: id; JSON type: string
Source catalog product ID when this line snapshots a catalog product. Optional; nullable. Python type: str | None; wire name: product_id; JSON type: string
Source catalog price ID when this line snapshots a saved price. Optional; nullable. Python type: str | None; wire name: price_id; JSON type: string
Merchant-defined external reference for the product line item product. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string
The about associated with this product line item product. Optional; nullable. Python type: str | None; wire name: about; JSON type: string
Merchant-defined string values attached to a resource. SDKs expose this as a semantic collection rather than a raw map. Optional; nullable. Python type: CustomData | None; wire name: custom_data; JSON type: object (CustomData)
The tax code associated with this product line item product. Optional; nullable. Python type: str | None; wire name: tax_code; JSON type: string
Human-readable name of the product line item product. Required. Python type: str; wire name: name; JSON type: string
The category associated with this product line item product. Optional; nullable. Python type: str | None; wire name: category; JSON type: string
Discriminator identifying the product line item product type. Optional; nullable. Python type: str | None; wire name: type; JSON type: string
An inline price returned by the API. Required. Python type: Price; wire name: price; JSON type: object (Price)
Numeric quantity used by this operation. Required. Python type: int; wire name: quantity; JSON type: integer
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 11class Receipt(ApiModel): 12 """Receipt metadata and hosted document formats.""" 13 14 format: ReceiptFormat = field(init=False) 15 number: str | None = field(init=False) 16 delivery_summary: DocumentDeliverySummary | None = field(init=False)
Receipt metadata and hosted document formats.
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 11class ReceiptFormat(ApiModel): 12 """Web and PDF representations of a payment receipt.""" 13 14 web: OrderDocumentFormat = field(init=False) 15 pdf: OrderDocumentFormat = field(init=False)
Web and PDF representations of a payment receipt.
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class ShippingLineItem(ApiModel): 15 """Typed shipping line item data in the order 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 API contract schema: ``OrderShippingLineItem``. 24 """ 25 type: Literal['shipping'] = field(init=False) 26 """Discriminator identifying the shipping line item type. Required. Python type: ``Literal['shipping']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``shipping``""" 27 shipping: OrderShippingLineItemShipping = field(init=False) 28 """The shipping associated with this shipping line item. Required. Python type: ``OrderShippingLineItemShipping``; wire name: ``shipping``; JSON type: object"""
Typed shipping line item data in the order 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.
API contract schema: OrderShippingLineItem.
The shipping associated with this shipping line item. Required. Python type: OrderShippingLineItemShipping; wire name: shipping; JSON type: object
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False) 14class ShippingLineItemShipping(ApiModel): 15 """Typed shipping line item shipping data in the order 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 API contract schema: ``OrderShippingLineItemShipping``. 24 """ 25 id: str = field(init=False) 26 """Immutable order-line identifier with the `oli_` prefix. Required. Python type: ``str``; wire name: ``id``; JSON type: string""" 27 tax_code: str | None = field(init=False) 28 """The tax code associated with this shipping line item shipping. Optional; nullable. Python type: ``str | None``; wire name: ``tax_code``; JSON type: string""" 29 label: str | None = field(init=False) 30 """The label associated with this shipping line item shipping. Optional; nullable. Python type: ``str | None``; wire name: ``label``; JSON type: string""" 31 fee: Amount = field(init=False) 32 """Monetary fee, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``fee``; JSON type: object (Amount)"""
Typed shipping line item shipping data in the order 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.
API contract schema: OrderShippingLineItemShipping.
Immutable order-line identifier with the oli_ prefix. Required. Python type: str; wire name: id; JSON type: string
The tax code associated with this shipping line item shipping. Optional; nullable. Python type: str | None; wire name: tax_code; JSON type: string
The label associated with this shipping line item shipping. Optional; nullable. Python type: str | None; wire name: label; JSON type: string
Monetary fee, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: fee; JSON type: object (Amount)
11class Status(WireEnum): 12 """Current lifecycle state of the order. 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 API contract schema: ``OrderStatus``. 18 """ 19 PREPARING = "preparing" 20 """Wire value ``preparing`` (preparing) for current lifecycle state of the order""" 21 REQUIRES_PAYMENT = "requires_payment" 22 """Wire value ``requires_payment`` (requires payment) for current lifecycle state of the order""" 23 PAID = "paid" 24 """Wire value ``paid`` (paid) for current lifecycle state of the order""" 25 COMPLETED = "completed" 26 """Wire value ``completed`` (completed) for current lifecycle state of the order""" 27 CANCELED = "canceled" 28 """Wire value ``canceled`` (canceled) for current lifecycle state of the order""" 29 EXPIRED = "expired" 30 """Wire value ``expired`` (expired) for current lifecycle state of the order""" 31 UNKNOWN = "unknown" 32 """Wire value ``unknown`` (unknown) for current lifecycle state of the order"""
Current lifecycle state of the order.
Members are strings as well as enum values, so they compare naturally with API payloads and serialize to the lowercase wire value shown below.
API contract schema: OrderStatus.
Wire value preparing (preparing) for current lifecycle state of the order
Wire value requires_payment (requires payment) for current lifecycle state of the order
Wire value completed (completed) for current lifecycle state of the order
Wire value canceled (canceled) for current lifecycle state of the order
Wire value expired (expired) for current lifecycle state of the order
Wire value unknown (unknown) for current lifecycle state of the order
12@dataclass(frozen=True, slots=True, kw_only=True) 13class UpdateRequest(ApiRequest): 14 """Parameters accepted by the update 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 API contract schema: ``UpdateOrderRequest``. 21 """ 22 clear_payment_method: bool | UnsetType = field(default=UNSET) 23 """Whether clear payment method. Optional. Python type: ``bool``; wire name: ``clear_payment_method``; JSON type: boolean""" 24 custom_data: CustomData | UnsetType = field(default=UNSET) 25 """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)""" 26 invoice_settings: InvoiceSettingsInput | UnsetType = field(default=UNSET) 27 """Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: ``InvoiceSettingsInput``; wire name: ``invoice_settings``; JSON type: object (InvoiceSettings)""" 28 finalize: bool | UnsetType = field(default=UNSET) 29 """Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: ``bool``; wire name: ``finalize``; JSON type: boolean""" 30 line_items: list[LineItemInput] | UnsetType = field(default=UNSET) 31 """Items included in the order. Product line items may use inline product data, `product_id` with explicit `price`, or `product_id` with `price_id`. Optional. Python type: ``list[LineItemInput]``; wire name: ``line_items``; JSON type: array of object (LineItem) values. Constraints: minimum items 1""" 32 number: str | UnsetType = field(default=UNSET) 33 """Optional order number for reference. When omitted, Inttegro uses the generated order ID. Optional. Python type: ``str``; wire name: ``number``; JSON type: string""" 34 receipt_number: str | UnsetType = field(default=UNSET) 35 """Optional receipt number for downstream reconciliation. Uses the same length rules as `number`. Optional. Python type: ``str``; wire name: ``receipt_number``; JSON type: string""" 36 payment_method_data: UpdateOrderRequestPaymentMethodData | UnsetType = field(default=UNSET) 37 """New payment instrument details to use when executing payment for the order. Optional. Python type: ``UpdateOrderRequestPaymentMethodData``; wire name: ``payment_method_data``; JSON type: object (PaymentMethodData)""" 38 payment_method_id: str | UnsetType = field(default=UNSET) 39 """Identifier of the related payment method. Optional. Python type: ``str``; wire name: ``payment_method_id``; JSON type: string""" 40 statement_descriptor: str | UnsetType = field(default=UNSET) 41 """Optional statement descriptor shown on the customer's bank statement. Optional. Python type: ``str``; wire name: ``statement_descriptor``; JSON type: string. Constraints: maximum length 22""" 42 statement_descriptor_prefix: str | UnsetType = field(default=UNSET) 43 """Optional static prefix used to build the statement descriptor as `prefix*order_id`. Mutually exclusive with `statement_descriptor`. Optional. Python type: ``str``; wire name: ``statement_descriptor_prefix``; JSON type: string. Constraints: minimum length 2; maximum length 10""" 44 order_id: str 45 """Identifier of the related order. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string"""
Parameters accepted by the update 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.
API contract schema: UpdateOrderRequest.
Whether clear payment method. Optional. Python type: bool; wire name: clear_payment_method; JSON type: boolean
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)
Order-level invoice rendering data. Pages uses this data when rendering invoice web and download views. Optional. Python type: InvoiceSettingsInput; wire name: invoice_settings; JSON type: object (InvoiceSettings)
Whether to explicitly finalize the order. When true, the order is finalized regardless of payment state. When false or omitted, finalization follows default heuristics (finalize if payment is executable). Optional. Python type: bool; wire name: finalize; JSON type: boolean
Items included in the order. Product line items may use inline product data, product_id with explicit price, or product_id with price_id. Optional. Python type: list[LineItemInput]; wire name: line_items; JSON type: array of object (LineItem) values. Constraints: minimum items 1
Optional order number for reference. When omitted, Inttegro uses the generated order ID. Optional. Python type: str; wire name: number; JSON type: string
Optional receipt number for downstream reconciliation. Uses the same length rules as number. Optional. Python type: str; wire name: receipt_number; JSON type: string
New payment instrument details to use when executing payment for the order. Optional. Python type: UpdateOrderRequestPaymentMethodData; wire name: payment_method_data; JSON type: object (PaymentMethodData)
Identifier of the related payment method. Optional. Python type: str; wire name: payment_method_id; JSON type: string
Optional statement descriptor shown on the customer's bank statement. Optional. Python type: str; wire name: statement_descriptor; JSON type: string. Constraints: maximum length 22
Optional static prefix used to build the statement descriptor as prefix*order_id. Mutually exclusive with statement_descriptor. Optional. Python type: str; wire name: statement_descriptor_prefix; JSON type: string. Constraints: minimum length 2; maximum length 10
Identifier of the related order. Required. Python type: str; wire name: order_id; JSON type: string
13@dataclass(frozen=True, slots=True, kw_only=True) 14class UpdateRequestPaymentMethodData(ApiRequest): 15 """Payment instrument details for tokenization. 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 API contract schema: ``UpdateOrderRequestPaymentMethodData``. 22 """ 23 mobile_money: UpdateOrderRequestPaymentMethodDataMobileMoney | UnsetType = field(default=UNSET) 24 """Mobile money wallet details (required when type is mobile_money). Optional. Python type: ``UpdateOrderRequestPaymentMethodDataMobileMoney``; wire name: ``mobile_money``; JSON type: object""" 25 type: Literal['mobile_money', PaymentMethodType.MOBILE_MONEY] 26 """Payment rail type (currently only mobile_money supported). Required. Python type: ``Literal['mobile_money', PaymentMethodType.MOBILE_MONEY]``; wire name: ``type``; JSON type: string. Constraints: allowed values ``mobile_money``"""
Payment instrument details for tokenization.
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.
API contract schema: UpdateOrderRequestPaymentMethodData.
Mobile money wallet details (required when type is mobile_money). Optional. Python type: UpdateOrderRequestPaymentMethodDataMobileMoney; wire name: mobile_money; JSON type: object
Payment rail type (currently only mobile_money supported). Required. Python type: Literal['mobile_money', PaymentMethodType.MOBILE_MONEY]; wire name: type; JSON type: string. Constraints: allowed values mobile_money
13@dataclass(frozen=True, slots=True, kw_only=True) 14class UpdateRequestPaymentMethodDataMobileMoney(ApiRequest): 15 """Mobile money wallet details (required when type is mobile_money). 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 API contract schema: ``UpdateOrderRequestPaymentMethodDataMobileMoney``. 22 """ 23 network: Literal['airtel', 'mtn', 'telecel', 'vodafone', MobileMoneyNetwork.AIRTEL, MobileMoneyNetwork.MTN, MobileMoneyNetwork.TELECEL, MobileMoneyNetwork.VODAFONE] 24 """Mobile money network provider. Required. Python type: ``Literal['airtel', 'mtn', 'telecel', 'vodafone', MobileMoneyNetwork.AIRTEL, MobileMoneyNetwork.MTN, MobileMoneyNetwork.TELECEL, MobileMoneyNetwork.VODAFONE]``; wire name: ``network``; JSON type: string. Constraints: allowed values ``airtel``, ``mtn``, ``telecel``, ``vodafone``""" 25 account_number: str 26 """Mobile money account number (international or local format). Required. Python type: ``str``; wire name: ``account_number``; JSON type: string. The value must contain 10 to 15 digits and may begin with ``+``."""
Mobile money wallet details (required when type is mobile_money).
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.
API contract schema: UpdateOrderRequestPaymentMethodDataMobileMoney.
Mobile money network provider. Required. Python type: Literal['airtel', 'mtn', 'telecel', 'vodafone', MobileMoneyNetwork.AIRTEL, MobileMoneyNetwork.MTN, MobileMoneyNetwork.TELECEL, MobileMoneyNetwork.VODAFONE]; wire name: network; JSON type: string. Constraints: allowed values airtel, mtn, telecel, vodafone
Mobile money account number (international or local format). Required. Python type: str; wire name: account_number; JSON type: string. The value must contain 10 to 15 digits and may begin with +.