Inttegro.PurchaseIntents.Product (inttegro v0.2.0)

Copy Markdown View Source

Represents Product 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 product value.

Functions

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

Types

t()

@type t() :: %Inttegro.PurchaseIntents.Product{
  about: String.t() | nil,
  active: boolean(),
  archived_at: String.t() | nil,
  attributes: [Inttegro.PurchaseIntents.ProductAttributesItem.t()] | nil,
  category: String.t() | nil,
  created_at: String.t(),
  custom_data: %{optional(String.t()) => String.t()} | nil,
  description: String.t() | nil,
  dimensions: %{optional(String.t()) => term()} | nil,
  id: String.t(),
  media: %{optional(String.t()) => term()} | nil,
  name: String.t(),
  prices: [Inttegro.Products.PriceSummary.t()] | nil,
  published_at: String.t() | nil,
  reference: String.t() | nil,
  shipment: %{optional(String.t()) => term()} | nil,
  tax_code: String.t() | nil,
  type: Inttegro.Products.Type.t(),
  unit_dim: String.t() | nil,
  updated_at: String.t() | nil,
  variant_set_id: String.t() | nil
}

The decoded product value.

Functions

new!(attrs \\ %{})

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

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