Polarex.Orders (Polarex v0.2.0)
View SourceProvides API endpoints related to orders
Summary
Functions
@spec customer_portal_orders_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerOrder.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order
Get an order by ID for the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_orders_invoice( String.t(), keyword() ) :: {:ok, Polarex.CustomerOrderInvoice.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order Invoice
Get an order's invoice data.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_orders_list(keyword()) :: {:ok, Polarex.ListResourceCustomerOrder.t()} | {:error, Polarex.HTTPValidationError.t()}
List Orders
List orders of the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.product_billing_type
: Filter by product billing type.recurring
will filter data corresponding to subscriptions creations or renewals.one_time
will filter data corresponding to one-time purchases.subscription_id
: Filter by subscription ID.query
: Search by product or organization name.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.sorting
: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign-
before the criteria name to sort by descending order.
@spec orders_get( String.t(), keyword() ) :: {:ok, Polarex.Order.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order
Get an order by ID.
Scopes: orders:read
@spec orders_invoice( String.t(), keyword() ) :: {:ok, Polarex.OrderInvoice.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order Invoice
Get an order's invoice data.
Scopes: orders:read
@spec orders_list(keyword()) :: {:ok, Polarex.ListResourceOrder.t()} | {:error, Polarex.HTTPValidationError.t()}
List Orders
List orders.
Scopes: orders:read
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.product_billing_type
: Filter by product billing type.recurring
will filter data corresponding to subscriptions creations or renewals.one_time
will filter data corresponding to one-time purchases.discount_id
: Filter by discount ID.customer_id
: Filter by customer ID.checkout_id
: Filter by checkout ID.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.sorting
: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign-
before the criteria name to sort by descending order.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.