valiban converts IBAN code into bank account numbers and bank code numbers. In the future, it will also support validation of IBAN codes.
Some of the basic ideas of this gem were taken from iulianu's iban-tools You'll find the source code on Github.
gem install valiban
require 'valiban'
Valiban::IBAN.get_bank_code_number("AT754805700005040015") => "48057"
Valiban::IBAN.get_bank_account_number("AT754805700005040015") => "00005040015"
Valiban::IBAN.get_country_code("AT754805700005040015") => "AT"
- I also want to add validations for IBAN codes in the future.
- Add more country rules.
- Maybe I extend this library to deal with BIC/SWIFT codes as well