Welcome to NG BANKS! Inspired by ng_banks by Bolaji Olajide
Ruby Implementation of a Zero dependency gem to get list of banks in Nigeria (Recognized by CBN)
Add this line to your application's Gemfile:
gem 'ng_banks'And then execute:
$ bundleOr install it yourself as:
$ gem install ng_banks NgBanks.getBanks()to get
[{
:name => "ACCESS BANK PLC",
:code => "044",
:slug => "ACC",
:ussd => "*901#"
},
{
:name => "CITIBANK NIGERIA PLC",
:code =>"023",
:slug => "CBN",
:ussd => nil
},
...
] NgBanks.getBank("044")
or
NgBanks.getBank("ACC")to get
{
:name => "ACCESS BANK PLC",
:code => "044",
:slug => "ACC",
:ussd => "*901#"
}Allowed attributes:
:code, :slug, :ussd, :name
NgBanks.getBank_by(:code, "044")
or
NgBanks.getBank_by(:slug, "ACC")
or
NgBanks.getBank_by(:ussd, "*901#")to get
{
:name => "ACCESS BANK PLC",
:code => "044",
:slug => "ACC",
:ussd => "*901#"
}Bug reports and pull requests are welcome on GitHub at https://github.com/jojiAndela/ng_banks. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the NgBanks project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.