View Source ExOAPI.Stripe.SDK.Orders (exoapi_stripe v0.1.4)
Link to this section Summary
Functions
description: <p>Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.</p>
description: <p>Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.</p>
description: <p>Creates a new order object.</p>
description: <p>Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>
description: <p>Pay an order by providing a <code>source</code> to create a payment.</p>
description: <p>Return all or part of an order. The order must have a status of <code>paid</code> or <code>fulfilled</code> before it can be returned. Once all items have been returned, the order will become <code>canceled</code> or <code>returned</code> depending on which status the order started in.</p>
Link to this section Types
@type get_orders_id_opts() :: {:expand, String.t()}
Link to this section Functions
@spec get_orders(client :: ExOAPI.Client.t(), [get_orders_opts()]) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | %{ url: String.t(), object: String.t() | :list, has_more: boolean(), data: [ExOAPI.Stripe.Schemas.Order.t()] } | map()} | {:error, any()}
description: <p>Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.</p>
@spec get_orders_id(client :: ExOAPI.Client.t(), id :: String.t(), [ get_orders_id_opts() ]) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Order.t() | map()} | {:error, any()}
description: <p>Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.</p>
@spec post_orders( client :: ExOAPI.Client.t(), body :: %{ shipping: %{ phone: String.t(), name: String.t(), address: %{ state: String.t(), postal_code: String.t(), line2: String.t(), line1: String.t(), country: String.t(), city: String.t() } }, metadata: map(), items: [ %{ type: String.t() | :discount | :shipping | :sku | :tax, quantity: integer(), parent: String.t(), description: String.t(), currency: String.t(), amount: integer() } ], expand: [String.t()], email: String.t(), customer: String.t(), currency: String.t(), coupon: String.t() } | map() ) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Order.t() | map()} | {:error, any()}
description: <p>Creates a new order object.</p>
@spec post_orders_id( client :: ExOAPI.Client.t(), body :: %{ status: String.t() | :canceled | :created | :fulfilled | :paid | :returned, shipping: %{tracking_number: String.t(), carrier: String.t()}, selected_shipping_method: String.t(), metadata: String.t() | map(), expand: [String.t()], coupon: String.t() } | map(), id :: String.t() ) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Order.t() | map()} | {:error, any()}
description: <p>Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>
@spec post_orders_id_pay( client :: ExOAPI.Client.t(), body :: %{ source: String.t(), metadata: map(), expand: [String.t()], email: String.t(), customer: String.t(), application_fee: integer() } | map(), id :: String.t() ) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.Order.t() | map()} | {:error, any()}
description: <p>Pay an order by providing a <code>source</code> to create a payment.</p>
@spec post_orders_id_returns( client :: ExOAPI.Client.t(), body :: %{ items: String.t() | [ %{ type: String.t() | :discount | :shipping | :sku | :tax, quantity: integer(), parent: String.t(), description: String.t(), amount: integer() } ], expand: [String.t()] } | map(), id :: String.t() ) :: {:ok, ExOAPI.Stripe.Schemas.Error.t() | ExOAPI.Stripe.Schemas.OrderReturn.t() | map()} | {:error, any()}
description: <p>Return all or part of an order. The order must have a status of <code>paid</code> or <code>fulfilled</code> before it can be returned. Once all items have been returned, the order will become <code>canceled</code> or <code>returned</code> depending on which status the order started in.</p>