class Money::Currency::RateProvider::ExchangeRateAPI

Overview

Exchange Rate API currency rate provider.

Defined in:

money/currency/rate_provider/exchange_rate_api.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Instance methods inherited from class Money::Currency::RateProvider

base_currency_codes : Array(String) base_currency_codes, exchange_rate?(base : Currency, target : Currency) : Rate | Nil exchange_rate?, supports_currency_pair?(base : Currency, target : Currency) : Bool supports_currency_pair?, target_currency_codes : Array(String) target_currency_codes

Constructor methods inherited from class Money::Currency::RateProvider

build(name : String, options : NamedTuple | Hash) : RateProvider
build(name : String, **options) : RateProvider
build

Class methods inherited from class Money::Currency::RateProvider

providers providers

Instance methods inherited from module Money::Mixin::InitializeWith

initialize_with(attributes)
initialize_with(**attributes)
initialize_with

Constructor Detail

def self.new(*, api_key : Nil | String = nil, host : Nil | URI = nil) #

[View source]

Instance Method Detail

def api_key : String #

[View source]
def api_key=(api_key : String) #

[View source]
def base_currency_codes : Array(String) #

https://www.exchangerate-api.com/docs/supported-codes-endpoint


[View source]
def exchange_rate?(base : Currency, target : Currency) : Rate | Nil #

https://www.exchangerate-api.com/docs/pair-conversion-requests


[View source]
def host : URI #

[View source]
def host=(host : URI) #

[View source]