inttegro.refund

Models, requests, and enums for the Inttegro refund resource.

The primary returned object is inttegro.refund.Refund. 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 refund resource.
  2
  3The primary returned object is ``inttegro.refund.Refund``. 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 .cancel_request import CancelRequest as CancelRequest
 10    from .create_line_item_input import CreateLineItemInput as CreateLineItemInput
 11    from .create_request import CreateRequest as CreateRequest
 12    from .failure import Failure as Failure
 13    from .failure_reason import FailureReason as FailureReason
 14    from .line_item import LineItem as LineItem
 15    from .lookup_request import LookupRequest as LookupRequest
 16    from .offline_settlement import OfflineSettlement as OfflineSettlement
 17    from .order_fee_line_item import OrderFeeLineItem as OrderFeeLineItem
 18    from .order_fee_line_item_fee import OrderFeeLineItemFee as OrderFeeLineItemFee
 19    from .order_line_item import OrderLineItem as OrderLineItem
 20    from .order_product_line_item import OrderProductLineItem as OrderProductLineItem
 21    from .order_product_line_item_product import OrderProductLineItemProduct as OrderProductLineItemProduct
 22    from .order_shipping_line_item import OrderShippingLineItem as OrderShippingLineItem
 23    from .order_shipping_line_item_shipping import OrderShippingLineItemShipping as OrderShippingLineItemShipping
 24    from .page import Page as Page
 25    from .page_request import PageRequest as PageRequest
 26    from .page_response import PageResponse as PageResponse
 27    from .payment_method_settlement import PaymentMethodSettlement as PaymentMethodSettlement
 28    from .reason import Reason as Reason
 29    from .reason_input import ReasonInput as ReasonInput
 30    from .reason_value import ReasonValue as ReasonValue
 31    from .refund import Refund as Refund
 32    from .request_meta_input import RequestMetaInput as RequestMetaInput
 33    from .response import Response as Response
 34    from .settlement import Settlement as Settlement
 35    from .settlement_bank_account import SettlementBankAccount as SettlementBankAccount
 36    from .settlement_bank_account_payment_method import SettlementBankAccountPaymentMethod as SettlementBankAccountPaymentMethod
 37    from .settlement_ghana_bank_account import SettlementGhanaBankAccount as SettlementGhanaBankAccount
 38    from .settlement_mobile_money import SettlementMobileMoney as SettlementMobileMoney
 39    from .settlement_mobile_money_payment_method import SettlementMobileMoneyPaymentMethod as SettlementMobileMoneyPaymentMethod
 40    from .settlement_payment_method import SettlementPaymentMethod as SettlementPaymentMethod
 41    from .status import Status as Status
 42
 43
 44_EXPORTS: dict[str, tuple[str, str]] = {
 45    "CancelRequest": ("inttegro.refund.cancel_request", "CancelRequest"),
 46    "CreateLineItemInput": ("inttegro.refund.create_line_item_input", "CreateLineItemInput"),
 47    "CreateRequest": ("inttegro.refund.create_request", "CreateRequest"),
 48    "Failure": ("inttegro.refund.failure", "Failure"),
 49    "FailureReason": ("inttegro.refund.failure_reason", "FailureReason"),
 50    "LineItem": ("inttegro.refund.line_item", "LineItem"),
 51    "LookupRequest": ("inttegro.refund.lookup_request", "LookupRequest"),
 52    "OfflineSettlement": ("inttegro.refund.offline_settlement", "OfflineSettlement"),
 53    "OrderFeeLineItem": ("inttegro.refund.order_fee_line_item", "OrderFeeLineItem"),
 54    "OrderFeeLineItemFee": ("inttegro.refund.order_fee_line_item_fee", "OrderFeeLineItemFee"),
 55    "OrderLineItem": ("inttegro.refund.order_line_item", "OrderLineItem"),
 56    "OrderProductLineItem": ("inttegro.refund.order_product_line_item", "OrderProductLineItem"),
 57    "OrderProductLineItemProduct": ("inttegro.refund.order_product_line_item_product", "OrderProductLineItemProduct"),
 58    "OrderShippingLineItem": ("inttegro.refund.order_shipping_line_item", "OrderShippingLineItem"),
 59    "OrderShippingLineItemShipping": ("inttegro.refund.order_shipping_line_item_shipping", "OrderShippingLineItemShipping"),
 60    "Page": ("inttegro.refund.page", "Page"),
 61    "PageRequest": ("inttegro.refund.page_request", "PageRequest"),
 62    "PageResponse": ("inttegro.refund.page_response", "PageResponse"),
 63    "PaymentMethodSettlement": ("inttegro.refund.payment_method_settlement", "PaymentMethodSettlement"),
 64    "Reason": ("inttegro.refund.reason", "Reason"),
 65    "ReasonInput": ("inttegro.refund.reason_input", "ReasonInput"),
 66    "ReasonValue": ("inttegro.refund.reason_value", "ReasonValue"),
 67    "Refund": ("inttegro.refund.refund", "Refund"),
 68    "RequestMetaInput": ("inttegro.refund.request_meta_input", "RequestMetaInput"),
 69    "Response": ("inttegro.refund.response", "Response"),
 70    "Settlement": ("inttegro.refund.settlement", "Settlement"),
 71    "SettlementBankAccount": ("inttegro.refund.settlement_bank_account", "SettlementBankAccount"),
 72    "SettlementBankAccountPaymentMethod": ("inttegro.refund.settlement_bank_account_payment_method", "SettlementBankAccountPaymentMethod"),
 73    "SettlementGhanaBankAccount": ("inttegro.refund.settlement_ghana_bank_account", "SettlementGhanaBankAccount"),
 74    "SettlementMobileMoney": ("inttegro.refund.settlement_mobile_money", "SettlementMobileMoney"),
 75    "SettlementMobileMoneyPaymentMethod": ("inttegro.refund.settlement_mobile_money_payment_method", "SettlementMobileMoneyPaymentMethod"),
 76    "SettlementPaymentMethod": ("inttegro.refund.settlement_payment_method", "SettlementPaymentMethod"),
 77    "Status": ("inttegro.refund.status", "Status"),
 78}
 79
 80__all__ = [
 81    "CancelRequest",
 82    "CreateLineItemInput",
 83    "CreateRequest",
 84    "Failure",
 85    "FailureReason",
 86    "LineItem",
 87    "LookupRequest",
 88    "OfflineSettlement",
 89    "OrderFeeLineItem",
 90    "OrderFeeLineItemFee",
 91    "OrderLineItem",
 92    "OrderProductLineItem",
 93    "OrderProductLineItemProduct",
 94    "OrderShippingLineItem",
 95    "OrderShippingLineItemShipping",
 96    "Page",
 97    "PageRequest",
 98    "PageResponse",
 99    "PaymentMethodSettlement",
100    "Reason",
101    "ReasonInput",
102    "ReasonValue",
103    "Refund",
104    "RequestMetaInput",
105    "Response",
106    "Settlement",
107    "SettlementBankAccount",
108    "SettlementBankAccountPaymentMethod",
109    "SettlementGhanaBankAccount",
110    "SettlementMobileMoney",
111    "SettlementMobileMoneyPaymentMethod",
112    "SettlementPaymentMethod",
113    "Status",
114]
115
116
117def __getattr__(name: str) -> Any:
118    """Load a public resource type on first access."""
119    try:
120        module_name, attribute_name = _EXPORTS[name]
121    except KeyError:
122        raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
123    value = getattr(import_module(module_name), attribute_name)
124    globals()[name] = value
125    return value
@dataclass(frozen=True, slots=True, kw_only=True)
class CancelRequest(inttegro._request_base.ApiRequest):
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: ``CancelRefundRequest``.
21    """
22    reason: str | UnsetType = field(default=UNSET)
23    """Optional explanation for canceling the refund. Leading and trailing whitespace is removed. Optional. Python type: ``str``; wire name: ``reason``; JSON type: string. Constraints: minimum length 1; maximum length 2048"""
24    request_meta: RefundRequestMetaInput | UnsetType = field(default=UNSET)
25    """The request meta associated with this cancel request. Optional. Python type: ``RefundRequestMetaInput``; wire name: ``request_meta``; JSON type: object (RefundRequestMeta)"""
26    refund_id: str
27    """Refund to cancel before processing begins. Required. Python type: ``str``; wire name: ``refund_id``; JSON type: string"""

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: CancelRefundRequest.

CancelRequest( *, reason: str | inttegro._request_base.UnsetType = UNSET, request_meta: RequestMetaInput | inttegro._request_base.UnsetType = UNSET, refund_id: str)
reason: str | inttegro._request_base.UnsetType

Optional explanation for canceling the refund. Leading and trailing whitespace is removed. Optional. Python type: str; wire name: reason; JSON type: string. Constraints: minimum length 1; maximum length 2048

request_meta: RequestMetaInput | inttegro._request_base.UnsetType

The request meta associated with this cancel request. Optional. Python type: RefundRequestMetaInput; wire name: request_meta; JSON type: object (RefundRequestMeta)

refund_id: str

Refund to cancel before processing begins. Required. Python type: str; wire name: refund_id; JSON type: string

@dataclass(frozen=True, slots=True, kw_only=True)
class CreateLineItemInput(inttegro._request_base.ApiRequest):
13@dataclass(frozen=True, slots=True, kw_only=True)
14class CreateLineItemInput(ApiRequest):
15    """Parameters accepted by the create line item input operation.
16
17    This is an immutable, keyword-only request object. ``to_dict()`` uses
18    the documented wire names, omits fields left as ``UNSET``, serializes
19    string-backed enums by value, and requires timezone-aware datetimes.
20
21    API contract schema: ``CreateRefundLineItemInput``.
22    """
23    reason: RefundReasonInput | UnsetType = field(default=UNSET)
24    """The reason associated with this create line item input. Optional. Python type: ``RefundReasonInput``; wire name: ``reason``; JSON type: object (RefundReason)"""
25    reason_details: str | UnsetType = field(default=UNSET)
26    """Line-specific explanation. Requires a line-level reason; required when that reason is `custom`. Optional. Python type: ``str``; wire name: ``reason_details``; JSON type: string. Constraints: maximum length 2048"""
27    order_line_item_id: str
28    """Strong identifier for the paid order line item being refunded. Required. Python type: ``str``; wire name: ``order_line_item_id``; JSON type: string"""
29    refund_amount: AmountParams
30    """Monetary refund amount, represented by a currency and an integer minor-unit value. Required. Python type: ``AmountParams``; wire name: ``refund_amount``; JSON type: object (AmountParams)"""

Parameters accepted by the create line item input operation.

This is an immutable, keyword-only request object. to_dict() uses the documented wire names, omits fields left as UNSET, serializes string-backed enums by value, and requires timezone-aware datetimes.

API contract schema: CreateRefundLineItemInput.

CreateLineItemInput( *, reason: Union[Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom', <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>, <Reason.DUPLICATE: 'duplicate'>, <Reason.FRAUDULENT: 'fraudulent'>, <Reason.ORDER_CANCELED: 'order_canceled'>, <Reason.ITEM_RETURNED: 'item_returned'>, <Reason.ITEM_DAMAGED: 'item_damaged'>, <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>, <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>, <Reason.CUSTOM: 'custom'>], inttegro._request_base.UnsetType] = UNSET, reason_details: str | inttegro._request_base.UnsetType = UNSET, order_line_item_id: str, refund_amount: inttegro.money.AmountParams)
reason: Union[Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom', <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>, <Reason.DUPLICATE: 'duplicate'>, <Reason.FRAUDULENT: 'fraudulent'>, <Reason.ORDER_CANCELED: 'order_canceled'>, <Reason.ITEM_RETURNED: 'item_returned'>, <Reason.ITEM_DAMAGED: 'item_damaged'>, <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>, <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>, <Reason.CUSTOM: 'custom'>], inttegro._request_base.UnsetType]

The reason associated with this create line item input. Optional. Python type: RefundReasonInput; wire name: reason; JSON type: object (RefundReason)

reason_details: str | inttegro._request_base.UnsetType

Line-specific explanation. Requires a line-level reason; required when that reason is custom. Optional. Python type: str; wire name: reason_details; JSON type: string. Constraints: maximum length 2048

order_line_item_id: str

Strong identifier for the paid order line item being refunded. Required. Python type: str; wire name: order_line_item_id; JSON type: string

Monetary refund amount, represented by a currency and an integer minor-unit value. Required. Python type: AmountParams; wire name: refund_amount; JSON type: object (AmountParams)

@dataclass(frozen=True, slots=True, kw_only=True)
class CreateRequest(inttegro._request_base.ApiRequest):
12@dataclass(frozen=True, slots=True, kw_only=True)
13class CreateRequest(ApiRequest):
14    """Parameters accepted by the create 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: ``CreateRefundRequest``.
21    """
22    custom_data: CustomData | UnsetType = field(default=UNSET)
23    """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)"""
24    reason_details: str | UnsetType = field(default=UNSET)
25    """Overall explanation. Required when `reason` is `custom`. Optional. Python type: ``str``; wire name: ``reason_details``; JSON type: string. Constraints: maximum length 2048"""
26    reference: str | UnsetType = field(default=UNSET)
27    """Your reconciliation reference. Optional. Python type: ``str``; wire name: ``reference``; JSON type: string. Constraints: maximum length 256"""
28    request_meta: RefundRequestMetaInput | UnsetType = field(default=UNSET)
29    """The request meta associated with this create request. Optional. Python type: ``RefundRequestMetaInput``; wire name: ``request_meta``; JSON type: object (RefundRequestMeta)"""
30    line_items: list[CreateRefundLineItemInput]
31    """The line items associated with this create request. Required. Python type: ``list[CreateRefundLineItemInput]``; wire name: ``line_items``; JSON type: array of object (CreateRefundLineItem) values. Constraints: minimum items 1; maximum items 64"""
32    order_id: str
33    """Paid order to refund. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string"""
34    reason: RefundReasonInput
35    """The reason associated with this create request. Required. Python type: ``RefundReasonInput``; wire name: ``reason``; JSON type: object (RefundReason)"""

Parameters accepted by the create 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: CreateRefundRequest.

CreateRequest( *, custom_data: inttegro.CustomData | inttegro._request_base.UnsetType = UNSET, reason_details: str | inttegro._request_base.UnsetType = UNSET, reference: str | inttegro._request_base.UnsetType = UNSET, request_meta: RequestMetaInput | inttegro._request_base.UnsetType = UNSET, line_items: list[CreateLineItemInput], order_id: str, reason: Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom', <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>, <Reason.DUPLICATE: 'duplicate'>, <Reason.FRAUDULENT: 'fraudulent'>, <Reason.ORDER_CANCELED: 'order_canceled'>, <Reason.ITEM_RETURNED: 'item_returned'>, <Reason.ITEM_DAMAGED: 'item_damaged'>, <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>, <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>, <Reason.CUSTOM: 'custom'>])
custom_data: inttegro.CustomData | inttegro._request_base.UnsetType

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)

reason_details: str | inttegro._request_base.UnsetType

Overall explanation. Required when reason is custom. Optional. Python type: str; wire name: reason_details; JSON type: string. Constraints: maximum length 2048

reference: str | inttegro._request_base.UnsetType

Your reconciliation reference. Optional. Python type: str; wire name: reference; JSON type: string. Constraints: maximum length 256

request_meta: RequestMetaInput | inttegro._request_base.UnsetType

The request meta associated with this create request. Optional. Python type: RefundRequestMetaInput; wire name: request_meta; JSON type: object (RefundRequestMeta)

line_items: list[CreateLineItemInput]

The line items associated with this create request. Required. Python type: list[CreateRefundLineItemInput]; wire name: line_items; JSON type: array of object (CreateRefundLineItem) values. Constraints: minimum items 1; maximum items 64

order_id: str

Paid order to refund. Required. Python type: str; wire name: order_id; JSON type: string

reason: Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom', <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>, <Reason.DUPLICATE: 'duplicate'>, <Reason.FRAUDULENT: 'fraudulent'>, <Reason.ORDER_CANCELED: 'order_canceled'>, <Reason.ITEM_RETURNED: 'item_returned'>, <Reason.ITEM_DAMAGED: 'item_damaged'>, <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>, <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>, <Reason.CUSTOM: 'custom'>]

The reason associated with this create request. Required. Python type: RefundReasonInput; wire name: reason; JSON type: object (RefundReason)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Failure(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class Failure(ApiModel):
14    """Sanitized terminal refund failure information."""
15
16    detail: str = field(init=False)
17    """Safe merchant-facing explanation. Required. Python type: ``str``; wire name: ``detail``; JSON type: string"""
18    reason: RefundFailureReason = field(init=False)
19    """Stable caller-safe failure reason. Required. Python type: ``RefundFailureReason``; wire name: ``reason``; JSON type: string enum"""
20    retryable: bool = field(init=False)
21    """Whether the underlying condition may be resolved. Required. Python type: ``bool``; wire name: ``retryable``; JSON type: boolean"""

Sanitized terminal refund failure information.

detail: str

Safe merchant-facing explanation. Required. Python type: str; wire name: detail; JSON type: string

reason: FailureReason

Stable caller-safe failure reason. Required. Python type: RefundFailureReason; wire name: reason; JSON type: string enum

retryable: bool

Whether the underlying condition may be resolved. Required. Python type: bool; wire name: retryable; JSON type: boolean

class FailureReason(inttegro._enum_base.WireEnum):
11class FailureReason(WireEnum):
12    """Stable, caller-safe reason that terminal refund processing failed."""
13
14    INSUFFICIENT_BALANCE = "insufficient_balance"
15    """Wire value ``insufficient_balance``"""
16    ORIGINAL_PAYMENT_METHOD_UNAVAILABLE = "original_payment_method_unavailable"
17    """Wire value ``original_payment_method_unavailable``"""
18    ORIGINAL_PAYMENT_NOT_REFUNDABLE = "original_payment_not_refundable"
19    """Wire value ``original_payment_not_refundable``"""
20    REFUND_NOT_SUPPORTED = "refund_not_supported"
21    """Wire value ``refund_not_supported``"""
22    AMOUNT_NOT_SUPPORTED = "amount_not_supported"
23    """Wire value ``amount_not_supported``"""
24    REFUND_DECLINED = "refund_declined"
25    """Wire value ``refund_declined``"""
26    REFUND_NOT_PERMITTED = "refund_not_permitted"
27    """Wire value ``refund_not_permitted``"""
28    TEMPORARILY_UNAVAILABLE = "temporarily_unavailable"
29    """Wire value ``temporarily_unavailable``"""
30    UNKNOWN = "unknown"
31    """Wire value ``unknown``"""

Stable, caller-safe reason that terminal refund processing failed.

INSUFFICIENT_BALANCE = <FailureReason.INSUFFICIENT_BALANCE: 'insufficient_balance'>

Wire value insufficient_balance

ORIGINAL_PAYMENT_METHOD_UNAVAILABLE = <FailureReason.ORIGINAL_PAYMENT_METHOD_UNAVAILABLE: 'original_payment_method_unavailable'>

Wire value original_payment_method_unavailable

ORIGINAL_PAYMENT_NOT_REFUNDABLE = <FailureReason.ORIGINAL_PAYMENT_NOT_REFUNDABLE: 'original_payment_not_refundable'>

Wire value original_payment_not_refundable

REFUND_NOT_SUPPORTED = <FailureReason.REFUND_NOT_SUPPORTED: 'refund_not_supported'>

Wire value refund_not_supported

AMOUNT_NOT_SUPPORTED = <FailureReason.AMOUNT_NOT_SUPPORTED: 'amount_not_supported'>

Wire value amount_not_supported

REFUND_DECLINED = <FailureReason.REFUND_DECLINED: 'refund_declined'>

Wire value refund_declined

REFUND_NOT_PERMITTED = <FailureReason.REFUND_NOT_PERMITTED: 'refund_not_permitted'>

Wire value refund_not_permitted

TEMPORARILY_UNAVAILABLE = <FailureReason.TEMPORARILY_UNAVAILABLE: 'temporarily_unavailable'>

Wire value temporarily_unavailable

UNKNOWN = <FailureReason.UNKNOWN: 'unknown'>

Wire value unknown

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class LineItem(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class LineItem(ApiModel):
15    """Typed line item data in the refund 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: ``RefundLineItem``.
24    """
25    id: str = field(init=False)
26    """Server-generated refund line-item identifier. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
27    order_line_item_id: str = field(init=False)
28    """Deprecated compatibility identifier. Use ``order_line_item.id`` when available. Required. Python type: ``str``; wire name: ``order_line_item_id``; JSON type: string"""
29    order_line_item: RefundOrderLineItem | None = field(init=False)
30    """Immutable display snapshot of the refunded order line. Optional; nullable. Python type: ``RefundOrderLineItem | None``; wire name: ``order_line_item``; JSON type: object (RefundOrderLineItem)"""
31    original_amount_paid: Amount = field(init=False)
32    """Monetary original amount paid, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``original_amount_paid``; JSON type: object (Amount)"""
33    reason: RefundReasonValue | None = field(init=False)
34    """The reason associated with this line item. Optional; nullable. Python type: ``RefundReasonValue | None``; wire name: ``reason``; JSON type: object (RefundReason)"""
35    reason_details: str | None = field(init=False)
36    """The reason details associated with this line item. Optional; nullable. Python type: ``str | None``; wire name: ``reason_details``; JSON type: string. Constraints: maximum length 2048"""
37    refund_amount: Amount = field(init=False)
38    """Monetary refund amount, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``refund_amount``; JSON type: object (Amount)"""

