Money v0.7.0 Money.ExchangeRates.OpenExchangeRates View Source
Link to this section Summary
Functions
Retrieves the latest exchange rates from Open Exchange Rates site
Link to this section Functions
Link to this function
get_latest_rates(config)
View Source
get_latest_rates(Money.ExchangeRates.Config.t()) :: {:ok, Map.t()} | {:error, String.t()}
Retrieves the latest exchange rates from Open Exchange Rates site.
app_id
is a valid Open Exchange Rates app_id. Defaults to the configuredapp_id
inconfig.exs
Returns:
{:ok, rates}
if the rates can be retrieved{:error, reason}
if rates cannot be retrieved
Typically this function is called by the exchange rates retrieval service although it can be called outside that context as required.