Inttegro.Prices.CatalogParams (inttegro v0.2.0)

Copy Markdown View Source

Parameters for Catalog Params in the Prices API.

Build this struct with new!/1 and pass it to the corresponding function on Inttegro.Prices. Required keys are enforced immediately; optional values left as nil are omitted from the request sent to Inttegro.

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()

A validated catalog params request.

Functions

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

Types

t()

@type t() :: %Inttegro.Prices.CatalogParams{
  about: String.t() | nil,
  amount: Inttegro.Money.AmountParams.t(),
  label: String.t() | nil,
  product_id: String.t() | nil
}

A validated catalog params request.

Functions

new!(attrs \\ %{})

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

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