Typed line item data in the refund 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: RefundLineItem.

id: str

Server-generated refund line-item identifier. Required. Python type: str; wire name: id; JSON type: string

order_line_item_id: str

Deprecated compatibility identifier. Use order_line_item.id when available. Required. Python type: str; wire name: order_line_item_id; JSON type: string

Immutable display snapshot of the refunded order line. Optional; nullable. Python type: RefundOrderLineItem | None; wire name: order_line_item; JSON type: object (RefundOrderLineItem)

original_amount_paid: inttegro.money.Amount

Monetary original amount paid, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: original_amount_paid; JSON type: object (Amount)

reason: Optional[Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom']]

The reason associated with this line item. Optional; nullable. Python type: RefundReasonValue | None; wire name: reason; JSON type: object (RefundReason)

reason_details: str | None

The reason details associated with this line item. Optional; nullable. Python type: str | None; wire name: reason_details; JSON type: string. Constraints: maximum length 2048

refund_amount: inttegro.money.Amount

Monetary refund amount, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: refund_amount; JSON type: object (Amount)

@dataclass(frozen=True, slots=True, kw_only=True)
class LookupRequest(inttegro._request_base.ApiRequest):
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: ``LookupRefundRequest``.
21    """
22    refund_id: str
23    """Refund identifier to retrieve. Required. Python type: ``str``; wire name: ``refund_id``; JSON type: string"""

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: LookupRefundRequest.

LookupRequest(*, refund_id: str)
refund_id: str

Refund identifier to retrieve. Required. Python type: str; wire name: refund_id; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OfflineSettlement(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class OfflineSettlement(ApiModel):
13    """A refund for an order paid outside Inttegro."""
14
15    type: Literal["offline"] = field(init=False)
16    """Settlement discriminator. Required; always ``offline``."""
17
18    _strict_wire_shape = True

A refund for an order paid outside Inttegro.

type: Literal['offline']

Settlement discriminator. Required; always offline.

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderFeeLineItem(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class OrderFeeLineItem(ApiModel):
14    """Immutable fee line captured from the originating order."""
15
16    id: str = field(init=False)
17    type: Literal["fee"] = field(init=False)
18    fee: OrderFeeLineItemFee = field(init=False)

Immutable fee line captured from the originating order.

id: str
type: Literal['fee']
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderFeeLineItemFee(inttegro._model_base.ApiModel):
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
11class OrderFeeLineItemFee(ApiModel):
12    """Descriptive fee fields captured by the order."""
13
14    label: str | None = field(init=False)
15    description: str | None = field(init=False)

Descriptive fee fields captured by the order.

label: str | None
description: str | None
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderProductLineItem(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class OrderProductLineItem(ApiModel):
14    """Immutable product line captured from the originating order."""
15
16    id: str = field(init=False)
17    type: Literal["product"] = field(init=False)
18    quantity: int = field(init=False)
19    product: OrderProductLineItemProduct = field(init=False)

Immutable product line captured from the originating order.

id: str
type: Literal['product']
quantity: int
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderProductLineItemProduct(inttegro._model_base.ApiModel):
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
11class OrderProductLineItemProduct(ApiModel):
12    """Catalog or inline product identity captured by the order."""
13
14    id: str | None = field(init=False)
15    name: str = field(init=False)

Catalog or inline product identity captured by the order.

id: str | None
name: str
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderShippingLineItem(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class OrderShippingLineItem(ApiModel):
14    """Immutable shipping line captured from the originating order."""
15
16    id: str = field(init=False)
17    type: Literal["shipping"] = field(init=False)
18    shipping: OrderShippingLineItemShipping = field(init=False)

Immutable shipping line captured from the originating order.

id: str
type: Literal['shipping']
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class OrderShippingLineItemShipping(inttegro._model_base.ApiModel):
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
11class OrderShippingLineItemShipping(ApiModel):
12    """Descriptive shipping fields captured by the order."""
13
14    label: str | None = field(init=False)
15    description: str | None = field(init=False)

Descriptive shipping fields captured by the order.

label: str | None
description: str | None
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Page(inttegro._model_base.ApiModel):
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: ``RefundPage``.
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. Constraints: minimum 1"""
26    refunds: list[Refund] = field(init=False)
27    """The refunds associated with this page. Required. Python type: ``list[Refund]``; wire name: ``refunds``; JSON type: array of object (Refund) values"""
28    size: int = field(init=False)
29    """Number of refunds returned in this page. Required. Python type: ``int``; wire name: ``size``; JSON type: integer. Constraints: minimum 0"""

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: RefundPage.

number: int

Human-readable number assigned to the page. Required. Python type: int; wire name: number; JSON type: integer. Constraints: minimum 1

refunds: list[Refund]

The refunds associated with this page. Required. Python type: list[Refund]; wire name: refunds; JSON type: array of object (Refund) values

size: int

Number of refunds returned in this page. Required. Python type: int; wire name: size; JSON type: integer. Constraints: minimum 0

@dataclass(frozen=True, slots=True, kw_only=True)
class PageRequest(inttegro._request_base.ApiRequest):
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: ``PageRefundsRequest``.
21    """
22    page_size: int | UnsetType = field(default=UNSET)
23    """Maximum number of refunds to return. Optional. Python type: ``int``; wire name: ``page_size``; JSON type: integer. Constraints: minimum 1; maximum 256"""
24    page_number: int
25    """One-based page number. Required. Python type: ``int``; wire name: ``page_number``; JSON type: integer. Constraints: minimum 1; maximum 10"""

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: PageRefundsRequest.

PageRequest( *, page_size: int | inttegro._request_base.UnsetType = UNSET, page_number: int)
page_size: int | inttegro._request_base.UnsetType

Maximum number of refunds to return. Optional. Python type: int; wire name: page_size; JSON type: integer. Constraints: minimum 1; maximum 256

page_number: int

One-based page number. Required. Python type: int; wire name: page_number; JSON type: integer. Constraints: minimum 1; maximum 10

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PageResponse(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class PageResponse(ApiModel):
14    """Typed response returned by the page operation.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``RefundPageResponse``.
23    """
24    page: RefundPage = field(init=False)
25    """Numeric page used by this operation. Required. Python type: ``RefundPage``; wire name: ``page``; JSON type: object (RefundPage)"""

Typed response returned by the page operation.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: RefundPageResponse.

page: Page

Numeric page used by this operation. Required. Python type: RefundPage; wire name: page; JSON type: object (RefundPage)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class PaymentMethodSettlement(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class PaymentMethodSettlement(ApiModel):
13    """A refund returned to the original payment method."""
14
15    type: Literal["payment_method"] = field(init=False)
16    """Settlement discriminator. Required; always ``payment_method``."""
17    payment_method: SettlementPaymentMethod = field(init=False)
18    """Caller-safe immutable snapshot of the original payment method."""
19
20    _strict_wire_shape = True

A refund returned to the original payment method.

type: Literal['payment_method']

Settlement discriminator. Required; always payment_method.

Caller-safe immutable snapshot of the original payment method.

class Reason(inttegro._enum_base.WireEnum):
11class Reason(WireEnum):
12    """Typed reason data in the refund 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: ``RefundReason``.
18    """
19    REQUESTED_BY_CUSTOMER = "requested_by_customer"
20    """Wire value ``requested_by_customer`` (requested by customer)"""
21    DUPLICATE = "duplicate"
22    """Wire value ``duplicate`` (duplicate)"""
23    FRAUDULENT = "fraudulent"
24    """Wire value ``fraudulent`` (fraudulent)"""
25    ORDER_CANCELED = "order_canceled"
26    """Wire value ``order_canceled`` (order canceled)"""
27    ITEM_RETURNED = "item_returned"
28    """Wire value ``item_returned`` (item returned)"""
29    ITEM_DAMAGED = "item_damaged"
30    """Wire value ``item_damaged`` (item damaged)"""
31    ITEM_NOT_RECEIVED = "item_not_received"
32    """Wire value ``item_not_received`` (item not received)"""
33    ITEM_NOT_AS_DESCRIBED = "item_not_as_described"
34    """Wire value ``item_not_as_described`` (item not as described)"""
35    CUSTOM = "custom"
36    """Wire value ``custom`` (custom)"""

Typed reason data in the refund 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: RefundReason.

REQUESTED_BY_CUSTOMER = <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>

Wire value requested_by_customer (requested by customer)

DUPLICATE = <Reason.DUPLICATE: 'duplicate'>

Wire value duplicate (duplicate)

FRAUDULENT = <Reason.FRAUDULENT: 'fraudulent'>

Wire value fraudulent (fraudulent)

ORDER_CANCELED = <Reason.ORDER_CANCELED: 'order_canceled'>

Wire value order_canceled (order canceled)

ITEM_RETURNED = <Reason.ITEM_RETURNED: 'item_returned'>

Wire value item_returned (item returned)

ITEM_DAMAGED = <Reason.ITEM_DAMAGED: 'item_damaged'>

Wire value item_damaged (item damaged)

ITEM_NOT_RECEIVED = <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>

Wire value item_not_received (item not received)

ITEM_NOT_AS_DESCRIBED = <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>

Wire value item_not_as_described (item not as described)

CUSTOM = <Reason.CUSTOM: 'custom'>

Wire value custom (custom)

ReasonInput = typing.Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom', <Reason.REQUESTED_BY_CUSTOMER: 'requested_by_customer'>, <Reason.DUPLICATE: 'duplicate'>, <Reason.FRAUDULENT: 'fraudulent'>, <Reason.ORDER_CANCELED: 'order_canceled'>, <Reason.ITEM_RETURNED: 'item_returned'>, <Reason.ITEM_DAMAGED: 'item_damaged'>, <Reason.ITEM_NOT_RECEIVED: 'item_not_received'>, <Reason.ITEM_NOT_AS_DESCRIBED: 'item_not_as_described'>, <Reason.CUSTOM: 'custom'>]
ReasonValue = typing.Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom']
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Refund(inttegro._model_base.ApiModel):
15@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
16class Refund(ApiModel):
17    """Typed refund data in the refund resource namespace.
18
19    Instances are immutable API responses. ``from_dict()`` decodes nested
20    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
21    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
22    Fields not returned by the API remain absent and can still be queried
23    through mapping-style access.
24    """
25    cancel_reason: str | None = field(init=False)
26    """Omitted unless a reason was supplied when the refund was canceled. Optional; nullable. Python type: ``str | None``; wire name: ``cancel_reason``; JSON type: string"""
27    canceled_at: datetime | None = field(init=False)
28    """Omitted unless the refund was canceled before processing began. Optional; nullable. Python type: ``datetime | None``; wire name: ``canceled_at``; JSON type: string (date-time)"""
29    created_at: datetime = field(init=False)
30    """When the refund was created. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)"""
31    custom_data: CustomData | None = field(init=False)
32    """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)"""
33    failed_at: datetime | None = field(init=False)
34    """Omitted unless processing failed. Optional; nullable. Python type: ``datetime | None``; wire name: ``failed_at``; JSON type: string (date-time)"""
35    failure: RefundFailure | None = field(init=False)
36    """Sanitized terminal failure information. Optional; nullable. Python type: ``RefundFailure | None``; wire name: ``failure``; JSON type: object (RefundFailure)"""
37    id: str = field(init=False)
38    """Unique identifier for this refund. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
39    line_items: list[RefundLineItem] = field(init=False)
40    """One or more immutable line-level refund allocations. Required. Python type: ``list[RefundLineItem]``; wire name: ``line_items``; JSON type: array of object (RefundLineItem) values"""
41    order_id: str = field(init=False)
42    """Identifier of the related order. Required. Python type: ``str``; wire name: ``order_id``; JSON type: string"""
43    order_amount: Amount | None = field(init=False)
44    """Total amount of the originating order captured when the refund was created. Optional; nullable. Python type: ``Amount | None``; wire name: ``order_amount``; JSON type: object (Amount)"""
45    processing_at: datetime | None = field(init=False)
46    """Omitted until processing starts. Optional; nullable. Python type: ``datetime | None``; wire name: ``processing_at``; JSON type: string (date-time)"""
47    reason: RefundReasonValue = field(init=False)
48    """The reason associated with this refund. Required. Python type: ``RefundReasonValue``; wire name: ``reason``; JSON type: object (RefundReason)"""
49    reason_details: str | None = field(init=False)
50    """The reason details associated with this refund. Optional; nullable. Python type: ``str | None``; wire name: ``reason_details``; JSON type: string. Constraints: maximum length 2048"""
51    reference: str | None = field(init=False)
52    """Merchant-defined external reference for the refund. Optional; nullable. Python type: ``str | None``; wire name: ``reference``; JSON type: string"""
53    settlement: RefundSettlement = field(init=False)
54    """Immutable refund destination. Required. Python type: ``RefundSettlement``; wire name: ``settlement``; JSON type: object (RefundSettlement) selected by the required ``type`` discriminator"""
55    status: Literal['canceled', 'failed', 'pending', 'processing', 'succeeded'] = field(init=False)
56    """Current lifecycle status of the refund. Required. Python type: ``Literal['canceled', 'failed', 'pending', 'processing', 'succeeded']``; wire name: ``status``; JSON type: string. Constraints: allowed values ``canceled``, ``failed``, ``pending``, ``processing``, ``succeeded``"""
57    succeeded_at: datetime | None = field(init=False)
58    """Omitted unless processing succeeded. Optional; nullable. Python type: ``datetime | None``; wire name: ``succeeded_at``; JSON type: string (date-time)"""
59    total: Amount = field(init=False)
60    """Monetary total, represented by a currency and an integer minor-unit value. Required. Python type: ``Amount``; wire name: ``total``; JSON type: object (Amount)"""

Typed refund data in the refund 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.

cancel_reason: str | None

Omitted unless a reason was supplied when the refund was canceled. Optional; nullable. Python type: str | None; wire name: cancel_reason; JSON type: string

canceled_at: datetime.datetime | None

Omitted unless the refund was canceled before processing began. Optional; nullable. Python type: datetime | None; wire name: canceled_at; JSON type: string (date-time)

created_at: datetime.datetime

When the refund was created. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)

custom_data: inttegro.CustomData | None

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)

failed_at: datetime.datetime | None

Omitted unless processing failed. Optional; nullable. Python type: datetime | None; wire name: failed_at; JSON type: string (date-time)

failure: Failure | None

Sanitized terminal failure information. Optional; nullable. Python type: RefundFailure | None; wire name: failure; JSON type: object (RefundFailure)

id: str

Unique identifier for this refund. Required. Python type: str; wire name: id; JSON type: string

line_items: list[LineItem]

One or more immutable line-level refund allocations. Required. Python type: list[RefundLineItem]; wire name: line_items; JSON type: array of object (RefundLineItem) values

order_id: str

Identifier of the related order. Required. Python type: str; wire name: order_id; JSON type: string

order_amount: inttegro.money.Amount | None

Total amount of the originating order captured when the refund was created. Optional; nullable. Python type: Amount | None; wire name: order_amount; JSON type: object (Amount)

