Inttegro.Money.AmountParams (inttegro v0.2.0)

Copy Markdown View Source

Parameters for Amount Params in the Money API.

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

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

Summary

Types

t()

A validated amount params request.

Functions

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

Types

t()

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

A validated amount params request.

Functions

new!(attrs \\ %{})

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

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