sepa_clearer 0.0.2 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +24 -0
- data/README.md +20 -7
- data/bin/update_data +2 -2
- data/data/deutsche_bundesbank.csv +4779 -48021
- data/data/deutsche_bundesbank.db +0 -0
- data/lib/sepa_clearer/clearer.rb +51 -5
- data/lib/sepa_clearer/deutsche_bundesbank.rb +12 -13
- data/lib/sepa_clearer/payment_provider.rb +38 -5
- data/lib/sepa_clearer/version.rb +1 -1
- data/sepa-clearer.gemspec +1 -0
- data/spec/clearer_spec.rb +6 -2
- data/spec/deutsche_bundesbank_spec.rb +9 -5
- data/spec/payment_provider_spec.rb +47 -3
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7ccab8e5cfb79eeb9c0f9ba16bbc8f6772e720d33184010ddc43d2dc64579f74
|
4
|
+
data.tar.gz: 38d6de10268e03908a2a9b5fa89d2e4a711b48c9e4b67d159064b516aa1c2ff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7008ca7c764d2a04d361efad24a47b618a546e82aabc9438af5ba44bd5a175540da3c900722cee4d1c1cf5ba34d25a3e461d5380818cef6d5dc41cad80dc7952
|
7
|
+
data.tar.gz: 3cbae9f765e94dbd4760289b03ee7b276f9fcde908ff023ef54a0f9290176db2294f0f9a523716a612788a9ea9dda643e3ed05d7184363de849b334d074685b8
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,30 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
v0.4.0
|
5
|
+
------
|
6
|
+
|
7
|
+
* Updated list of sepa clearers
|
8
|
+
|
9
|
+
v0.3.0
|
10
|
+
------
|
11
|
+
|
12
|
+
* fixing issues to make importing possible (but yet not automated)
|
13
|
+
* `PaymentProvider` returns normalized BIC
|
14
|
+
|
15
|
+
v0.2.0
|
16
|
+
------
|
17
|
+
|
18
|
+
* Return list of provided direct debit instruments via PaymentProvider#direct_debit_instruments. The returned list is
|
19
|
+
sorted by the speed of the instrument. This way it is possible to select the fastest istrument by calling .first on it
|
20
|
+
|
21
|
+
v0.1.0
|
22
|
+
------
|
23
|
+
|
24
|
+
* Replace in-memory datastore with sqlite3 based one. The class api should be
|
25
|
+
the same.
|
26
|
+
|
27
|
+
|
4
28
|
v0.0.2
|
5
29
|
------
|
6
30
|
|
data/README.md
CHANGED
@@ -5,15 +5,16 @@ system. The gem currently supports only "Deutsche Bundesbank" as a clearer. You
|
|
5
5
|
can fetch all providers and their capabilities or fetch only a unique provider
|
6
6
|
by his BIC.
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The gem comes with a sqlite3 database which contains all data. In order to access
|
9
|
+
it, you need to have sqlite3 installed.
|
10
10
|
|
11
|
+
__Last data update: 2016-12-20__
|
11
12
|
|
12
13
|
## Installation
|
13
14
|
|
14
15
|
Add this line to your application's Gemfile:
|
15
16
|
|
16
|
-
gem '
|
17
|
+
gem 'sepa_clearer'
|
17
18
|
|
18
19
|
And then execute:
|
19
20
|
|
@@ -21,21 +22,26 @@ And then execute:
|
|
21
22
|
|
22
23
|
Or install it yourself as:
|
23
24
|
|
24
|
-
$ gem install
|
25
|
+
$ gem install sepa_clearer
|
25
26
|
|
26
27
|
|
27
28
|
## Usage
|
29
|
+
require 'sepa_clearer'
|
28
30
|
|
29
31
|
# Create a new cleaer instance
|
30
|
-
clearer = SepaClearer::Clearer.new
|
32
|
+
clearer = SepaClearer::Clearer.new
|
31
33
|
|
32
34
|
# Fetch all payment providers
|
33
35
|
clearer.all
|
34
36
|
# => [<PaymentProvider: …>, <PaymentProvider: …>]
|
35
37
|
|
36
38
|
# Fetch a single provider by his identifier code. The BIC is normalized (uppercase and 11 letters filled with X)
|
37
|
-
clearer.find_by_bic('DEIRGENDWAS')
|
38
|
-
# => <PaymentProvider: @bic="DEIRGENDWAS", @name="
|
39
|
+
provider = clearer.find_by_bic('DEIRGENDWAS')
|
40
|
+
# => <PaymentProvider: @bic="DEIRGENDWAS", @name="YOUR PROVIDER", @sct=false, @core=true, @cor1=true, @b2b=false>
|
41
|
+
|
42
|
+
# Get all capabilities
|
43
|
+
provider.capabilities
|
44
|
+
# => [:core, :cor1]
|
39
45
|
|
40
46
|
|
41
47
|
## Update clearer list
|
@@ -47,6 +53,13 @@ If the script fails, check if the urls have changed. You should find the data he
|
|
47
53
|
http://www.bundesbank.de/Navigation/EN/Tasks/Payment_systems/SEPA/SCL_Directory/scl_directory.html
|
48
54
|
|
49
55
|
|
56
|
+
```ruby
|
57
|
+
clearer = SepaClearer::Clearer.new
|
58
|
+
clearer.delete
|
59
|
+
|
60
|
+
SepaClearer::DeutscheBundesbank.new.data.each { |provider| clearer.add(provider) }; nil
|
61
|
+
```
|
62
|
+
|
50
63
|
## Contributing
|
51
64
|
|
52
65
|
1. Fork it ( https://github.com/railslove/sepa-clearer/fork )
|
data/bin/update_data
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
echo "Fetching new data from Bundesbank"
|
3
|
-
curl
|
3
|
+
curl https://www.bundesbank.de/resource/blob/602880/e700b500312d5c1bae11544e00c29650/mL/verzeichnis-der-erreichbaren-zahlungsdienstleister-data.csv > data/bundesbank.new.csv
|
4
4
|
|
5
5
|
echo "Remove first crappy line"
|
6
6
|
sed -i "" 1d data/bundesbank.new.csv
|