class
Money::Currency::RateProvider::Compound
Overview
Currency rate provider composed of multiple other rate providers.
Defined in:
money/currency/rate_provider/compound.crConstant Summary
-
Log =
::Log.for(self)
Constructors
-
.new(pull : JSON::PullParser)
Currency rate provider composed of multiple other rate providers.
- .new(providers : Array(Money::Currency::RateProvider) = [] of RateProvider)
Class Method Summary
-
.key : String
Returns the provider key.
Instance Method Summary
-
#base_currency_codes : Array(String)
Returns an array of supported base currency codes.
-
#exchange_rate?(base : Currency, target : Currency) : Rate | Nil
Returns the exchange rate between base and target currency, or
nil
if not found. - #providers : Array(RateProvider)
- #providers=(providers : Array(RateProvider))
-
#target_currency_codes : Array(String)
Returns an array of supported target currency codes.
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
new(pull : JSON::PullParser)
new
Class methods inherited from class Money::Currency::RateProvider
find(name : String | Symbol) : RateProvider.class
find,
find?(name : String | Symbol) : RateProvider.class | Nil
find?,
registry
registry
Constructor Detail
def self.new(pull : JSON::PullParser)
#
Currency rate provider composed of multiple other rate providers.
Class Method Detail
Instance Method Detail
Description copied from class Money::Currency::RateProvider
Returns an array of supported base currency codes.
Description copied from class Money::Currency::RateProvider
Returns the exchange rate between base and target currency, or nil
if not found.
Description copied from class Money::Currency::RateProvider
Returns an array of supported target currency codes.