tin_valid 1.2.0 → 1.3.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/CHANGELOG.md +35 -17
- data/README.md +61 -88
- data/doc/algorithms/FS-TIN Algorithms-Public.docx +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_AT_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_BE_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_BG_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_CY_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_CZ_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_DE_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_DK_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_EE_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_EL_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_ES_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_FI_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_FR_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_HR_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_HU_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_IE_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_IT_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_LT_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_LU_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_LV_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_MT_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_NL_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_PL_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_PT_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_RO_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_SE_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_SI_de.pdf +0 -0
- data/doc/tin_by_country/de/TIN_-_country_sheet_SK_de.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_AT_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_BE_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_BG_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_CY_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_CZ_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_DE_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_DK_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_EE_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_EL_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_ES_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_FI_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_FR_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_HR_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_HU_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_IE_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_IT_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_LT_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_LU_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_LV_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_MT_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_NL_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_PL_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_PT_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_RO_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_SE_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_SI_en.pdf +0 -0
- data/doc/tin_by_country/en/TIN_-_country_sheet_SK_en.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_AT_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_BE_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_BG_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_CY_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_CZ_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_DE_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_DK_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_EE_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_EL_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_ES_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_FI_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_FR_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_HR_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_HU_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_IE_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_IT_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_LT_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_LU_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_LV_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_MT_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_NL_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_PL_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_PT_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_RO_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_SE_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_SI_es.pdf +0 -0
- data/doc/tin_by_country/es/TIN_-_country_sheet_SK_es.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_AT_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_BE_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_BG_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_CY_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_CZ_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_DE_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_DK_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_EE_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_EL_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_ES_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_FI_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_FR_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_HR_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_HU_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_IE_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_IT_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_LT_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_LU_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_LV_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_MT_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_NL_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_PL_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_PT_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_RO_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_SE_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_SI_fr.pdf +0 -0
- data/doc/tin_by_country/fr/TIN_-_country_sheet_SK_fr.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_AT_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_BE_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_BG_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_CY_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_CZ_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_DE_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_DK_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_EE_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_EL_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_ES_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_FI_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_FR_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_HR_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_HU_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_IE_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_IT_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_LT_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_LU_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_LV_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_MT_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_NL_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_PL_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_PT_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_RO_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_SE_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_SI_pt.pdf +0 -0
- data/doc/tin_by_country/pt/TIN_-_country_sheet_SK_pt.pdf +0 -0
- data/lib/tin_valid/bulgaria_tin.rb +9 -1
- data/lib/tin_valid/cyprus_tin.rb +1 -1
- data/lib/tin_valid/czechia_tin.rb +2 -0
- data/lib/tin_valid/denmark_tin.rb +4 -5
- data/lib/tin_valid/finland_tin.rb +1 -1
- data/lib/tin_valid/tin.rb +1 -1
- data/lib/tin_valid/version.rb +1 -1
- data/lib/tin_valid.rb +32 -1
- metadata +138 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c999488fc7c2222c662a9efe788629b683ff3162d8841f5fea590cb843ba237
|
|
4
|
+
data.tar.gz: 0d3e35b367f2edeb18334b38b35eb84aad9412396e8bb37a98a9c7668b12dc4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76644d43c083e42a69e09a9888717620467c4ca5d2b09d5f8396bc6bf56a4d92af06ff9b60def50b19241dfdd510810bc65b3dbb272d79205637c1b2c13931d3
|
|
7
|
+
data.tar.gz: 10ec21998fdd04f4494c977f73eb132daa5aaf9004834f02ac49a95fb5485cfa6d5a0fa03a72216fbb3854ed797743b0dfedc340ecd6dc6fcb54d9e75c176110
|
data/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.3.0] - 2025-12-12
|
|
4
|
+
|
|
5
|
+
Features:
|
|
6
|
+
- Add `TinValid::COUNTRY_CODES` to get available country codes.
|
|
7
|
+
|
|
8
|
+
Fixes:
|
|
9
|
+
- Fix Bulgaria to accept TINs starting with `10` instead of `00` 🇧🇬
|
|
10
|
+
- Fix Finland checks for tins ending in `P` 🇫🇮
|
|
11
|
+
- Fix Denmark check for certain ranges of birth years 🇩🇰
|
|
12
|
+
|
|
13
|
+
## [1.2.1] - 2025-05-22
|
|
14
|
+
|
|
15
|
+
Fixes:
|
|
16
|
+
- Accept `/` for Czechia 🇨🇿
|
|
17
|
+
- `TinValid::Tin.new` accept symbols or uppercase country codes.
|
|
18
|
+
- `kind` argument accept symbols.
|
|
19
|
+
|
|
3
20
|
## [1.2.0] - 2025-05-14
|
|
4
21
|
|
|
5
22
|
Features:
|
|
6
23
|
- Add generic `TinValid::Tin.new(country_code: "…", tin: "…").valid?`
|
|
7
|
-
- Add `#siren?` and `#siret?` on `TinValid::FranceTin`
|
|
24
|
+
- Add `#siren?` and `#siret?` on `TinValid::FranceTin` 🇫🇷
|
|
8
25
|
|
|
9
26
|
Fixes:
|
|
10
|
-
- Accept SIRET for France
|
|
27
|
+
- Accept SIRET for France 🇫🇷
|
|
11
28
|
|
|
12
29
|
## [1.1.2] - 2025-05-06
|
|
13
30
|
|
|
14
31
|
Fixes:
|
|
15
|
-
- Fix Luxembourg check
|
|
16
|
-
- Accept SIREN for France
|
|
32
|
+
- Fix Luxembourg check 🇱🇺
|
|
33
|
+
- Accept SIREN for France 🇫🇷
|
|
17
34
|
|
|
18
35
|
## [1.1.1] - 2025-04-28
|
|
19
36
|
|
|
20
37
|
Fixes:
|
|
21
|
-
- Fix birth date check for Italy when year is between 1900..1909 or
|
|
38
|
+
- Fix birth date check for Italy when year is between 1900..1909 or between
|
|
39
|
+
2000..2009 🇮🇹
|
|
22
40
|
|
|
23
41
|
## [1.1.0] - 2025-04-18
|
|
24
42
|
|
|
@@ -57,15 +75,15 @@ Features:
|
|
|
57
75
|
|
|
58
76
|
## [0.1.0] - 2025-04-14
|
|
59
77
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
Features:
|
|
79
|
+
- Add Austria 🇦🇹
|
|
80
|
+
- Add Belgium 🇧🇪
|
|
81
|
+
- Add Bulgaria 🇧🇬
|
|
82
|
+
- Add Croatia 🇭🇷
|
|
83
|
+
- Add Cyprus 🇨🇾
|
|
84
|
+
- Add Czechia 🇨🇿
|
|
85
|
+
- Add Denmark 🇩🇰
|
|
86
|
+
- Add Estonia 🇪🇪
|
|
87
|
+
- Add Germany 🇩🇪
|
|
88
|
+
- Add Greece 🇬🇷
|
|
89
|
+
- Add Sweden 🇸🇪
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TinValid 🇪🇺
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ruby gem to validate Tax Identification Numbers (TINs) for the following European countries:
|
|
4
4
|
|
|
5
5
|
- Austria 🇦🇹
|
|
6
6
|
- Belgium 🇧🇪
|
|
@@ -32,8 +32,12 @@ Validate Tax Identification Numbers (TINs) for the following European countries:
|
|
|
32
32
|
- United Kingdom 🇬🇧
|
|
33
33
|
|
|
34
34
|
See also the
|
|
35
|
-
[TIN
|
|
36
|
-
|
|
35
|
+
[TIN check](https://ec.europa.eu/taxation_customs/tin/#/check-tin),
|
|
36
|
+
the
|
|
37
|
+
[TIN specifications](https://taxation-customs.ec.europa.eu/document/download/d416448b-e055-472d-b0e0-4ffc07a7a407_en?v=1741781900877)
|
|
38
|
+
(link from the
|
|
39
|
+
[Technical information](https://ec.europa.eu/taxation_customs/tin/#/technical-information)
|
|
40
|
+
page) and the
|
|
37
41
|
[descriptions of the structure](https://taxation-customs.ec.europa.eu/online-services/online-services-and-databases-taxation/taxpayer-identification-number-tin_en)
|
|
38
42
|
provided by the European Union.
|
|
39
43
|
|
|
@@ -45,16 +49,9 @@ Add the gem to your application’s Gemfile by executing:
|
|
|
45
49
|
bundle add tin_valid
|
|
46
50
|
```
|
|
47
51
|
|
|
48
|
-
If bundler is not being used to manage dependencies, install the gem by
|
|
49
|
-
executing:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
gem install tin_valid
|
|
53
|
-
```
|
|
54
|
-
|
|
55
52
|
## Usage
|
|
56
53
|
|
|
57
|
-
Check a TIN by providing the country code
|
|
54
|
+
Check a TIN by providing the country code.
|
|
58
55
|
|
|
59
56
|
Also accepts the following optional arguments:
|
|
60
57
|
|
|
@@ -67,7 +64,7 @@ TinValid::Tin.new(country_code: "fr", tin: "3023217600053").valid?
|
|
|
67
64
|
|
|
68
65
|
You can also call countries individually:
|
|
69
66
|
|
|
70
|
-
### Austria (at)
|
|
67
|
+
### Austria 🇦🇹 (at)
|
|
71
68
|
|
|
72
69
|
```rb
|
|
73
70
|
TinValid::AustriaTin.new(
|
|
@@ -75,29 +72,25 @@ TinValid::AustriaTin.new(
|
|
|
75
72
|
).valid?
|
|
76
73
|
```
|
|
77
74
|
|
|
78
|
-
### Belgium (be)
|
|
79
|
-
|
|
80
|
-
`birth_date` is optional
|
|
75
|
+
### Belgium 🇧🇪 (be)
|
|
81
76
|
|
|
82
77
|
```rb
|
|
83
78
|
TinValid::BelgiumTin.new(
|
|
84
79
|
tin: "00012511119",
|
|
85
|
-
birth_date: Date.new(1900, 1, 25),
|
|
80
|
+
birth_date: Date.new(1900, 1, 25), # optional
|
|
86
81
|
).valid?
|
|
87
82
|
```
|
|
88
83
|
|
|
89
|
-
### Bulgaria (bg)
|
|
90
|
-
|
|
91
|
-
`birth_date` is optional
|
|
84
|
+
### Bulgaria 🇧🇬 (bg)
|
|
92
85
|
|
|
93
86
|
```rb
|
|
94
87
|
TinValid::BulgariaTin.new(
|
|
95
88
|
tin: "7501010010",
|
|
96
|
-
birth_date: Date.new(1975, 1, 1),
|
|
89
|
+
birth_date: Date.new(1975, 1, 1), # optional
|
|
97
90
|
).valid?
|
|
98
91
|
```
|
|
99
92
|
|
|
100
|
-
### Croatia (hr)
|
|
93
|
+
### Croatia 🇭🇷 (hr)
|
|
101
94
|
|
|
102
95
|
```rb
|
|
103
96
|
TinValid::CroatiaTin.new(
|
|
@@ -105,59 +98,52 @@ TinValid::CroatiaTin.new(
|
|
|
105
98
|
).valid?
|
|
106
99
|
```
|
|
107
100
|
|
|
108
|
-
### Cyprus (cy)
|
|
109
|
-
|
|
110
|
-
`kind` is optional and can be `"individual"` or `"company"`
|
|
101
|
+
### Cyprus 🇨🇾 (cy)
|
|
111
102
|
|
|
112
103
|
```rb
|
|
113
|
-
TinValid::CyprusTin.new(
|
|
104
|
+
TinValid::CyprusTin.new(
|
|
105
|
+
tin: "00123123T",
|
|
106
|
+
kind: "individual", # optional, can be "individual" or "company"
|
|
107
|
+
).valid?
|
|
114
108
|
```
|
|
115
109
|
|
|
116
|
-
### Czechia (cz)
|
|
117
|
-
|
|
118
|
-
`birth_date` is optional
|
|
110
|
+
### Czechia 🇨🇿 (cz)
|
|
119
111
|
|
|
120
112
|
```rb
|
|
121
113
|
TinValid::CzechiaTin.new(
|
|
122
|
-
tin: "
|
|
123
|
-
birth_date: Date.new(1942, 9, 1),
|
|
114
|
+
tin: "420901/999",
|
|
115
|
+
birth_date: Date.new(1942, 9, 1), # optional
|
|
124
116
|
).valid?
|
|
125
117
|
```
|
|
126
118
|
|
|
127
|
-
### Denmark (dk)
|
|
128
|
-
|
|
129
|
-
`birth_date` is optional
|
|
119
|
+
### Denmark 🇩🇰 (dk)
|
|
130
120
|
|
|
131
121
|
```rb
|
|
132
122
|
TinValid::DenmarkTin.new(
|
|
133
123
|
tin: "0101111113",
|
|
134
|
-
birth_date: Date.new(1911, 1, 1),
|
|
124
|
+
birth_date: Date.new(1911, 1, 1), # optional
|
|
135
125
|
).valid?
|
|
136
126
|
```
|
|
137
127
|
|
|
138
|
-
### Estonia (ee)
|
|
139
|
-
|
|
140
|
-
`birth_date` is optional
|
|
128
|
+
### Estonia 🇪🇪 (ee)
|
|
141
129
|
|
|
142
130
|
```rb
|
|
143
131
|
TinValid::EstoniaTin.new(
|
|
144
132
|
tin: "37102250382",
|
|
145
|
-
birth_date: Date.new(1971, 2, 25),
|
|
133
|
+
birth_date: Date.new(1971, 2, 25), # optional
|
|
146
134
|
).valid?
|
|
147
135
|
```
|
|
148
136
|
|
|
149
|
-
### Finland (fi)
|
|
150
|
-
|
|
151
|
-
`birth_date` is optional
|
|
137
|
+
### Finland 🇫🇮 (fi)
|
|
152
138
|
|
|
153
139
|
```rb
|
|
154
140
|
TinValid::FinlandTin.new(
|
|
155
141
|
tin: "131052-308T",
|
|
156
|
-
birth_date: Date.new(1952, 10, 13),
|
|
142
|
+
birth_date: Date.new(1952, 10, 13), # optional
|
|
157
143
|
).valid?
|
|
158
144
|
```
|
|
159
145
|
|
|
160
|
-
### France (fr)
|
|
146
|
+
### France 🇫🇷 (fr)
|
|
161
147
|
|
|
162
148
|
```rb
|
|
163
149
|
TinValid::FranceTin.new(tin: "3023217600053").valid?
|
|
@@ -171,149 +157,133 @@ TinValid::FranceTin.new(tin: "732829320").siren?
|
|
|
171
157
|
TinValid::FranceTin.new(tin: "73282932000074").siret?
|
|
172
158
|
```
|
|
173
159
|
|
|
174
|
-
### Germany (de)
|
|
160
|
+
### Germany 🇩🇪 (de)
|
|
175
161
|
|
|
176
162
|
```rb
|
|
177
163
|
TinValid::GermanyTin.new(tin: "5133081508159").valid?
|
|
178
164
|
```
|
|
179
165
|
|
|
180
|
-
### Greece (gr)
|
|
166
|
+
### Greece 🇬🇷 (gr)
|
|
181
167
|
|
|
182
168
|
```rb
|
|
183
169
|
TinValid::GreeceTin.new(tin: "999999999").valid?
|
|
184
170
|
```
|
|
185
171
|
|
|
186
|
-
### Hungary (hu)
|
|
172
|
+
### Hungary 🇭🇺 (hu)
|
|
187
173
|
|
|
188
174
|
```rb
|
|
189
175
|
TinValid::HungaryTin.new(tin: "8071592153").valid?
|
|
190
176
|
```
|
|
191
177
|
|
|
192
|
-
### Ireland (ie)
|
|
178
|
+
### Ireland 🇮🇪 (ie)
|
|
193
179
|
|
|
194
180
|
```rb
|
|
195
181
|
TinValid::IrelandTin.new(tin: "1234567T").valid?
|
|
196
182
|
```
|
|
197
183
|
|
|
198
|
-
### Italy (it)
|
|
199
|
-
|
|
200
|
-
`birth_date` is optional
|
|
184
|
+
### Italy 🇮🇹 (it)
|
|
201
185
|
|
|
202
186
|
```rb
|
|
203
187
|
TinValid::ItalyTin.new(
|
|
204
188
|
tin: "DMLPRY77D15H501F",
|
|
205
|
-
birth_date: Date.new(1977, 4, 15),
|
|
189
|
+
birth_date: Date.new(1977, 4, 15), # optional
|
|
206
190
|
).valid?
|
|
207
191
|
```
|
|
208
192
|
|
|
209
|
-
### Latvia (lv)
|
|
210
|
-
|
|
211
|
-
`birth_date` is optional
|
|
193
|
+
### Latvia 🇱🇻 (lv)
|
|
212
194
|
|
|
213
195
|
```rb
|
|
214
196
|
TinValid::LatviaTin.new(
|
|
215
197
|
tin: "01011012345",
|
|
216
|
-
birth_date: Date.new(1910, 1, 1),
|
|
198
|
+
birth_date: Date.new(1910, 1, 1), # optional
|
|
217
199
|
).valid?
|
|
218
200
|
```
|
|
219
201
|
|
|
220
|
-
### Lithuania (lt)
|
|
221
|
-
|
|
222
|
-
`birth_date` is optional
|
|
202
|
+
### Lithuania 🇱🇹 (lt)
|
|
223
203
|
|
|
224
204
|
```rb
|
|
225
205
|
TinValid::LithuaniaTin.new(
|
|
226
206
|
tin: "10101010005",
|
|
227
|
-
birth_date: Date.new(2001, 1, 1),
|
|
207
|
+
birth_date: Date.new(2001, 1, 1), # optional
|
|
228
208
|
).valid?
|
|
229
209
|
```
|
|
230
210
|
|
|
231
|
-
### Luxembourg (lu)
|
|
232
|
-
|
|
233
|
-
`birth_date` is optional
|
|
211
|
+
### Luxembourg 🇱🇺 (lu)
|
|
234
212
|
|
|
235
213
|
```rb
|
|
236
214
|
TinValid::LuxembourgTin.new(
|
|
237
215
|
tin: "1893120105732",
|
|
238
|
-
birth_date: Date.new(1893, 12, 1),
|
|
216
|
+
birth_date: Date.new(1893, 12, 1), # optional
|
|
239
217
|
).valid?
|
|
240
218
|
```
|
|
241
219
|
|
|
242
|
-
### Malta (mt)
|
|
220
|
+
### Malta 🇲🇹 (mt)
|
|
243
221
|
|
|
244
222
|
```rb
|
|
245
223
|
TinValid::MaltaTin.new(tin: "1234567A").valid?
|
|
246
224
|
```
|
|
247
225
|
|
|
248
|
-
### Netherlands (nl)
|
|
226
|
+
### Netherlands 🇳🇱 (nl)
|
|
249
227
|
|
|
250
228
|
```rb
|
|
251
229
|
TinValid::NetherlandsTin.new(tin: "174559434").valid?
|
|
252
230
|
```
|
|
253
231
|
|
|
254
|
-
### Poland (pl)
|
|
255
|
-
|
|
256
|
-
`birth_date` is optional
|
|
232
|
+
### Poland 🇵🇱 (pl)
|
|
257
233
|
|
|
258
234
|
```rb
|
|
259
235
|
TinValid::PolandTin.new(
|
|
260
236
|
tin: "02070803628",
|
|
261
|
-
birth_date: Date.new(1902, 7, 8),
|
|
237
|
+
birth_date: Date.new(1902, 7, 8), # optional
|
|
262
238
|
).valid?
|
|
263
239
|
```
|
|
264
240
|
|
|
265
|
-
### Portugal (pt)
|
|
241
|
+
### Portugal 🇵🇹 (pt)
|
|
266
242
|
|
|
267
243
|
```rb
|
|
268
244
|
TinValid::PortugalTin.new(tin: "299999998").valid?
|
|
269
245
|
```
|
|
270
246
|
|
|
271
|
-
### Romania (ro)
|
|
272
|
-
|
|
273
|
-
`birth_date` is optional
|
|
247
|
+
### Romania 🇷🇴 (ro)
|
|
274
248
|
|
|
275
249
|
```rb
|
|
276
250
|
TinValid::RomaniaTin.new(
|
|
277
251
|
tin: "8001011234567",
|
|
278
|
-
birth_date: Date.new(2000, 10, 11),
|
|
252
|
+
birth_date: Date.new(2000, 10, 11), # optional
|
|
279
253
|
).valid?
|
|
280
254
|
```
|
|
281
255
|
|
|
282
|
-
### Slovakia (sk)
|
|
283
|
-
|
|
284
|
-
`birth_date` is optional
|
|
256
|
+
### Slovakia 🇸🇰 (sk)
|
|
285
257
|
|
|
286
258
|
```rb
|
|
287
259
|
TinValid::SlovakiaTin.new(
|
|
288
260
|
tin: "7711167420",
|
|
289
|
-
birth_date: Date.new(1977, 11, 16),
|
|
261
|
+
birth_date: Date.new(1977, 11, 16), # optional
|
|
290
262
|
).valid?
|
|
291
263
|
```
|
|
292
264
|
|
|
293
|
-
### Slovenia (si)
|
|
265
|
+
### Slovenia 🇸🇮 (si)
|
|
294
266
|
|
|
295
267
|
```rb
|
|
296
268
|
TinValid::SloveniaTin.new(tin: "15012557").valid?
|
|
297
269
|
```
|
|
298
270
|
|
|
299
|
-
### Spain (es)
|
|
271
|
+
### Spain 🇪🇸 (es)
|
|
300
272
|
|
|
301
273
|
```rb
|
|
302
274
|
TinValid::SpainTin.new(tin: "54237A").valid?
|
|
303
275
|
```
|
|
304
276
|
|
|
305
|
-
### Sweden (se)
|
|
306
|
-
|
|
307
|
-
`birth_date` is optional
|
|
277
|
+
### Sweden 🇸🇪 (se)
|
|
308
278
|
|
|
309
279
|
```rb
|
|
310
280
|
TinValid::SwedenTin.new(
|
|
311
281
|
tin: "640823-3234",
|
|
312
|
-
birth_date: Date.new(1964, 8, 23),
|
|
282
|
+
birth_date: Date.new(1964, 8, 23), # optional
|
|
313
283
|
).valid?
|
|
314
284
|
```
|
|
315
285
|
|
|
316
|
-
### United Kingdom (gb)
|
|
286
|
+
### United Kingdom 🇬🇧 (gb)
|
|
317
287
|
|
|
318
288
|
```rb
|
|
319
289
|
TinValid::UnitedKingdomTin.new(tin: "9234567890").valid?
|
|
@@ -325,9 +295,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
|
325
295
|
`bin/rspec` to run the tests. You can also run `bin/console` for an interactive
|
|
326
296
|
prompt that will allow you to experiment.
|
|
327
297
|
|
|
328
|
-
To install this gem onto your local machine, run `bin/rake install`.
|
|
329
|
-
|
|
330
|
-
|
|
298
|
+
To install this gem onto your local machine, run `bin/rake install`.
|
|
299
|
+
|
|
300
|
+
## Release a new version
|
|
301
|
+
|
|
302
|
+
Update the version number in `version.rb`, call `bundle`, add the files using
|
|
303
|
+
`git add --patch` and then create a commit using:
|
|
331
304
|
|
|
332
305
|
```sh
|
|
333
306
|
git commit -m "v`ruby -r./lib/tin_valid/version <<< 'puts TinValid::VERSION + \" 🎉\"'`"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|