inttegro.price

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

The primary returned object is inttegro.price.Price. 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 price resource.
 2
 3The primary returned object is ``inttegro.price.Price``. 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 .action_request import ActionRequest as ActionRequest
10    from .embedded_product import EmbeddedProduct as EmbeddedProduct
11    from .embedded_product_attributes_item import EmbeddedProductAttributesItem as EmbeddedProductAttributesItem
12    from .customer_selected_amount import CustomerSelectedAmount as CustomerSelectedAmount
13    from .customer_selected_amount_params import CustomerSelectedAmountParams as CustomerSelectedAmountParams
14    from .inline import Inline as Inline
15    from .inline_params import InlineParams as InlineParams
16    from .lookup_request import LookupRequest as LookupRequest
17    from .page import Page as Page
18    from .page_item import PageItem as PageItem
19    from .page_request import PageRequest as PageRequest
20    from .page_response import PageResponse as PageResponse
21    from .params import Params as Params
22    from .price import Price as Price
23    from .response import Response as Response
24    from .suggested_amount import SuggestedAmount as SuggestedAmount
25    from .suggested_amount_params import SuggestedAmountParams as SuggestedAmountParams
26    from .type import Type as Type
27    from .update_request import UpdateRequest as UpdateRequest
28
29
30_EXPORTS: dict[str, tuple[str, str]] = {
31    "ActionRequest": ("inttegro.price.action_request", "ActionRequest"),
32    "EmbeddedProduct": ("inttegro.price.embedded_product", "EmbeddedProduct"),
33    "EmbeddedProductAttributesItem": ("inttegro.price.embedded_product_attributes_item", "EmbeddedProductAttributesItem"),
34    "CustomerSelectedAmount": ("inttegro.price.customer_selected_amount", "CustomerSelectedAmount"),
35    "CustomerSelectedAmountParams": ("inttegro.price.customer_selected_amount_params", "CustomerSelectedAmountParams"),
36    "Inline": ("inttegro.price.inline", "Inline"),
37    "InlineParams": ("inttegro.price.inline_params", "InlineParams"),
38    "LookupRequest": ("inttegro.price.lookup_request", "LookupRequest"),
39    "Page": ("inttegro.price.page", "Page"),
40    "PageItem": ("inttegro.price.page_item", "PageItem"),
41    "PageRequest": ("inttegro.price.page_request", "PageRequest"),
42    "PageResponse": ("inttegro.price.page_response", "PageResponse"),
43    "Params": ("inttegro.price.params", "Params"),
44    "Price": ("inttegro.price.price", "Price"),
45    "Response": ("inttegro.price.response", "Response"),
46    "SuggestedAmount": ("inttegro.price.suggested_amount", "SuggestedAmount"),
47    "SuggestedAmountParams": ("inttegro.price.suggested_amount_params", "SuggestedAmountParams"),
48    "Type": ("inttegro.price.type", "Type"),
49    "UpdateRequest": ("inttegro.price.update_request", "UpdateRequest"),
50}
51
52__all__ = [
53    "ActionRequest",
54    "EmbeddedProduct",
55    "EmbeddedProductAttributesItem",
56    "CustomerSelectedAmount",
57    "CustomerSelectedAmountParams",
58    "Inline",
59    "InlineParams",
60    "LookupRequest",
61    "Page",
62    "PageItem",
63    "PageRequest",
64    "PageResponse",
65    "Params",
66    "Price",
67    "Response",
68    "SuggestedAmount",
69    "SuggestedAmountParams",
70    "Type",
71    "UpdateRequest",
72]
73
74
75def __getattr__(name: str) -> Any:
76    """Load a public resource type on first access."""
77    try:
78        module_name, attribute_name = _EXPORTS[name]
79    except KeyError:
80        raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
81    value = getattr(import_module(module_name), attribute_name)
82    globals()[name] = value
83    return value
@dataclass(frozen=True, slots=True, kw_only=True)
class ActionRequest(inttegro._request_base.ApiRequest):
12@dataclass(frozen=True, slots=True, kw_only=True)
13class ActionRequest(ApiRequest):
14    """Parameters accepted by the action 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: ``PriceActionRequest``.
21    """
22    price_id: str
23    """Price ID to perform the action on. Required. Python type: ``str``; wire name: ``price_id``; JSON type: string"""

