Inttegro.Prices.Catalog (inttegro v0.2.0)

Copy Markdown View Source

Represents Catalog data in the Prices 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.

Manages reusable catalog prices.

Prices express currency and integer minor-unit amounts and can be attached to products. Use a new price when commercial terms materially change so existing orders retain their original price history.

Summary

Types

t()

The decoded catalog value.

Functions

Builds a Inttegro.Prices.Catalog and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Prices.Catalog{
  about: String.t() | nil,
  active: boolean(),
  archived_at: String.t() | nil,
  created_at: String.t(),
  id: String.t(),
  label: String.t() | nil,
  nominal: Inttegro.Money.Amount.t(),
  product: Inttegro.Prices.EmbeddedProduct.t() | nil,
  product_id: String.t() | nil,
  updated_at: String.t() | nil
}

The decoded catalog value.

Functions

new!(attrs \\ %{})

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

Builds a Inttegro.Prices.Catalog and raises KeyError when a required field is missing.