-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(banks-registry): Introduce banks registry gem
- Loading branch information
0 parents
commit 9701eb8
Showing
261 changed files
with
449,128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/.idea/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
|
||
# rspec failure tracking | ||
.rspec_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
Exclude: | ||
- 'spec/**/*' | ||
|
||
Documentation: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } | ||
|
||
# Specify your gem's dependencies in iban-to-swift.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
banks_registry (0.1.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
ast (2.4.0) | ||
coderay (1.1.0) | ||
diff-lcs (1.2.5) | ||
jaro_winkler (1.5.1) | ||
method_source (0.8.2) | ||
parallel (1.12.1) | ||
parser (2.5.3.0) | ||
ast (~> 2.4.0) | ||
powerpack (0.1.2) | ||
pry (0.10.2) | ||
coderay (~> 1.1.0) | ||
method_source (~> 0.8.1) | ||
slop (~> 3.4) | ||
rainbow (3.0.0) | ||
rspec (3.3.0) | ||
rspec-core (~> 3.3.0) | ||
rspec-expectations (~> 3.3.0) | ||
rspec-mocks (~> 3.3.0) | ||
rspec-core (3.3.2) | ||
rspec-support (~> 3.3.0) | ||
rspec-expectations (3.3.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.3.0) | ||
rspec-mocks (3.3.2) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.3.0) | ||
rspec-support (3.3.0) | ||
rubocop (0.60.0) | ||
jaro_winkler (~> 1.5.1) | ||
parallel (~> 1.10) | ||
parser (>= 2.5, != 2.5.1.1) | ||
powerpack (~> 0.1) | ||
rainbow (>= 2.2.2, < 4.0) | ||
ruby-progressbar (~> 1.7) | ||
unicode-display_width (~> 1.4.0) | ||
ruby-progressbar (1.10.0) | ||
slop (3.6.0) | ||
unicode-display_width (1.4.0) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
banks_registry! | ||
bundler (~> 1.15) | ||
pry (~> 0.10) | ||
rspec (~> 3.0) | ||
rubocop (~> 0.60.0) | ||
|
||
BUNDLED WITH | ||
1.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Vlad Gramuzov | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# BanksRegistry | ||
|
||
A little Ruby gem to retrieve bank information by BIC/SWIFT/IBAN | ||
|
||
## Installation | ||
|
||
Add this line to your application's Gemfile: | ||
|
||
```ruby | ||
gem 'banks_registry' | ||
``` | ||
|
||
And then execute: | ||
|
||
``` | ||
$ bundle install | ||
``` | ||
|
||
Or install it yourself as: | ||
``` | ||
$ gem install banks_registry | ||
``` | ||
|
||
## Usage | ||
|
||
### Retrieving bank information by BIC/SWIFT number | ||
|
||
```ruby | ||
require 'banks_registry' | ||
|
||
BanksRegistry.find_by_bic('WIREDEMMXXX') | ||
#=> BanksRegistry::Bank | ||
``` | ||
|
||
### Retrieving bank information by IBAN | ||
|
||
**NOTE** that this feature is only available for Switzerland and Germany! | ||
|
||
```ruby | ||
require 'banks_registry' | ||
|
||
BanksRegistry.find_by_iban('DE61 5123 0800 0000 0111 11') | ||
#=> BanksRegistry::Bank | ||
``` | ||
|
||
## Sources | ||
International bank details: | ||
``` | ||
https://transferwise.com | ||
``` | ||
|
||
Swiss national bank numbers: | ||
``` | ||
https://www.six-group.com/interbank-clearing/de/home/bank-master-data/download-bc-bank-master.html | ||
``` | ||
|
||
German national bank numbers: | ||
``` | ||
https://www.bundesbank.de/de/aufgaben/unbarer-zahlungsverkehr/serviceangebot/bankleitzahlen/download---bankleitzahlen-602592 | ||
``` | ||
|
||
Official IBAN registry: | ||
``` | ||
https://www.swift.com/sites/default/files/resources/swift_standards_ibanregistry.pdf | ||
``` | ||
|
||
## Contributing | ||
|
||
Bug reports and pull requests are welcome. | ||
|
||
## License | ||
|
||
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'banks_registry/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'banks_registry' | ||
spec.version = BanksRegistry::VERSION | ||
spec.authors = ['Advanon team'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = 'Banks registry gem.' | ||
spec.description = 'Banks registry gem.' | ||
spec.homepage = 'https://advanon.com' | ||
|
||
raise 'Push protection unavailable' unless spec.respond_to?(:metadata) | ||
|
||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^(test|spec|features)/}) | ||
end | ||
|
||
spec.bindir = 'bin' | ||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency 'bundler', '~> 1.15' | ||
spec.add_development_dependency 'pry', '~> 0.10' | ||
spec.add_development_dependency 'rspec', '~> 3.0' | ||
spec.add_development_dependency 'rubocop', '~> 0.60.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'pry' | ||
require 'bundler/setup' | ||
require 'banks_registry' | ||
|
||
Pry.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
AD: | ||
- name: Andorra Banc Agricol Reig S.a. | ||
swift: BACAADADXXX | ||
swift8: BACAADAD | ||
branch_name: Head Office | ||
branch_address: Manuel Cerqueda Escaler, 6 Ad200 Les Escaldes | ||
branch_code: XXX | ||
city: Les Escaldes | ||
country: Andorra | ||
- name: Banc Sabadell D'andorra | ||
swift: BSANADADXXX | ||
swift8: BSANADAD | ||
branch_name: Head Office | ||
branch_address: Avinguda Del Fener 7 Andorra La Vella | ||
branch_code: XXX | ||
city: Andorra La Vella | ||
country: Andorra | ||
- name: Banca Privada D'andorra S.a. | ||
swift: CASBADADXXX | ||
swift8: CASBADAD | ||
branch_name: Head Office | ||
branch_address: 119 Carlemany Avenue Les Escaldes | ||
branch_code: XXX | ||
city: Les Escaldes | ||
country: Andorra | ||
- name: Credit Andorra | ||
swift: CRDAADADXXX | ||
swift8: CRDAADAD | ||
branch_name: Head Office | ||
branch_address: Av. Meritxell 80 Ad500 Andorra La Vella | ||
branch_code: XXX | ||
city: Andorra La Vella | ||
country: Andorra | ||
- name: Mora Banc Grup Sa | ||
swift: BINAADADXXX | ||
swift8: BINAADAD | ||
branch_name: Head Office | ||
branch_address: 96 Av Meritxell Ad500 Andorra La Vella | ||
branch_code: XXX | ||
city: Andorra La Vella | ||
country: Andorra | ||
- name: Mora Banc Sau | ||
swift: BINAADB1XXX | ||
swift8: BINAADB1 | ||
branch_name: No branch name | ||
branch_address: No branch address | ||
branch_code: XXX | ||
city: Les Escaldes | ||
country: Andorra | ||
- name: Result Internacional Sa | ||
swift: RINSADA1XXX | ||
swift8: RINSADA1 | ||
branch_name: Head Office | ||
branch_address: Edifici Occesa 6 Ad500 Andorra La Vella | ||
branch_code: XXX | ||
city: Andorra La Vella | ||
country: Andorra |
Oops, something went wrong.