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

description: Stores representations of stock keeping units. SKUs describe specific product variations, taking into account any combination of: attributes, currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents the size: large, color: red version of that shirt.

Can also be used to manage inventory.

:active :: :boolean

Whether the SKU is available for purchase.

:attributes :: :map

A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are ["size", "gender"], a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}.

: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.

:id :: :string

Unique identifier for the object.

:image :: :string

The URL of an image for this SKU, meant to be displayable to the customer.

:inventory :: ExOAPI.Stripe.Schemas.SkuInventory

: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.

:package_dimensions :: ExOAPI.Stripe.Schemas.PackageDimensions

The dimensions of this SKU for shipping purposes.

:price :: ExOAPI.Stripe.Schemas.Price

The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).

:product :: ExOAPI.Stripe.Schemas.Product | :string

The ID of the product this SKU is associated with. The product must be currently active.

:updated :: :integer

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

Link to this section Summary

Link to this section Types

@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.Sku{
  active: boolean() | nil,
  attributes: map() | nil,
  created: integer() | nil,
  currency: String.t() | nil,
  id: String.t() | nil,
  image: String.t() | nil,
  inventory: ExOAPI.Stripe.Schemas.SkuInventory.t() | nil,
  livemode: boolean() | nil,
  metadata: map() | nil,
  object: :sku | nil,
  package_dimensions: ExOAPI.EctoTypes.AnyOf.t() | nil,
  price: integer() | nil,
  product: ExOAPI.EctoTypes.AnyOf.t() | nil,
  updated: integer() | nil
}

Link to this section Functions

Link to this function

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

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