No commit activity in last 3 years
No release in over 3 years
Wraps a simple scraper to retrieve the historic exchange rates for Rwandan Franc (RWF). Returns the average (between buy and sell) rates for any yesterday or any day specified and supported by the National Bank of Rwanda.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.3

Runtime

~> 1.6
 Project Readme

Rwanda National Bank Historic Exchange Rates

Wraps a simple scraper to retrieve the historic exchange rates for Rwandan Franc (RWF). Returns the average (between buy and sell) rates for any yesterday or any day specified and supported by the National Bank of Rwanda (BNR).

Install

Add this line to your application's Gemfile:

  gem 'rwanda_national_bank'

And then execute:

$ bundle

Or install it yourself as:

  $ gem install rwanda_national_bank

Usage

Initialize

  xe = RwandaNationalBank::HistoricRates.new as_of: Date.new(2015, 10, 24)
  xe.import! # => true

import! returns true if rates have been found. Might also throw HTTP errors. It will also return false when requesting rates for weekend days.

Retrieve a specific rate

  xe.rate('RWF', 'EUR') # => 768.4235

Get all available currencies:

  xe.currencies # => ['AED', 'SRL', 'USD', 'ZAR', … ]

Get all rates

  xe.rates # => { 'NOK' => 105.556298, 'INR' => 13.619511, … }

Legal

The author of this gem is not affiliated with the National Bank of Rwanda.

License

GPLv3, see LICENSE file

No Warranty

The Software is provided "as is" without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement.