Inttegro.PurchaseIntents.VariantSet (inttegro v0.2.0)

Copy Markdown View Source

Represents Variant Set data in the PurchaseIntents API.

Inttegro decodes API responses into this struct. Required fields are always present; optional fields are nil when they do not apply or were not returned. Follow the linked types in t/0 for nested domain values.

Creates and manages public purchasing opportunities.

A purchase intent describes what may be bought and can produce an order when a buyer accepts it. It is distinct from the resulting order: update or cancel the intent before acceptance, then use the Orders API for payment and fulfillment state.

Summary

Types

t()

The decoded variant set value.

Functions

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

Types

t()

@type t() :: %Inttegro.PurchaseIntents.VariantSet{
  active: boolean(),
  default_product_id: String.t() | nil,
  description: String.t() | nil,
  id: String.t(),
  name: String.t(),
  reference: String.t() | nil,
  variant_axes: [Inttegro.PurchaseIntents.VariantAxis.t()],
  variants: [Inttegro.PurchaseIntents.Variant.t()]
}

The decoded variant set value.

Functions

new!(attrs \\ %{})

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

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