Skip to content

statuspro_public_api_client.domain.order

statuspro_public_api_client.domain.order

Domain models for StatusPro orders.

Hand-written Pydantic models for business logic, separate from the generated attrs API models. Shapes mirror the OpenAPI Customer, Status, OrderListItem, OrderResponse, and OrderListMeta schemas.

Classes

Customer

Bases: _Frozen

Customer details attached to an order.

HistoryEntry

Bases: _Frozen

One entry in an order's history timeline.

Returned only by /orders/{id} (single-order detail), never on list pages. Covers status transitions (status is set, comment may be set or empty) and free-form comments (comment set, status usually not). The mail_log audit field on the underlying API is intentionally omitted — operational tooling rarely needs it and it's verbose.

Order

Bases: _Frozen

An order as returned by /orders list pages or /orders/{id}.

OrderStatus

Bases: _Frozen

The status currently set on an order (nested Status schema).

Distinct from :class:Status, which is a top-level status definition returned by /statuses and includes color instead of transition metadata.

PageMeta

Bases: _Frozen

Pagination envelope returned alongside list endpoints.

Matches the StatusPro OrderListMeta schema. current_page and last_page are used by the transport layer to auto-walk pages.