This gem allows you to provide a bank name and account number, and will generate the branch code, bank code, and branch name. Singapore banks only. Currently serviced banks are: ['OCBC', 'DBS', 'UOB', 'FEB', 'POSB', 'HSBC', 'Standard Chartered', 'CITIBANK', 'Malayan Banking Berhad']
Add this line to your application's Gemfile:
gem 'SingaporeBankCodes'
And then execute:
$ bundle
Or install it yourself as:
$ gem install SingaporeBankCodes
resolver = BankCodeResolver.new(name: 'POSB', number: '123456789')
resolver.get_result
#returns a hash with keys bank_code, branch_code, branch_name resolved account number and swift code, which can be different from supplied account number
BankCodeResolver.bank_options #for possible bank names
- Fork it ( https://github.com/[my-github-username]/SingaporeBankCodes/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request