sepa_clearer 0.0.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5ab7c92f7cf252703f2f0ab62a13f89d317a2801
4
- data.tar.gz: 0b7158c517ba56c29c28a8a801b44a0adba5198e
2
+ SHA256:
3
+ metadata.gz: 7ccab8e5cfb79eeb9c0f9ba16bbc8f6772e720d33184010ddc43d2dc64579f74
4
+ data.tar.gz: 38d6de10268e03908a2a9b5fa89d2e4a711b48c9e4b67d159064b516aa1c2ff8
5
5
  SHA512:
6
- metadata.gz: 33a42b42f3cb089a71e71cc594c9fe52ca135e0225454233d9594bbbceee3cbb80d95a8945b7b24e07dac4a90f0e7e313fa44dd955c90da774460aaf1b1c11ee
7
- data.tar.gz: 1f07d8f9ed72c4f41a07efb28c275ad5e1c690245248b39f5a2287dbefdb7b807fced7225ca5f6419d6af1b921853a720bcbdb29aef943a2ee697c2b6f2abea1
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
- Currently the gem fetches all data into memory which can be quite heavy. You
9
- might want to store it in your local database for quick and easy access.
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 'sepa-clearer'
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 sepa-clearer
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('DeutscheBundesbank')
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="Your Provider", @supports=[:core, :cor1]>
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 ruby
1
+ #!/usr/bin/env bash
2
2
  echo "Fetching new data from Bundesbank"
3
- curl http://www.bundesbank.de/Redaktion/DE/Downloads/Aufgaben/Unbarer_Zahlungsverkehr/SEPA/verzeichnis_der_erreichbaren_zahlungsdienstleister.csv?__blob=publicationFile > data/bundesbank.new.csv
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