Polar::Api::CustomerPortal::Orders
API client for orders operations in customer_portal context
Constants
Constructors
Creates a new Orders instance
@param client [Client] The Polar API client instance
Instance methods
Confirm Retry Payment
Confirm a retry payment using a Stripe confirmation token.
Scopes: customer_portal:write
Endpoint: POST /v1/customer-portal/orders/{id}/confirm-payment
Parameters:
id(required): The order ID.body(required): Request body as Polar::Models::CustomerOrderConfirmPayment
Returns: Polar::Models::CustomerOrderPaymentConfirmation
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Generate Order Invoice
Trigger generation of an order's invoice.
Scopes: customer_portal:read customer_portal:write
Endpoint: POST /v1/customer-portal/orders/{id}/invoice
Parameters:
id(required): The order ID.
Returns: JSON response string
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Order
Get an order by ID for the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/orders/{id}
Parameters:
id(required): The order ID.
Returns: Polar::Models::CustomerOrder
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Order Payment Status
Get the current payment status for an order.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/orders/{id}/payment-status
Parameters:
id(required): The order ID.
Returns: Polar::Models::CustomerOrderPaymentStatus
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Order Invoice
Get an order's invoice data.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/orders/{id}/invoice
Parameters:
id(required): The order ID.
Returns: Polar::Models::CustomerOrderInvoice
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Orders
List orders of the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/orders/
Parameters:
product_id(optional): Filter by product ID.product_billing_type(optional): 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(optional): Filter by subscription ID.query(optional): Search by product or organization name.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.sorting(optional): 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.
Returns: Polar::Models::ListResource(Polar::Models::CustomerOrder)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Order
Update an order for the authenticated customer.
Scopes: customer_portal:write
Endpoint: PATCH /v1/customer-portal/orders/{id}
Parameters:
id(required): The order ID.body(required): Request body as Polar::Models::CustomerOrderUpdate
Returns: Polar::Models::CustomerOrder
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors