Inttegro.Money.Amount (inttegro v0.2.0)

Copy Markdown View Source

Represents Amount data in the Money 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.

Currency and integer minor-unit amount values used throughout the Inttegro API.

Summary

Types

t()

The decoded amount value.

Functions

Builds a Inttegro.Money.Amount and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Money.Amount{
  currency: Inttegro.Money.Currency.t(),
  value: integer()
}

The decoded amount value.

Functions

new!(attrs \\ %{})

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

Builds a Inttegro.Money.Amount and raises KeyError when a required field is missing.