Wrapper for the iban.com validation api (v2)
See the API docs.
- Ruby 2.2+.
If you are installing via bundler, you should be sure to use the https rubygems source in your Gemfile, as any gems fetched over http could potentially be compromised in transit and alter the code of gems fetched securely over https:
source 'https://rubygems.org'
gem 'iban_client'
IbanClient.configure do |config|
config.api_key = 'you api key'
config.timeout = 2
end
iban = IbanClient::Iban.new('FR7616798000010000005663951')
iban.valid? # => true
iban.bic # => "TRZOFR21"
iban.bank # => "TREEZOR SAS"
iban.address # => "150 RUE GALLIENI"
iban.city # => "BOULOGNE BILLANCOURT CEDEX"
iban.state # => nil
iban.zip # => "92641"
iban.country # => "FRANCE"
iban.country_iso # => "FR"
iban.bic # => "TRZOFR21"
iban.account # => "00000056639"
Run all tests:
bundle exec rspec