Table of Contents - money-currencylayer-bank-0.7.2 Documentation
Pages
-
README
- Money Currencylayer Bank
- Currencylayer API
- Features
- Installation
- Usage
- Minimal requirements.
- New endpoint: apilayer.com/marketplace/currency_data-api or
- old endpoint: currencylayer.com/product
- (optional)
- Use the old endpoint api.currencylayer.com. By default, the new endpoint is used.
- (optional)
- Set the base currency for all rates. By default, USD is used.
- CurrencylayerBank only allows USD as base currency for the free plan users.
- (optional)
- Set the seconds after than the current rates are automatically expired.
- By default, they never expire, in this example 1 day.
- (optional)
- Use https to fetch rates from CurrencylayerBank.
- CurrencylayerBank only allows http as connection for the free plan users.
- (optional)
- Rescue with rates from the cache instead of reporting an error when the endpoint fails.
- Define cache (string or pathname).
- Update rates (get new rates from remote if expired or access rates from cache).
- Be sure to define the cache first before updating the rates.
- Force update rates from remote and store in cache.
- Be sure to define the cache first before updating the rates.
- mclb.update_rates(true)
- Set money rounding mode.
- Set money default bank to Currencylayer bank.
- More methods
- Returns true if configured to use the old endpoint.
- Returns the base currency set for all rates.
- Returns true if configured to rescue rates from the cache.
- Expires rates if the expiration time is reached.
- Returns true if the expiration time is reached.
- Get the API source url.
- Get the rates timestamp of the last API request.
- Get the rates timestamp of loaded rates in memory.
- How to exchange
- Exchange 1000 cents (10.0 USD) to EUR
- Format
- Get the rate
- Using gem money-rails
- Cache
- Process
- Tests
- Refs
- Other Implementations
- Contributors
- Contributing
- License
Classes and Modules
- Money
- Money::Bank
- Money::Bank::CurrencylayerBank
- Money::Bank::InvalidCache
- Money::Bank::NoAccessKey
- Money::RatesStore
- Money::RatesStore::Memory
Methods
- #add_rate — Money::Bank::CurrencylayerBank
- #calc_pair_rate_using_base — Money::Bank::CurrencylayerBank
- #exchange_rates — Money::Bank::CurrencylayerBank
- #expire_rates! — Money::Bank::CurrencylayerBank
- #expired? — Money::Bank::CurrencylayerBank
- #get_rate — Money::Bank::CurrencylayerBank
- #get_rate_or_calc_inverse — Money::Bank::CurrencylayerBank
- #open_url — Money::Bank::CurrencylayerBank
- #rates_expiration — Money::Bank::CurrencylayerBank
- #rates_timestamp — Money::Bank::CurrencylayerBank
- #raw_rates_careful — Money::Bank::CurrencylayerBank
- #raw_rates_straight — Money::Bank::CurrencylayerBank
- #read_from_cache — Money::Bank::CurrencylayerBank
- #read_from_url — Money::Bank::CurrencylayerBank
- #reset! — Money::RatesStore::Memory
- #source — Money::Bank::CurrencylayerBank
- #source= — Money::Bank::CurrencylayerBank
- #source_url — Money::Bank::CurrencylayerBank
- #stale? — Money::Bank::CurrencylayerBank
- #store_in_cache — Money::Bank::CurrencylayerBank
- #super_get_rate — Money::Bank::CurrencylayerBank
- #ttl_in_seconds — Money::Bank::CurrencylayerBank
- #update_rates — Money::Bank::CurrencylayerBank
- #valid_rates? — Money::Bank::CurrencylayerBank
- #write_to_file — Money::Bank::CurrencylayerBank