Inttegro.PurchaseIntents.PurchaseIntent (inttegro v0.2.0)

Copy Markdown View Source

A public offer that describes what a buyer may purchase.

Purchase intents may be shared before a customer is known. Acceptance creates an order; the resulting order, rather than this struct, becomes authoritative for payment and fulfillment.

Summary

Types

t()

The decoded purchase intent value.

Functions

Builds a Inttegro.PurchaseIntents.PurchaseIntent and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.PurchaseIntents.PurchaseIntent{
  activity: Inttegro.PurchaseIntents.Activity.t() | nil,
  allow_variants: boolean(),
  created_at: String.t(),
  expires_at: String.t() | nil,
  id: String.t(),
  inactive_at: String.t() | nil,
  merchant: Inttegro.PurchaseIntents.Merchant.t() | nil,
  price: Inttegro.PurchaseIntents.Price.t() | nil,
  product: Inttegro.PurchaseIntents.Product.t() | nil,
  quantity: Inttegro.PurchaseIntents.Quantity.t(),
  status: Inttegro.PurchaseIntents.Status.t(),
  updated_at: String.t() | nil,
  usage: Inttegro.PurchaseIntents.Usage.t(),
  variant_set: Inttegro.PurchaseIntents.VariantSet.t() | nil
}

The decoded purchase intent value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.PurchaseIntents.PurchaseIntent and raises KeyError when a required field is missing.