currency_conversion v0.3.4 CurrencyConversion.Rates View Source

This is the CurrencyConversion.Rates struct.

Link to this section Summary

Functions

Defines a Currency DataSet

Link to this section Types

Link to this type

t()

View Source
t() :: %CurrencyConversion.Rates{
  base: atom(),
  rates: %{required(atom()) => float()}
}

Link to this section Functions

Link to this function

%CurrencyConversion.Rates{}

View Source (struct)

Defines a Currency DataSet

Values

  • base - Defines the base currency (all other currencies are derived from the base currency)

    • Type: atom
    • Example: :CHF
  • rates

    • Type: %{atom => float}
    • Example: %{CHF: 1.23, EUR: 1.132}

Examples

iex> %CurrencyConversion.Rates{base: :EUR, rates: %{AUD: 1.4205, BGN: 1.9558}}
%CurrencyConversion.Rates{base: :EUR, rates: %{AUD: 1.4205, BGN: 1.9558}}