Parameters accepted by the action 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: PriceActionRequest.

ActionRequest(*, price_id: str)
price_id: str

Price ID to perform the action on. Required. Python type: str; wire name: price_id; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class EmbeddedProduct(inttegro._model_base.ApiModel):
14@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
15class EmbeddedProduct(ApiModel):
16    """Typed embedded product data in the price 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: ``PriceEmbeddedProduct``.
25    """
26    id: str = field(init=False)
27    """Unique product identifier with prod_ prefix. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
28    about: str | None = field(init=False)
29    """Full product description. Optional; nullable. Python type: ``str | None``; wire name: ``about``; JSON type: string"""
30    active: bool = field(init=False)
31    """Whether product is published and available. Required. Python type: ``bool``; wire name: ``active``; JSON type: boolean"""
32    archived_at: datetime | None = field(init=False)
33    """Archive timestamp (if archived). Optional; nullable. Python type: ``datetime | None``; wire name: ``archived_at``; JSON type: string (date-time)"""
34    attributes: list[PriceEmbeddedProductAttributesItem] | None = field(init=False)
35    """Product attributes. Optional; nullable. Python type: ``list[PriceEmbeddedProductAttributesItem] | None``; wire name: ``attributes``; JSON type: array of object values"""
36    category: str | None = field(init=False)
37    """Product category. Optional; nullable. Python type: ``str | None``; wire name: ``category``; JSON type: string"""
38    created_at: datetime = field(init=False)
39    """Product creation timestamp. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)"""
40    custom_data: CustomData | None = field(init=False)
41    """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)"""
42    description: str | None = field(init=False)
43    """Short description. Optional; nullable. Python type: ``str | None``; wire name: ``description``; JSON type: string"""
44    dimensions: ProductDimensions | None = field(init=False)
45    """Product dimensions and size metadata. Optional; nullable. Python type: ``ProductDimensions | None``; wire name: ``dimensions``; JSON type: object (ProductDimensions)"""
46    media: ProductMedia | None = field(init=False)
47    """Product media assets. Optional; nullable. Python type: ``ProductMedia | None``; wire name: ``media``; JSON type: object (ProductMedia)"""
48    name: str = field(init=False)
49    """Product name. Required. Python type: ``str``; wire name: ``name``; JSON type: string"""
50    published_at: datetime | None = field(init=False)
51    """When the product was published. Optional; nullable. Python type: ``datetime | None``; wire name: ``published_at``; JSON type: string (date-time)"""
52    reference: str | None = field(init=False)
53    """External reference or SKU. Optional; nullable. Python type: ``str | None``; wire name: ``reference``; JSON type: string"""
54    shipment: ProductShipment | None = field(init=False)
55    """Shipment and fulfillment details. Optional; nullable. Python type: ``ProductShipment | None``; wire name: ``shipment``; JSON type: object (ProductShipment)"""
56    tax_code: str | None = field(init=False)
57    """Tax classification code. Optional; nullable. Python type: ``str | None``; wire name: ``tax_code``; JSON type: string"""
58    type: Literal['physical', 'digital', 'service', 'voucher', 'custom', 'cause'] = field(init=False)
59    """Product type. Required. Python type: ``Literal['physical', 'digital', 'service', 'voucher', 'custom', 'cause']``; wire name: ``type``; JSON type: string. Constraints: allowed values ``physical``, ``digital``, ``service``, ``voucher``, ``custom``, ``cause``"""
60    unit_dim: str | None = field(init=False)
61    """Unit dimension label. Optional; nullable. Python type: ``str | None``; wire name: ``unit_dim``; JSON type: string"""
62    updated_at: datetime | None = field(init=False)
63    """Last update timestamp. Optional; nullable. Python type: ``datetime | None``; wire name: ``updated_at``; JSON type: string (date-time)"""

Typed embedded product data in the price 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: PriceEmbeddedProduct.

id: str

Unique product identifier with prod_ prefix. Required. Python type: str; wire name: id; JSON type: string

about: str | None

Full product description. Optional; nullable. Python type: str | None; wire name: about; JSON type: string

active: bool

Whether product is published and available. Required. Python type: bool; wire name: active; JSON type: boolean

archived_at: datetime.datetime | None

Archive timestamp (if archived). Optional; nullable. Python type: datetime | None; wire name: archived_at; JSON type: string (date-time)

attributes: list[EmbeddedProductAttributesItem] | None

Product attributes. Optional; nullable. Python type: list[PriceEmbeddedProductAttributesItem] | None; wire name: attributes; JSON type: array of object values

category: str | None

Product category. Optional; nullable. Python type: str | None; wire name: category; JSON type: string

created_at: datetime.datetime

Product creation timestamp. 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)

description: str | None

Short description. Optional; nullable. Python type: str | None; wire name: description; JSON type: string

dimensions: inttegro.product.Dimensions | None

Product dimensions and size metadata. Optional; nullable. Python type: ProductDimensions | None; wire name: dimensions; JSON type: object (ProductDimensions)

media: inttegro.product.Media | None

Product media assets. Optional; nullable. Python type: ProductMedia | None; wire name: media; JSON type: object (ProductMedia)

name: str

Product name. Required. Python type: str; wire name: name; JSON type: string

published_at: datetime.datetime | None

When the product was published. Optional; nullable. Python type: datetime | None; wire name: published_at; JSON type: string (date-time)

reference: str | None

External reference or SKU. Optional; nullable. Python type: str | None; wire name: reference; JSON type: string

shipment: inttegro.product.Shipment | None

Shipment and fulfillment details. Optional; nullable. Python type: ProductShipment | None; wire name: shipment; JSON type: object (ProductShipment)

tax_code: str | None

Tax classification code. Optional; nullable. Python type: str | None; wire name: tax_code; JSON type: string

type: Literal['physical', 'digital', 'service', 'voucher', 'custom', 'cause']

Product type. Required. Python type: Literal['physical', 'digital', 'service', 'voucher', 'custom', 'cause']; wire name: type; JSON type: string. Constraints: allowed values physical, digital, service, voucher, custom, cause

unit_dim: str | None

Unit dimension label. Optional; nullable. Python type: str | None; wire name: unit_dim; JSON type: string

updated_at: datetime.datetime | None

Last update timestamp. Optional; nullable. Python type: datetime | None; wire name: updated_at; JSON type: string (date-time)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class EmbeddedProductAttributesItem(inttegro._model_base.ApiModel):
12@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
13class EmbeddedProductAttributesItem(ApiModel):
14    """Typed embedded product attributes item data in the price 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: ``PriceEmbeddedProductAttributesItem``.
23    """
24    name: str = field(init=False)
25    """Attribute name. Required. Python type: ``str``; wire name: ``name``; JSON type: string"""
26    value: str = field(init=False)
27    """Attribute value. Required. Python type: ``str``; wire name: ``value``; JSON type: string"""

Typed embedded product attributes item data in the price 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: PriceEmbeddedProductAttributesItem.

name: str

Attribute name. Required. Python type: str; wire name: name; JSON type: string

value: str

Attribute value. Required. Python type: str; wire name: value; JSON type: string

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class CustomerSelectedAmount(inttegro._model_base.ApiModel):
13@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
14class CustomerSelectedAmount(ApiModel):
15    """Persisted currency, range, and suggestions for a selected amount."""
16
17    currency: Currency = field(init=False)
18    minimum: int = field(init=False)
19    maximum: int | None = field(init=False)
20    suggested_amounts: list[SuggestedAmount] | None = field(init=False)

Persisted currency, range, and suggestions for a selected amount.

minimum: int
maximum: int | None
suggested_amounts: list[SuggestedAmount] | None
@dataclass(frozen=True, slots=True, kw_only=True)
class CustomerSelectedAmountParams(inttegro._request_base.ApiRequest):
13@dataclass(frozen=True, slots=True, kw_only=True)
14class CustomerSelectedAmountParams(ApiRequest):
15    """Currency, range, and optional conveniences for a selected amount."""
16
17    currency: Currency
18    minimum: int
19    maximum: int | UnsetType = field(default=UNSET)
20    suggested_amounts: list[SuggestedAmountParams] | UnsetType = field(default=UNSET)

Currency, range, and optional conveniences for a selected amount.

CustomerSelectedAmountParams( *, currency: inttegro.money.Currency, minimum: int, maximum: int | inttegro._request_base.UnsetType = UNSET, suggested_amounts: list[SuggestedAmountParams] | inttegro._request_base.UnsetType = UNSET)
minimum: int
maximum: int | inttegro._request_base.UnsetType
suggested_amounts: list[SuggestedAmountParams] | inttegro._request_base.UnsetType
@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Inline(inttegro.money.Amount):
 9@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
10class Inline(Amount):
11    """A currency amount embedded directly in another API resource.
12
13    This response type has the same ``currency`` and integer minor-unit
14    ``value`` semantics as :class:`inttegro.money.Amount`. It is named
15    ``Inline`` to distinguish embedded money from the catalog
16    :class:`inttegro.price.Price` resource.
17    """

A currency amount embedded directly in another API resource.

This response type has the same currency and integer minor-unit value semantics as inttegro.money.Amount. It is named Inline to distinguish embedded money from the catalog inttegro.price.Price resource.

@dataclass(frozen=True, slots=True, kw_only=True)
class InlineParams(inttegro.money.AmountParams):
 9@dataclass(frozen=True, slots=True, kw_only=True)
10class InlineParams(AmountParams):
11    """A currency amount supplied inline in another request.
12
13    Use this type where an operation accepts price data directly rather than a
14    ``price_id`` referencing :class:`inttegro.price.Price`. ``value`` is an
15    integer minor-unit amount, such as ``5000`` for GHS 50.00.
16    """

A currency amount supplied inline in another request.

Use this type where an operation accepts price data directly rather than a price_id referencing inttegro.price.Price. value is an integer minor-unit amount, such as 5000 for GHS 50.00.

InlineParams(*, currency: inttegro.money.Currency, value: int)
@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: ``LookupPriceRequest``.
21    """
22    price_id: str
23    """Price ID to perform the action on. Required. Python type: ``str``; wire name: ``price_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: LookupPriceRequest.

LookupRequest(*, price_id: str)
price_id: str

Price ID to perform the action on. Required. Python type: str; wire name: price_id; JSON type: string

@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: ``PricePage``.
23    """
24    number: int | None = field(init=False)
25    """The page number returned. Optional; nullable. Python type: ``int | None``; wire name: ``number``; JSON type: integer"""
26    size: int | None = field(init=False)
27    """The number of prices in this page. Optional; nullable. Python type: ``int | None``; wire name: ``size``; JSON type: integer"""
28    prices: list[PricePageItem] | None = field(init=False)
29    """The prices associated with this page. Optional; nullable. Python type: ``list[PricePageItem] | None``; wire name: ``prices``; JSON type: array of object (PricePageItem) values"""

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

