statuspro_public_api_client.helpers¶
statuspro_public_api_client.helpers
¶
Ergonomic helper facades for the StatusPro API client.
These classes wrap the generated API with domain-specific methods that reduce
boilerplate for common workflows. Each helper is accessed as an attribute on
StatusProClient (e.g. client.orders.list(...)).
Example
async with StatusProClient() as client: ... orders = await client.orders.list(per_page=50) ... statuses = await client.statuses.list()
Classes¶
Base(client)
¶
Base class for all domain classes.
Provides common functionality and access to the StatusProClient instance.
Parameters:
-
client(StatusProClient) –The StatusProClient instance to use for API calls.
Parameters:
-
client(StatusProClient) –The StatusProClient instance to use for API calls.
Source code in statuspro_public_api_client/helpers/base.py
Functions¶
Orders(client)
¶
Bases: Base
Ergonomic order operations that return domain Order models.
Source code in statuspro_public_api_client/helpers/base.py
Functions¶
get(order_id)
async
¶
Get a single order by id.
Source code in statuspro_public_api_client/helpers/orders.py
list(*, search=None, status_code=None, tags=None, tags_any=None, financial_status=None, fulfillment_status=None, exclude_cancelled=None, due_date_from=None, due_date_to=None, page=None, per_page=None)
async
¶
List orders. Auto-paginates when page is not set.
Source code in statuspro_public_api_client/helpers/orders.py
lookup(*, number, email)
async
¶
Look up an order by order number and customer email.
Source code in statuspro_public_api_client/helpers/orders.py
Statuses(client)
¶
Bases: Base
Ergonomic status catalog operations.
Source code in statuspro_public_api_client/helpers/base.py
Functions¶
list()
async
¶
Return the full status catalog (/statuses).
Source code in statuspro_public_api_client/helpers/statuses.py
viable_for(order_id)
async
¶
Return statuses that are valid transitions from the order's current state.