PolarExpress.Services.OrdersService (polar_express v0.1.5)

Copy Markdown View Source

Orders

Orders API operations.

Summary

Functions

export_orders(client, params \\ %{}, opts \\ [])

@spec export_orders(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}

Export Orders

Export orders as a CSV file.

Scopes: orders:read

See PolarExpress.Params.OrdersExportOrdersParams for parameter details.

generate_order_invoice(client, id, params \\ %{}, opts \\ [])

@spec generate_order_invoice(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}

Generate Order Invoice

Trigger generation of an order's invoice.

Scopes: orders:read

See PolarExpress.Params.OrdersGenerateOrderInvoiceParams for parameter details.

get_order(client, id, params \\ %{}, opts \\ [])

@spec get_order(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.Order.t()} | {:error, PolarExpress.Error.t()}

Get Order

Get an order by ID.

Scopes: orders:read

See PolarExpress.Params.OrdersGetOrderParams for parameter details.

get_order_invoice(client, id, params \\ %{}, opts \\ [])

@spec get_order_invoice(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.OrderInvoice.t()}
  | {:error, PolarExpress.Error.t()}

Get Order Invoice

Get an order's invoice data.

Scopes: orders:read

See PolarExpress.Params.OrdersGetOrderInvoiceParams for parameter details.

list_orders(client, params \\ %{}, opts \\ [])

@spec list_orders(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}

List Orders

List orders.

Scopes: orders:read

See PolarExpress.Params.OrdersListOrdersParams for parameter details.

update_order(client, id, params \\ %{}, opts \\ [])

@spec update_order(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.Order.t()} | {:error, PolarExpress.Error.t()}

Update Order

Update an order.

Scopes: orders:write

See PolarExpress.Params.OrdersUpdateOrderParams for parameter details.