ibandit 1.8.1 → 1.11.0
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 +4 -4
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +12 -0
- data/README.md +4 -4
- data/data/german_iban_rules.yml +44 -89
- data/data/raw/BLZ2.txt +629 -1044
- data/ibandit.gemspec +2 -1
- data/lib/ibandit/check_digit.rb +1 -1
- data/lib/ibandit/iban.rb +3 -3
- data/lib/ibandit/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c74048b871823152d286048682e6a1a4bb1db5a8127e72bd48a84a7e6f81fbf8
|
4
|
+
data.tar.gz: 7023e177b2718281f7a48da5df65f71ac5dc1c9f84be3b04b1240a66b2a2d03e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6f50eeabcce545b91ae5c3ef98d344a8f38a84a67f9759436895741e50526bf44ac3d3d0e33b639b47dde38c80223346c97423ff82943f02aa0a3cc6c7c3bcb
|
7
|
+
data.tar.gz: 358d0a0467bd6231a0600f6e6250aa789b74bd22db4a947978f5296dc0b57eb6f37574d9d8679fab2540ebcbdcbf137e7aa23eed568e010044f4507055b23ddb
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
inherit_gem:
|
3
3
|
gc_ruboconfig: rubocop.yml
|
4
|
+
require: rubocop-rails
|
4
5
|
|
5
6
|
AllCops:
|
6
7
|
TargetRubyVersion: 2.5
|
@@ -48,3 +49,6 @@ Layout/DotPosition:
|
|
48
49
|
# this is quite aggressive.
|
49
50
|
Gemspec/RequiredRubyVersion:
|
50
51
|
Enabled: false
|
52
|
+
|
53
|
+
Rails/Blank:
|
54
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 1.11.0 - September 5, 2022
|
2
|
+
|
3
|
+
- Update BLZ data - BLZ_20220905
|
4
|
+
|
5
|
+
## 1.10.0 - June 1, 2022
|
6
|
+
|
7
|
+
- Update BLZ data - 05.05.22
|
8
|
+
|
9
|
+
## 1.9.0 - February 16, 2022
|
10
|
+
|
11
|
+
- Update BLZ data - BLZ_20220307
|
12
|
+
|
1
13
|
## 1.8.1 - February 8, 2022
|
2
14
|
|
3
15
|
- Fix issue with structure loading - thanks @shaicoleman
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Ibandit []
|
|
4
4
|
Ibandit is a Ruby library for manipulating and validating
|
5
5
|
[IBANs](http://en.wikipedia.org/wiki/International_Bank_Account_Number).
|
6
6
|
|
7
|
-
The primary objective is to provide an interface that enables the storage and retrieval national banking details as a single value. This may be an IBAN, if a country fully and unambiguously supports it, or a combination of IBAN and/or pseudo-IBAN.
|
7
|
+
The primary objective is to provide an interface that enables the storage and retrieval of national banking details as a single value. This may be an IBAN, if a country fully and unambiguously supports it, or a combination of IBAN and/or pseudo-IBAN.
|
8
8
|
|
9
9
|
Therefore, there are three distinct modes:
|
10
10
|
|
@@ -12,7 +12,7 @@ Therefore, there are three distinct modes:
|
|
12
12
|
2. For countries that have unambiguous IBANs: deconstruct an IBAN into national banking details
|
13
13
|
3. For countries where either of the above is not possible: a pseudo-IBAN as a substitute for the above.
|
14
14
|
|
15
|
-
For storage, you should always try to use the `pseudo_iban`, falling back to `iban` if it not available.
|
15
|
+
For storage, you should always try to use the `pseudo_iban`, falling back to `iban` if it is not available.
|
16
16
|
|
17
17
|
For example:
|
18
18
|
- Sweden does support IBANs (**1.**) but the format is ambiguous due to variable length account numbers so they cannot be deconstructed (**2.**). For persistence, we therefore recommend using pseudo-IBANs (**3.**) because the national banking details can be recovered from them.
|
@@ -129,7 +129,7 @@ end
|
|
129
129
|
Ibandit.modulus_checker = ModulusChecker
|
130
130
|
```
|
131
131
|
|
132
|
-
All three the `valid_bank_code?`, `valid_branch_code?` and `valid_account_number?` methods will receive an `IBAN` object.
|
132
|
+
All three of the `valid_bank_code?`, `valid_branch_code?` and `valid_account_number?` methods will receive an `IBAN` object.
|
133
133
|
`valid_bank_code?` and `valid_branch_code?` should return true unless it is known that the bank/branch code in this IBAN
|
134
134
|
are invalid in the country specified. `valid_account_number?` should return true unless it is known that the account number
|
135
135
|
in this IBAN cannot be valid due to local modulus checking rules.
|
@@ -137,7 +137,7 @@ in this IBAN cannot be valid due to local modulus checking rules.
|
|
137
137
|
### Deconstructing an IBAN into national banking details
|
138
138
|
|
139
139
|
SWIFT define the following components for IBANs, and publish details of how each
|
140
|
-
|
140
|
+
country combines them:
|
141
141
|
|
142
142
|
`country_code`
|
143
143
|
: The [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) country code prefix
|
data/data/german_iban_rules.yml
CHANGED
@@ -17,9 +17,18 @@
|
|
17
17
|
'10010500':
|
18
18
|
:check_digit_rule: '09'
|
19
19
|
:iban_rule: '000000'
|
20
|
+
'10010700':
|
21
|
+
:check_digit_rule: '09'
|
22
|
+
:iban_rule: '000000'
|
20
23
|
'10011001':
|
21
24
|
:check_digit_rule: '09'
|
22
25
|
:iban_rule: '000000'
|
26
|
+
'10014000':
|
27
|
+
:check_digit_rule: '09'
|
28
|
+
:iban_rule: '000000'
|
29
|
+
'10014001':
|
30
|
+
:check_digit_rule: '09'
|
31
|
+
:iban_rule: '000000'
|
23
32
|
'10017997':
|
24
33
|
:check_digit_rule: '09'
|
25
34
|
:iban_rule: '000000'
|
@@ -218,9 +227,6 @@
|
|
218
227
|
'10120100':
|
219
228
|
:check_digit_rule: '94'
|
220
229
|
:iban_rule: '000000'
|
221
|
-
'10120800':
|
222
|
-
:check_digit_rule: '09'
|
223
|
-
:iban_rule: '004800'
|
224
230
|
'10130600':
|
225
231
|
:check_digit_rule: '06'
|
226
232
|
:iban_rule: '000000'
|
@@ -1664,9 +1670,6 @@
|
|
1664
1670
|
'25690009':
|
1665
1671
|
:check_digit_rule: '28'
|
1666
1672
|
:iban_rule: '000000'
|
1667
|
-
'25690010':
|
1668
|
-
:check_digit_rule: '28'
|
1669
|
-
:iban_rule: '000000'
|
1670
1673
|
'25691633':
|
1671
1674
|
:check_digit_rule: '28'
|
1672
1675
|
:iban_rule: '000000'
|
@@ -1802,9 +1805,6 @@
|
|
1802
1805
|
'26251425':
|
1803
1806
|
:check_digit_rule: '00'
|
1804
1807
|
:iban_rule: '000000'
|
1805
|
-
'26261396':
|
1806
|
-
:check_digit_rule: '28'
|
1807
|
-
:iban_rule: '000000'
|
1808
1808
|
'26261492':
|
1809
1809
|
:check_digit_rule: '28'
|
1810
1810
|
:iban_rule: '000000'
|
@@ -1985,9 +1985,6 @@
|
|
1985
1985
|
'26991066':
|
1986
1986
|
:check_digit_rule: '50'
|
1987
1987
|
:iban_rule: '000000'
|
1988
|
-
'27010200':
|
1989
|
-
:check_digit_rule: '09'
|
1990
|
-
:iban_rule: '004800'
|
1991
1988
|
'27020000':
|
1992
1989
|
:check_digit_rule: D8
|
1993
1990
|
:iban_rule: '000000'
|
@@ -2252,9 +2249,6 @@
|
|
2252
2249
|
'28069926':
|
2253
2250
|
:check_digit_rule: '28'
|
2254
2251
|
:iban_rule: '000000'
|
2255
|
-
'28069930':
|
2256
|
-
:check_digit_rule: '28'
|
2257
|
-
:iban_rule: '000000'
|
2258
2252
|
'28069935':
|
2259
2253
|
:check_digit_rule: '28'
|
2260
2254
|
:iban_rule: '000000'
|
@@ -2540,9 +2534,6 @@
|
|
2540
2534
|
'30022000':
|
2541
2535
|
:check_digit_rule: '08'
|
2542
2536
|
:iban_rule: '000000'
|
2543
|
-
'30025500':
|
2544
|
-
:check_digit_rule: '08'
|
2545
|
-
:iban_rule: '000000'
|
2546
2537
|
'30030100':
|
2547
2538
|
:check_digit_rule: '56'
|
2548
2539
|
:iban_rule: '000000'
|
@@ -3035,9 +3026,6 @@
|
|
3035
3026
|
'36010043':
|
3036
3027
|
:check_digit_rule: '24'
|
3037
3028
|
:iban_rule: '000000'
|
3038
|
-
'36010200':
|
3039
|
-
:check_digit_rule: '09'
|
3040
|
-
:iban_rule: '000000'
|
3041
3029
|
'36010424':
|
3042
3030
|
:check_digit_rule: '09'
|
3043
3031
|
:iban_rule: '000000'
|
@@ -3170,9 +3158,6 @@
|
|
3170
3158
|
'37021548':
|
3171
3159
|
:check_digit_rule: '09'
|
3172
3160
|
:iban_rule: '000000'
|
3173
|
-
'37030200':
|
3174
|
-
:check_digit_rule: '09'
|
3175
|
-
:iban_rule: '000000'
|
3176
3161
|
'37030700':
|
3177
3162
|
:check_digit_rule: '19'
|
3178
3163
|
:iban_rule: '000000'
|
@@ -3860,9 +3845,6 @@
|
|
3860
3845
|
'41651965':
|
3861
3846
|
:check_digit_rule: '00'
|
3862
3847
|
:iban_rule: '000000'
|
3863
|
-
'41652560':
|
3864
|
-
:check_digit_rule: '00'
|
3865
|
-
:iban_rule: '000000'
|
3866
3848
|
'41660124':
|
3867
3849
|
:check_digit_rule: '34'
|
3868
3850
|
:iban_rule: '000000'
|
@@ -4355,9 +4337,6 @@
|
|
4355
4337
|
'47262703':
|
4356
4338
|
:check_digit_rule: '34'
|
4357
4339
|
:iban_rule: '000000'
|
4358
|
-
'47263472':
|
4359
|
-
:check_digit_rule: '34'
|
4360
|
-
:iban_rule: '000000'
|
4361
4340
|
'47264367':
|
4362
4341
|
:check_digit_rule: '34'
|
4363
4342
|
:iban_rule: '000000'
|
@@ -4427,9 +4406,6 @@
|
|
4427
4406
|
'47861518':
|
4428
4407
|
:check_digit_rule: '34'
|
4429
4408
|
:iban_rule: '000000'
|
4430
|
-
'47861806':
|
4431
|
-
:check_digit_rule: '34'
|
4432
|
-
:iban_rule: '000000'
|
4433
4409
|
'47862261':
|
4434
4410
|
:check_digit_rule: '34'
|
4435
4411
|
:iban_rule: '000000'
|
@@ -4449,7 +4425,7 @@
|
|
4449
4425
|
:check_digit_rule: '99'
|
4450
4426
|
:iban_rule: '003200'
|
4451
4427
|
'48020151':
|
4452
|
-
:check_digit_rule: '
|
4428
|
+
:check_digit_rule: '09'
|
4453
4429
|
:iban_rule: '000000'
|
4454
4430
|
'48021900':
|
4455
4431
|
:check_digit_rule: '34'
|
@@ -4580,6 +4556,9 @@
|
|
4580
4556
|
'50010200':
|
4581
4557
|
:check_digit_rule: '09'
|
4582
4558
|
:iban_rule: '000000'
|
4559
|
+
'50010300':
|
4560
|
+
:check_digit_rule: '09'
|
4561
|
+
:iban_rule: '000000'
|
4583
4562
|
'50010424':
|
4584
4563
|
:check_digit_rule: '09'
|
4585
4564
|
:iban_rule: '000000'
|
@@ -4688,6 +4667,27 @@
|
|
4688
4667
|
'50040015':
|
4689
4668
|
:check_digit_rule: '13'
|
4690
4669
|
:iban_rule: '000503'
|
4670
|
+
'50040016':
|
4671
|
+
:check_digit_rule: '13'
|
4672
|
+
:iban_rule: '000503'
|
4673
|
+
'50040017':
|
4674
|
+
:check_digit_rule: '13'
|
4675
|
+
:iban_rule: '000503'
|
4676
|
+
'50040018':
|
4677
|
+
:check_digit_rule: '13'
|
4678
|
+
:iban_rule: '000503'
|
4679
|
+
'50040019':
|
4680
|
+
:check_digit_rule: '13'
|
4681
|
+
:iban_rule: '000503'
|
4682
|
+
'50040020':
|
4683
|
+
:check_digit_rule: '13'
|
4684
|
+
:iban_rule: '000503'
|
4685
|
+
'50040021':
|
4686
|
+
:check_digit_rule: '13'
|
4687
|
+
:iban_rule: '000503'
|
4688
|
+
'50040022':
|
4689
|
+
:check_digit_rule: '13'
|
4690
|
+
:iban_rule: '000503'
|
4691
4691
|
'50040033':
|
4692
4692
|
:check_digit_rule: '09'
|
4693
4693
|
:iban_rule: '000100'
|
@@ -5039,9 +5039,6 @@
|
|
5039
5039
|
'50130000':
|
5040
5040
|
:check_digit_rule: '09'
|
5041
5041
|
:iban_rule: '000000'
|
5042
|
-
'50130200':
|
5043
|
-
:check_digit_rule: '09'
|
5044
|
-
:iban_rule: '000100'
|
5045
5042
|
'50130400':
|
5046
5043
|
:check_digit_rule: '10'
|
5047
5044
|
:iban_rule: '000000'
|
@@ -5049,7 +5046,7 @@
|
|
5049
5046
|
:check_digit_rule: '09'
|
5050
5047
|
:iban_rule: '000000'
|
5051
5048
|
'50131000':
|
5052
|
-
:check_digit_rule:
|
5049
|
+
:check_digit_rule: '09'
|
5053
5050
|
:iban_rule: '000000'
|
5054
5051
|
'50190000':
|
5055
5052
|
:check_digit_rule: '06'
|
@@ -5138,9 +5135,6 @@
|
|
5138
5135
|
'50324000':
|
5139
5136
|
:check_digit_rule: '31'
|
5140
5137
|
:iban_rule: '000000'
|
5141
|
-
'50324040':
|
5142
|
-
:check_digit_rule: '31'
|
5143
|
-
:iban_rule: '000000'
|
5144
5138
|
'50330000':
|
5145
5139
|
:check_digit_rule: '06'
|
5146
5140
|
:iban_rule: '000000'
|
@@ -5148,7 +5142,7 @@
|
|
5148
5142
|
:check_digit_rule: '06'
|
5149
5143
|
:iban_rule: '000000'
|
5150
5144
|
'50330201':
|
5151
|
-
:check_digit_rule: '
|
5145
|
+
:check_digit_rule: '09'
|
5152
5146
|
:iban_rule: '000000'
|
5153
5147
|
'50330300':
|
5154
5148
|
:check_digit_rule: '09'
|
@@ -5162,6 +5156,9 @@
|
|
5162
5156
|
'50334400':
|
5163
5157
|
:check_digit_rule: '09'
|
5164
5158
|
:iban_rule: '000000'
|
5159
|
+
'50339900':
|
5160
|
+
:check_digit_rule: '09'
|
5161
|
+
:iban_rule: '000000'
|
5165
5162
|
'50400000':
|
5166
5163
|
:check_digit_rule: '09'
|
5167
5164
|
:iban_rule: '004201'
|
@@ -5519,18 +5516,6 @@
|
|
5519
5516
|
'51230600':
|
5520
5517
|
:check_digit_rule: '09'
|
5521
5518
|
:iban_rule: '000000'
|
5522
|
-
'51230800':
|
5523
|
-
:check_digit_rule: '09'
|
5524
|
-
:iban_rule: '000000'
|
5525
|
-
'51230801':
|
5526
|
-
:check_digit_rule: '09'
|
5527
|
-
:iban_rule: '000000'
|
5528
|
-
'51230802':
|
5529
|
-
:check_digit_rule: '09'
|
5530
|
-
:iban_rule: '000000'
|
5531
|
-
'51230805':
|
5532
|
-
:check_digit_rule: '09'
|
5533
|
-
:iban_rule: '000000'
|
5534
5519
|
'51250000':
|
5535
5520
|
:check_digit_rule: '06'
|
5536
5521
|
:iban_rule: '000000'
|
@@ -5585,12 +5570,12 @@
|
|
5585
5570
|
'51420300':
|
5586
5571
|
:check_digit_rule: '17'
|
5587
5572
|
:iban_rule: '000000'
|
5588
|
-
'51420600':
|
5589
|
-
:check_digit_rule: '09'
|
5590
|
-
:iban_rule: '000000'
|
5591
5573
|
'51430400':
|
5592
5574
|
:check_digit_rule: '09'
|
5593
5575
|
:iban_rule: '000100'
|
5576
|
+
'51430410':
|
5577
|
+
:check_digit_rule: '09'
|
5578
|
+
:iban_rule: '000000'
|
5594
5579
|
'51432100':
|
5595
5580
|
:check_digit_rule: '09'
|
5596
5581
|
:iban_rule: '000000'
|
@@ -5711,9 +5696,6 @@
|
|
5711
5696
|
'52064156':
|
5712
5697
|
:check_digit_rule: '32'
|
5713
5698
|
:iban_rule: '000000'
|
5714
|
-
'52065220':
|
5715
|
-
:check_digit_rule: '32'
|
5716
|
-
:iban_rule: '000000'
|
5717
5699
|
'52069013':
|
5718
5700
|
:check_digit_rule: '32'
|
5719
5701
|
:iban_rule: '000000'
|
@@ -6183,7 +6165,7 @@
|
|
6183
6165
|
:check_digit_rule: '13'
|
6184
6166
|
:iban_rule: '000503'
|
6185
6167
|
'55350010':
|
6186
|
-
:check_digit_rule:
|
6168
|
+
:check_digit_rule: A7
|
6187
6169
|
:iban_rule: '000000'
|
6188
6170
|
'55361202':
|
6189
6171
|
:check_digit_rule: '32'
|
@@ -6743,9 +6725,6 @@
|
|
6743
6725
|
'60020290':
|
6744
6726
|
:check_digit_rule: '99'
|
6745
6727
|
:iban_rule: '003400'
|
6746
|
-
'60020300':
|
6747
|
-
:check_digit_rule: '09'
|
6748
|
-
:iban_rule: '004800'
|
6749
6728
|
'60030000':
|
6750
6729
|
:check_digit_rule: A3
|
6751
6730
|
:iban_rule: '000000'
|
@@ -6833,9 +6812,6 @@
|
|
6833
6812
|
'60069224':
|
6834
6813
|
:check_digit_rule: '10'
|
6835
6814
|
:iban_rule: '000000'
|
6836
|
-
'60069235':
|
6837
|
-
:check_digit_rule: '10'
|
6838
|
-
:iban_rule: '000100'
|
6839
6815
|
'60069239':
|
6840
6816
|
:check_digit_rule: '10'
|
6841
6817
|
:iban_rule: '000000'
|
@@ -7160,9 +7136,6 @@
|
|
7160
7136
|
'60391420':
|
7161
7137
|
:check_digit_rule: '10'
|
7162
7138
|
:iban_rule: '000000'
|
7163
|
-
'60410600':
|
7164
|
-
:check_digit_rule: '09'
|
7165
|
-
:iban_rule: '000000'
|
7166
7139
|
'60420000':
|
7167
7140
|
:check_digit_rule: '06'
|
7168
7141
|
:iban_rule: '000000'
|
@@ -7517,9 +7490,6 @@
|
|
7517
7490
|
'64191030':
|
7518
7491
|
:check_digit_rule: '10'
|
7519
7492
|
:iban_rule: '000000'
|
7520
|
-
'64191210':
|
7521
|
-
:check_digit_rule: '10'
|
7522
|
-
:iban_rule: '000100'
|
7523
7493
|
'64191700':
|
7524
7494
|
:check_digit_rule: '10'
|
7525
7495
|
:iban_rule: '000000'
|
@@ -8342,12 +8312,6 @@
|
|
8342
8312
|
'70013010':
|
8343
8313
|
:check_digit_rule: '67'
|
8344
8314
|
:iban_rule: '000100'
|
8345
|
-
'70013100':
|
8346
|
-
:check_digit_rule: '32'
|
8347
|
-
:iban_rule: '000000'
|
8348
|
-
'70013199':
|
8349
|
-
:check_digit_rule: '32'
|
8350
|
-
:iban_rule: '000000'
|
8351
8315
|
'70013400':
|
8352
8316
|
:check_digit_rule: '09'
|
8353
8317
|
:iban_rule: '000000'
|
@@ -9009,7 +8973,7 @@
|
|
9009
8973
|
:check_digit_rule: '88'
|
9010
8974
|
:iban_rule: '000000'
|
9011
8975
|
'72090500':
|
9012
|
-
:check_digit_rule: '
|
8976
|
+
:check_digit_rule: '09'
|
9013
8977
|
:iban_rule: '000000'
|
9014
8978
|
'72090900':
|
9015
8979
|
:check_digit_rule: '91'
|
@@ -9992,12 +9956,6 @@
|
|
9992
9956
|
'79050000':
|
9993
9957
|
:check_digit_rule: '00'
|
9994
9958
|
:iban_rule: '000000'
|
9995
|
-
'79061000':
|
9996
|
-
:check_digit_rule: '88'
|
9997
|
-
:iban_rule: '000000'
|
9998
|
-
'79062106':
|
9999
|
-
:check_digit_rule: '88'
|
10000
|
-
:iban_rule: '000000'
|
10001
9959
|
'79063060':
|
10002
9960
|
:check_digit_rule: '88'
|
10003
9961
|
:iban_rule: '000000'
|
@@ -10031,9 +9989,6 @@
|
|
10031
9989
|
'79069213':
|
10032
9990
|
:check_digit_rule: '88'
|
10033
9991
|
:iban_rule: '000000'
|
10034
|
-
'79069271':
|
10035
|
-
:check_digit_rule: '88'
|
10036
|
-
:iban_rule: '000000'
|
10037
9992
|
'79070016':
|
10038
9993
|
:check_digit_rule: '63'
|
10039
9994
|
:iban_rule: '002002'
|