View Source ExOAPI.Stripe.Schemas.Order (exoapi_stripe v0.1.4)

description: Order objects are created to handle end customers' purchases of previously defined products. You can create, retrieve, and pay individual orders, as well as list all orders. Orders are identified by a unique, random ID.

Related guide: Tax, Shipping, and Inventory.

:amount :: :integer

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.

:amount_returned :: :integer

The total amount that was returned to the customer.

:application :: ExOAPI.Stripe.Schemas.Application

ID of the Connect Application that created the order.

:application_fee :: ExOAPI.Stripe.Schemas.ApplicationFee

A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.

:charge :: ExOAPI.Stripe.Schemas.Charge | :string

The ID of the payment used to pay for the order. Present if the order status is paid, fulfilled, or refunded.

:created :: :integer

Time at which the object was created. Measured in seconds since the Unix epoch.

:currency :: :string

Three-letter ISO currency code, in lowercase. Must be a supported currency.

:customer :: ExOAPI.Stripe.Schemas.DeletedCustomer | ExOAPI.Stripe.Schemas.Customer | :string

The customer used for the order.

:email :: :string

The email address of the customer placing the order.

:external_coupon_code :: :string

External coupon code to load for this order.

:id :: :string

Unique identifier for the object.

::items :: ExOAPI.Stripe.Schemas.OrderItem

:livemode :: :boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

:metadata :: :map

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

:object :: :string

String representing the object's type. Objects of the same type share the same value.

::data :: ExOAPI.Stripe.Schemas.OrderReturn

:has_more :: :boolean

True if this list has another page of items after this one that can be fetched.

:object :: :string

String representing the object's type. Objects of the same type share the same value. Always has the value list.

:url :: :string

The URL where this list can be accessed.

:selected_shipping_method :: :string

The shipping method that is currently selected for this order, if any. If present, it is equal to one of the ids of shipping methods in the shipping_methods array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method.

:shipping :: ExOAPI.Stripe.Schemas.Shipping

The shipping address for the order. Present if the order is for goods to be shipped.

::shipping_methods :: ExOAPI.Stripe.Schemas.ShippingMethod

:status :: :string

Current order status. One of created, paid, canceled, fulfilled, or returned. More details in the Orders Guide.

:status_transitions :: ExOAPI.Stripe.Schemas.StatusTransitions

The timestamps at which the order status was updated.

:updated :: :integer

Time at which the object was last updated. Measured in seconds since the Unix epoch.

:upstream_id :: :string

The user's order ID if it is different from the Stripe order ID.

Link to this section Summary

Link to this section Types

@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.Order{
  amount: integer() | nil,
  amount_returned: integer() | nil,
  application: String.t() | nil,
  application_fee: integer() | nil,
  charge: ExOAPI.EctoTypes.AnyOf.t() | nil,
  created: integer() | nil,
  currency: String.t() | nil,
  customer: ExOAPI.EctoTypes.AnyOf.t() | nil,
  email: String.t() | nil,
  external_coupon_code: String.t() | nil,
  id: String.t() | nil,
  items: [ExOAPI.Stripe.Schemas.OrderItem.t()],
  livemode: boolean() | nil,
  metadata: map() | nil,
  object: :order | nil,
  returns: map() | nil,
  selected_shipping_method: String.t() | nil,
  shipping: ExOAPI.EctoTypes.AnyOf.t() | nil,
  shipping_methods: [ExOAPI.Stripe.Schemas.ShippingMethod.t()],
  status: String.t() | nil,
  status_transitions: ExOAPI.EctoTypes.AnyOf.t() | nil,
  updated: integer() | nil,
  upstream_id: String.t() | nil
}

Link to this section Functions

Link to this function

changeset(struct \\ %__MODULE__{}, params)

View Source
@spec changeset(t(), params()) :: Ecto.Changeset.t()