Table of Contents - money-openexchangerates-bank-0.1.2 Documentation
Pages
-
README
- Money Openexchangerates Bank
- Openexchangerates API
- Features
- Installation
- Usage
- Minimal requirements
- Update rates (get new rates from remote if expired or access rates from cache)
- Force update rates from remote and store in cache
- moxb.update_rates(true)
- (optional)
- Set the base currency for all rates. By default, USD is used.
- OpenexchangeratesBank 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 OpenexchangeratesBank
- OpenexchangeratesBank only allows http as connection for the free plan users.
- Define cache (string or pathname)
- Set money default bank to Openexchangerates bank
- More methods
- Returns the base currency set for all rates.
- Include also alternative rates.
- Get only alternative rates.
- Default is nil to get only regular rates.
- moxb.alternatives = nil
- 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::InvalidCache
- Money::Bank::NoAccessKey
- Money::Bank::OpenexchangeratesBank
- Money::RatesStore
- Money::RatesStore::Memory
Methods
- #add_rate — Money::Bank::OpenexchangeratesBank
- #alternatives — Money::Bank::OpenexchangeratesBank
- #alternatives= — Money::Bank::OpenexchangeratesBank
- #calc_pair_rate_using_base — Money::Bank::OpenexchangeratesBank
- #exchange_rates — Money::Bank::OpenexchangeratesBank
- #expire_rates! — Money::Bank::OpenexchangeratesBank
- #expired? — Money::Bank::OpenexchangeratesBank
- #get_rate — Money::Bank::OpenexchangeratesBank
- #get_rate_or_calc_inverse — Money::Bank::OpenexchangeratesBank
- #open_url — Money::Bank::OpenexchangeratesBank
- #rates_expiration — Money::Bank::OpenexchangeratesBank
- #rates_timestamp — Money::Bank::OpenexchangeratesBank
- #raw_rates_careful — Money::Bank::OpenexchangeratesBank
- #raw_rates_straight — Money::Bank::OpenexchangeratesBank
- #read_from_cache — Money::Bank::OpenexchangeratesBank
- #read_from_url — Money::Bank::OpenexchangeratesBank
- #reset! — Money::RatesStore::Memory
- #source — Money::Bank::OpenexchangeratesBank
- #source= — Money::Bank::OpenexchangeratesBank
- #source_url — Money::Bank::OpenexchangeratesBank
- #stale? — Money::Bank::OpenexchangeratesBank
- #store_in_cache — Money::Bank::OpenexchangeratesBank
- #super_get_rate — Money::Bank::OpenexchangeratesBank
- #ttl_in_seconds — Money::Bank::OpenexchangeratesBank
- #update_rates — Money::Bank::OpenexchangeratesBank
- #valid_rates? — Money::Bank::OpenexchangeratesBank
- #write_to_file — Money::Bank::OpenexchangeratesBank