processing_at: datetime.datetime | None

Omitted until processing starts. Optional; nullable. Python type: datetime | None; wire name: processing_at; JSON type: string (date-time)

reason: Literal['requested_by_customer', 'duplicate', 'fraudulent', 'order_canceled', 'item_returned', 'item_damaged', 'item_not_received', 'item_not_as_described', 'custom']

The reason associated with this refund. Required. Python type: RefundReasonValue; wire name: reason; JSON type: object (RefundReason)

reason_details: str | None

The reason details associated with this refund. Optional; nullable. Python type: str | None; wire name: reason_details; JSON type: string. Constraints: maximum length 2048

reference: str | None

Merchant-defined external reference for the refund. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string

Immutable refund destination. Required. Python type: RefundSettlement; wire name: settlement; JSON type: object (RefundSettlement) selected by the required type discriminator

status: Literal['canceled', 'failed', 'pending', 'processing', 'succeeded']

Current lifecycle status of the refund. Required. Python type: Literal['canceled', 'failed', 'pending', 'processing', 'succeeded']; wire name: status; JSON type: string. Constraints: allowed values canceled, failed, pending, processing, succeeded

succeeded_at: datetime.datetime | None

Omitted unless processing succeeded. Optional; nullable. Python type: datetime | None; wire name: succeeded_at; JSON type: string (date-time)

Monetary total, represented by a currency and an integer minor-unit value. Required. Python type: Amount; wire name: total; JSON type: object (Amount)

@dataclass(frozen=True, slots=True, kw_only=True)
class RequestMetaInput(inttegro._request_base.ApiRequest):
13@dataclass(frozen=True, slots=True, kw_only=True)
14class RequestMetaInput(ApiRequest):
15    """Parameters accepted by the request meta input operation.
16
17    This is an immutable, keyword-only request object. ``to_dict()`` uses
18    the documented wire names, omits fields left as ``UNSET``, serializes
19    string-backed enums by value, and requires timezone-aware datetimes.
20
21    API contract schema: ``RefundRequestMetaInput``.
22    """
23    idempotency_key: str | UnsetType = field(default=UNSET)
24    """Stable retry key carried inside ``request_meta``. It must match the ``Idempotency-Key`` header when both are provided. Optional. Python type: ``str``; wire name: ``idempotency_key``; JSON type: string. Constraints: minimum length 1; maximum length 255"""
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)"""

Parameters accepted by the request meta 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: RefundRequestMetaInput.

RequestMetaInput( *, idempotency_key: str | inttegro._request_base.UnsetType = UNSET, response: Response | inttegro._request_base.UnsetType = UNSET)
idempotency_key: str | inttegro._request_base.UnsetType

Stable retry key carried inside request_meta. It must match the Idempotency-Key header when both are provided. Optional. Python type: str; wire name: idempotency_key; JSON type: string. Constraints: minimum length 1; maximum length 255

response: Response | inttegro._request_base.UnsetType

Optional typed selection of public response properties. Python type: Response; wire name: response; JSON type: object (RequestResponse)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Response(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class Response(ApiModel):
14    """Typed response returned by the response operation.
15
16    Instances are immutable API responses. ``from_dict()`` decodes nested
17    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
18    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
19    Fields not returned by the API remain absent and can still be queried
20    through mapping-style access.
21
22    API contract schema: ``RefundResponse``.
23    """
24    refund: Refund = field(init=False)
25    """The refund associated with this response. Required. Python type: ``Refund``; wire name: ``refund``; JSON type: object (Refund)"""

Typed response returned by the response operation.

Instances are immutable API responses. from_dict() decodes nested objects, string-backed enums, and timezone-aware ISO-8601 timestamps; to_dict() returns the corresponding JSON-compatible wire shape. Fields not returned by the API remain absent and can still be queried through mapping-style access.

API contract schema: RefundResponse.

refund: Refund

The refund associated with this response. Required. Python type: Refund; wire name: refund; JSON type: object (Refund)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SettlementBankAccount(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class SettlementBankAccount(ApiModel):
13    """Supported bank-account subtype and its masked details."""
14
15    type: Literal["ghana_bank_account"] = field(init=False)
16    ghana_bank_account: SettlementGhanaBankAccount = field(init=False)
17
18    _strict_wire_shape = True

Supported bank-account subtype and its masked details.

type: Literal['ghana_bank_account']
ghana_bank_account: SettlementGhanaBankAccount
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SettlementBankAccountPaymentMethod(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class SettlementBankAccountPaymentMethod(ApiModel):
13    """Safe snapshot of the original bank-account method."""
14
15    id: str = field(init=False)
16    """Public payment-method identifier."""
17    type: Literal["bank_account"] = field(init=False)
18    """Payment-method discriminator. Required; always ``bank_account``."""
19    bank_account: SettlementBankAccount = field(init=False)
20    """Masked bank-account recognition details."""
21
22    _strict_wire_shape = True

Safe snapshot of the original bank-account method.

id: str

Public payment-method identifier.

type: Literal['bank_account']

Payment-method discriminator. Required; always bank_account.

bank_account: SettlementBankAccount

Masked bank-account recognition details.

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SettlementGhanaBankAccount(inttegro._model_base.ApiModel):
10@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
11class SettlementGhanaBankAccount(ApiModel):
12    """Masked bank details; no raw account value is exposed."""
13
14    account_number: str = field(init=False)
15    """Masked account in ``****1234`` form."""
16    last4: str = field(init=False)
17    """Final four numeric digits."""
18
19    _strict_wire_shape = True

Masked bank details; no raw account value is exposed.

account_number: str

Masked account in ****1234 form.

last4: str

Final four numeric digits.

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SettlementMobileMoney(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class SettlementMobileMoney(ApiModel):
13    """Masked mobile-money details; no raw account value is exposed."""
14
15    network: Literal["airtel", "mtn", "telecel", "vodafone"] = field(init=False)
16    account_number: str = field(init=False)
17    """Masked account in ``****1234`` form."""
18    last4: str = field(init=False)
19    """Final four numeric digits."""
20
21    _strict_wire_shape = True

Masked mobile-money details; no raw account value is exposed.

network: Literal['airtel', 'mtn', 'telecel', 'vodafone']
account_number: str

Masked account in ****1234 form.

last4: str

Final four numeric digits.

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SettlementMobileMoneyPaymentMethod(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class SettlementMobileMoneyPaymentMethod(ApiModel):
13    """Safe snapshot of the original mobile-money method."""
14
15    id: str = field(init=False)
16    """Public payment-method identifier."""
17    type: Literal["mobile_money"] = field(init=False)
18    """Payment-method discriminator. Required; always ``mobile_money``."""
19    mobile_money: SettlementMobileMoney = field(init=False)
20    """Masked mobile-money recognition details."""
21
22    _strict_wire_shape = True

Safe snapshot of the original mobile-money method.

id: str

Public payment-method identifier.

type: Literal['mobile_money']

Payment-method discriminator. Required; always mobile_money.

mobile_money: SettlementMobileMoney

Masked mobile-money recognition details.

class Status(inttegro._enum_base.WireEnum):
11class Status(WireEnum):
12    """Typed status data in the refund 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: ``RefundStatus``.
18    """
19    CANCELED = "canceled"
20    """Wire value ``canceled`` (canceled)"""
21    FAILED = "failed"
22    """Wire value ``failed`` (failed)"""
23    PENDING = "pending"
24    """Wire value ``pending`` (pending)"""
25    PROCESSING = "processing"
26    """Wire value ``processing`` (processing)"""
27    SUCCEEDED = "succeeded"
28    """Wire value ``succeeded`` (succeeded)"""

Typed status data in the refund 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: RefundStatus.

CANCELED = <Status.CANCELED: 'canceled'>

Wire value canceled (canceled)

FAILED = <Status.FAILED: 'failed'>

Wire value failed (failed)

PENDING = <Status.PENDING: 'pending'>

Wire value pending (pending)

PROCESSING = <Status.PROCESSING: 'processing'>

Wire value processing (processing)

SUCCEEDED = <Status.SUCCEEDED: 'succeeded'>

Wire value succeeded (succeeded)