ClearBank.Schemas.FxQuote (ClearBank v1.0.0)

Copy Markdown View Source

Typed struct for an FX RFQ quote.

Summary

Functions

Returns true if the quote has expired.

Types

t()

@type t() :: %ClearBank.Schemas.FxQuote{
  buy_amount: String.t() | nil,
  buy_currency: String.t(),
  expires_at: String.t(),
  quote_id: String.t(),
  rate: String.t(),
  sell_amount: String.t() | nil,
  sell_currency: String.t()
}

Functions

expired?(fx_quote)

@spec expired?(t()) :: boolean()

Returns true if the quote has expired.

from_map(m)

@spec from_map(map()) :: t()