number: int | None

The page number returned. Optional; nullable. Python type: int | None; wire name: number; JSON type: integer

size: int | None

The number of prices in this page. Optional; nullable. Python type: int | None; wire name: size; JSON type: integer

prices: list[Price] | None

The prices associated with this page. Optional; nullable. Python type: list[PricePageItem] | None; wire name: prices; JSON type: array of object (PricePageItem) values

PageItem = <class 'Price'>
@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: ``PricePageRequest``.
21    """
22    page_number: int | UnsetType = field(default=UNSET)
23    """Page index to fetch. Omit it or send 0 to request page 1; otherwise use 1 through 10. Optional. Python type: ``int``; wire name: ``page_number``; JSON type: integer. Constraints: minimum 0; maximum 10"""
24    page_size: int | UnsetType = field(default=UNSET)
25    """Number of prices per page (1-256). Optional. Python type: ``int``; wire name: ``page_size``; JSON type: integer. Constraints: minimum 1; maximum 256"""
26    product_id: str | UnsetType = field(default=UNSET)
27    """Optional product ID to scope the page to a single product. Optional. Python type: ``str``; wire name: ``product_id``; JSON type: string"""

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

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

Page index to fetch. Omit it or send 0 to request page 1; otherwise use 1 through 10. Optional. Python type: int; wire name: page_number; JSON type: integer. Constraints: minimum 0; maximum 10

page_size: int | inttegro._request_base.UnsetType

Number of prices per page (1-256). Optional. Python type: int; wire name: page_size; JSON type: integer. Constraints: minimum 1; maximum 256

product_id: str | inttegro._request_base.UnsetType

Optional product ID to scope the page to a single product. Optional. Python type: str; wire name: product_id; JSON type: string

@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: ``PricePageResponse``.
23    """
24    page: PricePage | None = field(init=False)
25    """Numeric page used by this operation. Optional; nullable. Python type: ``PricePage | None``; wire name: ``page``; JSON type: object"""
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)"""

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

page: Page | None

Numeric page used by this operation. Optional; nullable. Python type: PricePage | None; wire name: page; JSON type: object

error: inttegro.shared.Error | None

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)

@dataclass(frozen=True, slots=True, kw_only=True)
class Params(inttegro._request_base.ApiRequest):
15@dataclass(frozen=True, slots=True, kw_only=True)
16class Params(ApiRequest):
17    """Parameters accepted by the params operation.
18
19    This is an immutable, keyword-only request object. ``to_dict()`` uses
20    the documented wire names, omits fields left as ``UNSET``, serializes
21    string-backed enums by value, and requires timezone-aware datetimes.
22
23    API contract schema: ``CatalogPriceParams``.
24    """
25    product_id: str | UnsetType = field(default=UNSET)
26    """Product ID to associate with the price. Optional for fixed prices, required for customer-selected prices, and immutable once set. Python type: ``str``; wire name: ``product_id``; JSON type: string"""
27    label: str | UnsetType = field(default=UNSET)
28    """Short label for this price (max 100 characters). Optional. Python type: ``str``; wire name: ``label``; JSON type: string"""
29    about: str | UnsetType = field(default=UNSET)
30    """Longer description of this price (max 500 characters). Optional. Python type: ``str``; wire name: ``about``; JSON type: string"""
31    type: Type | UnsetType = field(default=UNSET)
32    """Price definition discriminator. Required by the tagged definition. Python type: ``Type``; wire name: ``type``; JSON type: string (PriceType)"""
33    fixed_amount: AmountParams | UnsetType = field(default=UNSET)
34    """Fixed price amount. Required when ``type`` is ``fixed_amount``. Python type: ``AmountParams``; wire name: ``fixed_amount``; JSON type: object (AmountParams)"""
35    customer_selected_amount: CustomerSelectedAmountParams | UnsetType = field(default=UNSET)
36    """Customer-selected price policy. Required when ``type`` is ``customer_selected_amount``. Python type: ``CustomerSelectedAmountParams``; wire name: ``customer_selected_amount``; JSON type: object (CustomerSelectedAmountParams)"""
37
38    def __post_init__(self) -> None:
39        fixed = (
40            self.type == Type.FIXED_AMOUNT
41            and self.fixed_amount is not UNSET
42            and self.customer_selected_amount is UNSET
43        )
44        selected = (
45            self.type == Type.CUSTOMER_SELECTED_AMOUNT
46            and self.customer_selected_amount is not UNSET
47            and self.fixed_amount is UNSET
48            and self.product_id is not UNSET
49            and bool(self.product_id)
50        )
51        if sum((fixed, selected)) != 1:
52            raise ValueError("provide exactly one valid catalog price definition")

Parameters accepted by the params 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: CatalogPriceParams.

Params( *, product_id: str | inttegro._request_base.UnsetType = UNSET, label: str | inttegro._request_base.UnsetType = UNSET, about: str | inttegro._request_base.UnsetType = UNSET, type: Type | inttegro._request_base.UnsetType = UNSET, fixed_amount: inttegro.money.AmountParams | inttegro._request_base.UnsetType = UNSET, customer_selected_amount: CustomerSelectedAmountParams | inttegro._request_base.UnsetType = UNSET)
product_id: str | inttegro._request_base.UnsetType

Product ID to associate with the price. Optional for fixed prices, required for customer-selected prices, and immutable once set. Python type: str; wire name: product_id; JSON type: string

label: str | inttegro._request_base.UnsetType

Short label for this price (max 100 characters). Optional. Python type: str; wire name: label; JSON type: string

about: str | inttegro._request_base.UnsetType

Longer description of this price (max 500 characters). Optional. Python type: str; wire name: about; JSON type: string

type: Type | inttegro._request_base.UnsetType

Price definition discriminator. Required by the tagged definition. Python type: Type; wire name: type; JSON type: string (PriceType)

fixed_amount: inttegro.money.AmountParams | inttegro._request_base.UnsetType

Fixed price amount. Required when type is fixed_amount. Python type: AmountParams; wire name: fixed_amount; JSON type: object (AmountParams)

customer_selected_amount: CustomerSelectedAmountParams | inttegro._request_base.UnsetType

Customer-selected price policy. Required when type is customer_selected_amount. Python type: CustomerSelectedAmountParams; wire name: customer_selected_amount; JSON type: object (CustomerSelectedAmountParams)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class Price(inttegro._model_base.ApiModel):
16@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
17class Price(ApiModel):
18    """Typed price data in the price resource namespace.
19
20    Instances are immutable API responses. ``from_dict()`` decodes nested
21    objects, string-backed enums, and timezone-aware ISO-8601 timestamps;
22    ``to_dict()`` returns the corresponding JSON-compatible wire shape.
23    Fields not returned by the API remain absent and can still be queried
24    through mapping-style access.
25
26    API contract schema: ``CatalogPrice``.
27    """
28    id: str = field(init=False)
29    """Unique price identifier with pr_ prefix. Required. Python type: ``str``; wire name: ``id``; JSON type: string"""
30    label: str | None = field(init=False)
31    """Short label for this price. Optional; nullable. Python type: ``str | None``; wire name: ``label``; JSON type: string"""
32    about: str | None = field(init=False)
33    """Longer description of this price. Optional; nullable. Python type: ``str | None``; wire name: ``about``; JSON type: string"""
34    active: bool = field(init=False)
35    """Whether this price is active and usable in new flows. Required. Python type: ``bool``; wire name: ``active``; JSON type: boolean"""
36    type: Type = field(init=False)
37    """Price definition discriminator. Required. Python type: ``Type``; wire name: ``type``; JSON type: string (PriceType)"""
38    fixed_amount: Amount | None = field(init=False)
39    """Fixed amount present only for fixed prices. Python type: ``Amount | None``; wire name: ``fixed_amount``; JSON type: object (Amount)"""
40    customer_selected_amount: CustomerSelectedAmount | None = field(init=False)
41    """Selection policy present only for customer-selected prices. Python type: ``CustomerSelectedAmount | None``; wire name: ``customer_selected_amount``; JSON type: object (CustomerSelectedAmount)"""
42    product_id: str | None = field(init=False)
43    """Product ID when the operation returns the relationship by reference. Optional; nullable. Python type: ``str | None``; wire name: ``product_id``; JSON type: string"""
44    product: PriceEmbeddedProduct | None = field(init=False)
45    """Embedded product details, if this price belongs to a product. Optional; nullable. Python type: ``PriceEmbeddedProduct | None``; wire name: ``product``; JSON type: object (PriceEmbeddedProduct)"""
46    created_at: datetime = field(init=False)
47    """Price creation timestamp. Required. Python type: ``datetime``; wire name: ``created_at``; JSON type: string (date-time)"""
48    updated_at: datetime | None = field(init=False)
49    """Last update timestamp. Optional; nullable. Python type: ``datetime | None``; wire name: ``updated_at``; JSON type: string (date-time)"""
50    archived_at: datetime | None = field(init=False)
51    """Archive timestamp (if archived). Optional; nullable. Python type: ``datetime | None``; wire name: ``archived_at``; JSON type: string (date-time)"""

Typed price data in the price 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: CatalogPrice.

id: str

Unique price identifier with pr_ prefix. Required. Python type: str; wire name: id; JSON type: string

label: str | None

Short label for this price. Optional; nullable. Python type: str | None; wire name: label; JSON type: string

about: str | None

Longer description of this price. Optional; nullable. Python type: str | None; wire name: about; JSON type: string

active: bool

Whether this price is active and usable in new flows. Required. Python type: bool; wire name: active; JSON type: boolean

type: Type

Price definition discriminator. Required. Python type: Type; wire name: type; JSON type: string (PriceType)

fixed_amount: inttegro.money.Amount | None

Fixed amount present only for fixed prices. Python type: Amount | None; wire name: fixed_amount; JSON type: object (Amount)

customer_selected_amount: CustomerSelectedAmount | None

Selection policy present only for customer-selected prices. Python type: CustomerSelectedAmount | None; wire name: customer_selected_amount; JSON type: object (CustomerSelectedAmount)

product_id: str | None

Product ID when the operation returns the relationship by reference. Optional; nullable. Python type: str | None; wire name: product_id; JSON type: string

product: EmbeddedProduct | None

Embedded product details, if this price belongs to a product. Optional; nullable. Python type: PriceEmbeddedProduct | None; wire name: product; JSON type: object (PriceEmbeddedProduct)

created_at: datetime.datetime

Price creation timestamp. Required. Python type: datetime; wire name: created_at; JSON type: string (date-time)

updated_at: datetime.datetime | None

Last update timestamp. Optional; nullable. Python type: datetime | None; wire name: updated_at; JSON type: string (date-time)

archived_at: datetime.datetime | None

Archive timestamp (if archived). Optional; nullable. Python type: datetime | None; wire name: archived_at; JSON type: string (date-time)

@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: ``PriceResponse``.
23    """
24    price: CatalogPrice | None = field(init=False)
25    """The price associated with this response. Optional; nullable. Python type: ``CatalogPrice | None``; wire name: ``price``; JSON type: object (CatalogPrice)"""
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)"""

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

price: Price | None

The price associated with this response. Optional; nullable. Python type: CatalogPrice | None; wire name: price; JSON type: object (CatalogPrice)

error: inttegro.shared.Error | None

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)

@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
class SuggestedAmount(inttegro._model_base.ApiModel):
11@dataclass(frozen=True, slots=True, init=False, repr=False, eq=False)
12class SuggestedAmount(ApiModel):
13    """A convenient amount choice returned with a catalog price."""
14
15    id: str = field(init=False)
16    value: int = field(init=False)
17    recommended: bool | None = field(init=False)

A convenient amount choice returned with a catalog price.

id: str
value: int
recommended: bool | None
@dataclass(frozen=True, slots=True, kw_only=True)
class SuggestedAmountParams(inttegro._request_base.ApiRequest):
11@dataclass(frozen=True, slots=True, kw_only=True)
12class SuggestedAmountParams(ApiRequest):
13    """A convenient amount choice; suggestions do not restrict valid amounts."""
14
15    id: str
16    value: int
17    recommended: bool | UnsetType = field(default=UNSET)

A convenient amount choice; suggestions do not restrict valid amounts.

SuggestedAmountParams( *, id: str, value: int, recommended: bool | inttegro._request_base.UnsetType = UNSET)
id: str
value: int
recommended: bool | inttegro._request_base.UnsetType
class Type(inttegro._enum_base.WireEnum):
 9class Type(WireEnum):
10    """Definition carried by a catalog price."""
11
12    FIXED_AMOUNT = "fixed_amount"
13    CUSTOMER_SELECTED_AMOUNT = "customer_selected_amount"

Definition carried by a catalog price.

FIXED_AMOUNT = <Type.FIXED_AMOUNT: 'fixed_amount'>
CUSTOMER_SELECTED_AMOUNT = <Type.CUSTOMER_SELECTED_AMOUNT: 'customer_selected_amount'>
@dataclass(frozen=True, slots=True, kw_only=True)
class UpdateRequest(inttegro._request_base.ApiRequest):
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: ``UpdatePriceRequest``.
21    """
22    label: str | UnsetType = field(default=UNSET)
23    """Optional short label for the new price. Optional. Python type: ``str``; wire name: ``label``; JSON type: string. Constraints: maximum length 100"""
24    about: str | UnsetType = field(default=UNSET)
25    """Optional internal description for the new price. Optional. Python type: ``str``; wire name: ``about``; JSON type: string. Constraints: maximum length 500"""
26    price_id: str
27    """Identifier of the related price. Required. Python type: ``str``; wire name: ``price_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: UpdatePriceRequest.

UpdateRequest( *, label: str | inttegro._request_base.UnsetType = UNSET, about: str | inttegro._request_base.UnsetType = UNSET, price_id: str)
label: str | inttegro._request_base.UnsetType

Optional short label for the new price. Optional. Python type: str; wire name: label; JSON type: string. Constraints: maximum length 100

about: str | inttegro._request_base.UnsetType

Optional internal description for the new price. Optional. Python type: str; wire name: about; JSON type: string. Constraints: maximum length 500

price_id: str

Identifier of the related price. Required. Python type: str; wire name: price_id; JSON type: string