Skip to content

Dmytrenko-I/nbu_rates

Repository files navigation

NBU Rates

Gem for fetching currency from National bank of Ukraine

This is a version to parse XML response. Version to parse JSON you can find at nbu_json branch.

Installation

Add this line to your application's Gemfile:

gem 'nbu_rates'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install nbu_rates

Usage

require 'nbu_rates'

usd = Money.new('1_50', 'USD')

result = NbuRates.new.exchange(usd, 'CAD')

puts "1.50 USD ~> CAD: #{result.format}"

How to work with object Money: documentation

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Dmytrenko-I/nbu_rates.

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published