eu_vat_rates_data 2026.2.25 → 2026.3.18
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/README.md +32 -14
- data/data/{eu-vat-rates.json → eu-vat-rates-data.json} +211 -1
- data/lib/eu_vat_rates_data/version.rb +1 -1
- data/lib/eu_vat_rates_data.rb +16 -13
- metadata +15 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0c5e45eabdde7ed97cc381303c24583c2a2533816dd75ffaa8bec1ce318ec68
|
|
4
|
+
data.tar.gz: fb4501ffc97fa70473a1ddfb836fdc902e49fdbaa555d9c78a1f75705fbbd9db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a4b7df2ca8483493fc4eaca785fa7208124a0375eced6bd7d471ec19d48079fe243b3e6920759567c82b6adaf283c75942670b21b44df839973d35fe63da5df
|
|
7
|
+
data.tar.gz: 7d63dc8348a9f6c04ec851736109ddfc0324cd79866d3289ed7b556a9a0d78ecc0172760c4bb7fee9097d7c008362b6d05f9e01d0e9b4d3727dac7f865e5a3c8
|
data/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# eu_vat_rates_data · Ruby
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/eu_vat_rates_data)
|
|
4
|
-
[](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
|
|
4
|
+
[](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
VAT rates for **44 European countries** — EU-27 plus Norway, Switzerland, UK, and more. EU rates sourced from the [European Commission TEDB](https://taxation-customs.ec.europa.eu/tedb/vatRates.html) and checked daily. Non-EU rates maintained manually.
|
|
8
8
|
|
|
9
9
|
- Standard, reduced, super-reduced, and parking rates
|
|
10
|
+
- `eu_member` flag on every country — `true` for EU-27, `false` for non-EU
|
|
10
11
|
- No dependencies — pure Ruby 3.0+
|
|
11
12
|
- Data bundled in the gem — works offline, no network calls
|
|
12
|
-
-
|
|
13
|
+
- EU rates checked daily via GitHub Actions, new version published only when rates change
|
|
13
14
|
|
|
14
15
|
Also available in: [JavaScript/TypeScript (npm)](https://www.npmjs.com/package/eu-vat-rates-data) · [Python (PyPI)](https://pypi.org/project/eu-vat-rates-data/) · [PHP (Packagist)](https://packagist.org/packages/vatnode/eu-vat-rates-data) · [Go](https://pkg.go.dev/github.com/vatnode/eu-vat-rates-data-go)
|
|
15
16
|
|
|
@@ -35,6 +36,7 @@ fi = EuVatRatesData.get_rate("FI")
|
|
|
35
36
|
# {
|
|
36
37
|
# "country" => "Finland",
|
|
37
38
|
# "currency" => "EUR",
|
|
39
|
+
# "eu_member" => true,
|
|
38
40
|
# "standard" => 25.5,
|
|
39
41
|
# "reduced" => [10.0, 13.5],
|
|
40
42
|
# "super_reduced" => nil,
|
|
@@ -44,40 +46,56 @@ fi = EuVatRatesData.get_rate("FI")
|
|
|
44
46
|
# Just the standard rate
|
|
45
47
|
EuVatRatesData.get_standard_rate("DE") # => 19.0
|
|
46
48
|
|
|
47
|
-
#
|
|
49
|
+
# EU membership check — false for non-EU countries (GB, NO, CH, ...)
|
|
48
50
|
if EuVatRatesData.eu_member?(user_input)
|
|
49
|
-
rate = EuVatRatesData.get_rate(user_input)
|
|
51
|
+
rate = EuVatRatesData.get_rate(user_input)
|
|
50
52
|
end
|
|
51
53
|
|
|
52
|
-
# All
|
|
54
|
+
# All 44 countries at once
|
|
53
55
|
EuVatRatesData.all_rates.each do |code, rate|
|
|
54
56
|
puts "#{code}: #{rate['standard']}%"
|
|
55
57
|
end
|
|
56
58
|
|
|
57
|
-
# When were
|
|
58
|
-
puts EuVatRatesData.data_version # e.g. "2026-
|
|
59
|
+
# When were EU rates last fetched?
|
|
60
|
+
puts EuVatRatesData.data_version # e.g. "2026-03-18"
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
|
63
65
|
## Data source & update frequency
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- Canonical data repo: **https://github.com/vatnode/eu-vat-rates-data**
|
|
68
|
-
- Refreshed: **daily at 08:00 UTC**
|
|
67
|
+
- EU-27 rates: **European Commission TEDB**, refreshed **daily at 08:00 UTC**
|
|
68
|
+
- Non-EU rates: maintained manually, updated on official rate changes
|
|
69
69
|
- Published to RubyGems only when actual rates change
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
73
|
## Covered countries
|
|
74
74
|
|
|
75
|
-
EU-27
|
|
75
|
+
**EU-27** (daily auto-updates via EC TEDB):
|
|
76
|
+
|
|
77
|
+
`AT` `BE` `BG` `CY` `CZ` `DE` `DK` `EE` `ES` `FI` `FR` `GR` `HR` `HU` `IE` `IT` `LT` `LU` `LV` `MT` `NL` `PL` `PT` `RO` `SE` `SI` `SK`
|
|
78
|
+
|
|
79
|
+
**Non-EU Europe** (manually maintained):
|
|
76
80
|
|
|
77
|
-
`
|
|
81
|
+
`AD` `AL` `BA` `CH` `GB` `GE` `IS` `LI` `MC` `MD` `ME` `MK` `NO` `RS` `TR` `UA` `XK`
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Need to validate VAT numbers?
|
|
86
|
+
|
|
87
|
+
This package provides **VAT rates** only. If you also need to **validate EU VAT numbers** against the official VIES database — confirming a business is VAT-registered — check out [vatnode.dev](https://vatnode.dev), a simple REST API with a free tier.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
curl https://api.vatnode.dev/v1/vat/FI17156132 \
|
|
91
|
+
-H "Authorization: Bearer vat_live_..."
|
|
92
|
+
# → { "valid": true, "companyName": "Suomen Pehmeä Ikkuna Oy" }
|
|
93
|
+
```
|
|
78
94
|
|
|
79
95
|
---
|
|
80
96
|
|
|
81
97
|
## License
|
|
82
98
|
|
|
83
99
|
MIT
|
|
100
|
+
|
|
101
|
+
If you find this useful, a ⭐ on GitHub is appreciated.
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-
|
|
2
|
+
"version": "2026-03-18",
|
|
3
3
|
"source": "European Commission TEDB",
|
|
4
4
|
"url": "https://taxation-customs.ec.europa.eu/tedb/vatRates.html",
|
|
5
5
|
"rates": {
|
|
6
|
+
"AD": {
|
|
7
|
+
"country": "Andorra",
|
|
8
|
+
"currency": "EUR",
|
|
9
|
+
"standard": 4.5,
|
|
10
|
+
"reduced": [
|
|
11
|
+
1.0,
|
|
12
|
+
2.5
|
|
13
|
+
],
|
|
14
|
+
"super_reduced": null,
|
|
15
|
+
"parking": null,
|
|
16
|
+
"eu_member": false
|
|
17
|
+
},
|
|
18
|
+
"AL": {
|
|
19
|
+
"country": "Albania",
|
|
20
|
+
"currency": "ALL",
|
|
21
|
+
"standard": 20.0,
|
|
22
|
+
"reduced": [
|
|
23
|
+
6.0,
|
|
24
|
+
10.0
|
|
25
|
+
],
|
|
26
|
+
"super_reduced": null,
|
|
27
|
+
"parking": null,
|
|
28
|
+
"eu_member": false
|
|
29
|
+
},
|
|
6
30
|
"AT": {
|
|
7
31
|
"country": "Austria",
|
|
8
32
|
"currency": "EUR",
|
|
33
|
+
"eu_member": true,
|
|
9
34
|
"standard": 20.0,
|
|
10
35
|
"reduced": [
|
|
11
36
|
10.0,
|
|
@@ -15,9 +40,19 @@
|
|
|
15
40
|
"super_reduced": null,
|
|
16
41
|
"parking": null
|
|
17
42
|
},
|
|
43
|
+
"BA": {
|
|
44
|
+
"country": "Bosnia and Herzegovina",
|
|
45
|
+
"currency": "BAM",
|
|
46
|
+
"standard": 17.0,
|
|
47
|
+
"reduced": [],
|
|
48
|
+
"super_reduced": null,
|
|
49
|
+
"parking": null,
|
|
50
|
+
"eu_member": false
|
|
51
|
+
},
|
|
18
52
|
"BE": {
|
|
19
53
|
"country": "Belgium",
|
|
20
54
|
"currency": "EUR",
|
|
55
|
+
"eu_member": true,
|
|
21
56
|
"standard": 21.0,
|
|
22
57
|
"reduced": [
|
|
23
58
|
6.0,
|
|
@@ -29,6 +64,7 @@
|
|
|
29
64
|
"BG": {
|
|
30
65
|
"country": "Bulgaria",
|
|
31
66
|
"currency": "BGN",
|
|
67
|
+
"eu_member": true,
|
|
32
68
|
"standard": 20.0,
|
|
33
69
|
"reduced": [
|
|
34
70
|
9.0
|
|
@@ -36,9 +72,22 @@
|
|
|
36
72
|
"super_reduced": null,
|
|
37
73
|
"parking": null
|
|
38
74
|
},
|
|
75
|
+
"CH": {
|
|
76
|
+
"country": "Switzerland",
|
|
77
|
+
"currency": "CHF",
|
|
78
|
+
"standard": 8.1,
|
|
79
|
+
"reduced": [
|
|
80
|
+
2.6,
|
|
81
|
+
3.8
|
|
82
|
+
],
|
|
83
|
+
"super_reduced": null,
|
|
84
|
+
"parking": null,
|
|
85
|
+
"eu_member": false
|
|
86
|
+
},
|
|
39
87
|
"CY": {
|
|
40
88
|
"country": "Cyprus",
|
|
41
89
|
"currency": "EUR",
|
|
90
|
+
"eu_member": true,
|
|
42
91
|
"standard": 19.0,
|
|
43
92
|
"reduced": [
|
|
44
93
|
5.0,
|
|
@@ -50,6 +99,7 @@
|
|
|
50
99
|
"CZ": {
|
|
51
100
|
"country": "Czech Republic",
|
|
52
101
|
"currency": "CZK",
|
|
102
|
+
"eu_member": true,
|
|
53
103
|
"standard": 21.0,
|
|
54
104
|
"reduced": [
|
|
55
105
|
12.0
|
|
@@ -60,6 +110,7 @@
|
|
|
60
110
|
"DE": {
|
|
61
111
|
"country": "Germany",
|
|
62
112
|
"currency": "EUR",
|
|
113
|
+
"eu_member": true,
|
|
63
114
|
"standard": 19.0,
|
|
64
115
|
"reduced": [
|
|
65
116
|
7.0
|
|
@@ -70,6 +121,7 @@
|
|
|
70
121
|
"DK": {
|
|
71
122
|
"country": "Denmark",
|
|
72
123
|
"currency": "DKK",
|
|
124
|
+
"eu_member": true,
|
|
73
125
|
"standard": 25.0,
|
|
74
126
|
"reduced": [],
|
|
75
127
|
"super_reduced": null,
|
|
@@ -78,6 +130,7 @@
|
|
|
78
130
|
"EE": {
|
|
79
131
|
"country": "Estonia",
|
|
80
132
|
"currency": "EUR",
|
|
133
|
+
"eu_member": true,
|
|
81
134
|
"standard": 24.0,
|
|
82
135
|
"reduced": [
|
|
83
136
|
9.0,
|
|
@@ -89,6 +142,7 @@
|
|
|
89
142
|
"ES": {
|
|
90
143
|
"country": "Spain",
|
|
91
144
|
"currency": "EUR",
|
|
145
|
+
"eu_member": true,
|
|
92
146
|
"standard": 21.0,
|
|
93
147
|
"reduced": [
|
|
94
148
|
10.0
|
|
@@ -99,6 +153,7 @@
|
|
|
99
153
|
"FI": {
|
|
100
154
|
"country": "Finland",
|
|
101
155
|
"currency": "EUR",
|
|
156
|
+
"eu_member": true,
|
|
102
157
|
"standard": 25.5,
|
|
103
158
|
"reduced": [
|
|
104
159
|
10.0,
|
|
@@ -110,6 +165,7 @@
|
|
|
110
165
|
"FR": {
|
|
111
166
|
"country": "France",
|
|
112
167
|
"currency": "EUR",
|
|
168
|
+
"eu_member": true,
|
|
113
169
|
"standard": 20.0,
|
|
114
170
|
"reduced": [
|
|
115
171
|
0.9,
|
|
@@ -125,6 +181,7 @@
|
|
|
125
181
|
"GB": {
|
|
126
182
|
"country": "United Kingdom",
|
|
127
183
|
"currency": "GBP",
|
|
184
|
+
"eu_member": false,
|
|
128
185
|
"standard": 20.0,
|
|
129
186
|
"reduced": [
|
|
130
187
|
5.0
|
|
@@ -132,9 +189,19 @@
|
|
|
132
189
|
"super_reduced": null,
|
|
133
190
|
"parking": null
|
|
134
191
|
},
|
|
192
|
+
"GE": {
|
|
193
|
+
"country": "Georgia",
|
|
194
|
+
"currency": "GEL",
|
|
195
|
+
"standard": 18.0,
|
|
196
|
+
"reduced": [],
|
|
197
|
+
"super_reduced": null,
|
|
198
|
+
"parking": null,
|
|
199
|
+
"eu_member": false
|
|
200
|
+
},
|
|
135
201
|
"GR": {
|
|
136
202
|
"country": "Greece",
|
|
137
203
|
"currency": "EUR",
|
|
204
|
+
"eu_member": true,
|
|
138
205
|
"standard": 24.0,
|
|
139
206
|
"reduced": [
|
|
140
207
|
6.0,
|
|
@@ -147,6 +214,7 @@
|
|
|
147
214
|
"HR": {
|
|
148
215
|
"country": "Croatia",
|
|
149
216
|
"currency": "EUR",
|
|
217
|
+
"eu_member": true,
|
|
150
218
|
"standard": 25.0,
|
|
151
219
|
"reduced": [
|
|
152
220
|
5.0,
|
|
@@ -158,6 +226,7 @@
|
|
|
158
226
|
"HU": {
|
|
159
227
|
"country": "Hungary",
|
|
160
228
|
"currency": "HUF",
|
|
229
|
+
"eu_member": true,
|
|
161
230
|
"standard": 27.0,
|
|
162
231
|
"reduced": [
|
|
163
232
|
5.0,
|
|
@@ -169,6 +238,7 @@
|
|
|
169
238
|
"IE": {
|
|
170
239
|
"country": "Ireland",
|
|
171
240
|
"currency": "EUR",
|
|
241
|
+
"eu_member": true,
|
|
172
242
|
"standard": 23.0,
|
|
173
243
|
"reduced": [
|
|
174
244
|
9.0,
|
|
@@ -177,9 +247,21 @@
|
|
|
177
247
|
"super_reduced": null,
|
|
178
248
|
"parking": null
|
|
179
249
|
},
|
|
250
|
+
"IS": {
|
|
251
|
+
"country": "Iceland",
|
|
252
|
+
"currency": "ISK",
|
|
253
|
+
"standard": 24.0,
|
|
254
|
+
"reduced": [
|
|
255
|
+
11.0
|
|
256
|
+
],
|
|
257
|
+
"super_reduced": null,
|
|
258
|
+
"parking": null,
|
|
259
|
+
"eu_member": false
|
|
260
|
+
},
|
|
180
261
|
"IT": {
|
|
181
262
|
"country": "Italy",
|
|
182
263
|
"currency": "EUR",
|
|
264
|
+
"eu_member": true,
|
|
183
265
|
"standard": 22.0,
|
|
184
266
|
"reduced": [
|
|
185
267
|
5.0,
|
|
@@ -188,9 +270,22 @@
|
|
|
188
270
|
"super_reduced": 4.0,
|
|
189
271
|
"parking": null
|
|
190
272
|
},
|
|
273
|
+
"LI": {
|
|
274
|
+
"country": "Liechtenstein",
|
|
275
|
+
"currency": "CHF",
|
|
276
|
+
"standard": 8.1,
|
|
277
|
+
"reduced": [
|
|
278
|
+
2.6,
|
|
279
|
+
3.8
|
|
280
|
+
],
|
|
281
|
+
"super_reduced": null,
|
|
282
|
+
"parking": null,
|
|
283
|
+
"eu_member": false
|
|
284
|
+
},
|
|
191
285
|
"LT": {
|
|
192
286
|
"country": "Lithuania",
|
|
193
287
|
"currency": "EUR",
|
|
288
|
+
"eu_member": true,
|
|
194
289
|
"standard": 21.0,
|
|
195
290
|
"reduced": [
|
|
196
291
|
5.0,
|
|
@@ -202,6 +297,7 @@
|
|
|
202
297
|
"LU": {
|
|
203
298
|
"country": "Luxembourg",
|
|
204
299
|
"currency": "EUR",
|
|
300
|
+
"eu_member": true,
|
|
205
301
|
"standard": 17.0,
|
|
206
302
|
"reduced": [
|
|
207
303
|
8.0,
|
|
@@ -213,6 +309,7 @@
|
|
|
213
309
|
"LV": {
|
|
214
310
|
"country": "Latvia",
|
|
215
311
|
"currency": "EUR",
|
|
312
|
+
"eu_member": true,
|
|
216
313
|
"standard": 21.0,
|
|
217
314
|
"reduced": [
|
|
218
315
|
5.0,
|
|
@@ -221,9 +318,57 @@
|
|
|
221
318
|
"super_reduced": null,
|
|
222
319
|
"parking": null
|
|
223
320
|
},
|
|
321
|
+
"MC": {
|
|
322
|
+
"country": "Monaco",
|
|
323
|
+
"currency": "EUR",
|
|
324
|
+
"standard": 20.0,
|
|
325
|
+
"reduced": [
|
|
326
|
+
5.5,
|
|
327
|
+
10.0
|
|
328
|
+
],
|
|
329
|
+
"super_reduced": 2.1,
|
|
330
|
+
"parking": null,
|
|
331
|
+
"eu_member": false
|
|
332
|
+
},
|
|
333
|
+
"MD": {
|
|
334
|
+
"country": "Moldova",
|
|
335
|
+
"currency": "MDL",
|
|
336
|
+
"standard": 20.0,
|
|
337
|
+
"reduced": [
|
|
338
|
+
8.0
|
|
339
|
+
],
|
|
340
|
+
"super_reduced": null,
|
|
341
|
+
"parking": null,
|
|
342
|
+
"eu_member": false
|
|
343
|
+
},
|
|
344
|
+
"ME": {
|
|
345
|
+
"country": "Montenegro",
|
|
346
|
+
"currency": "EUR",
|
|
347
|
+
"standard": 21.0,
|
|
348
|
+
"reduced": [
|
|
349
|
+
7.0,
|
|
350
|
+
15.0
|
|
351
|
+
],
|
|
352
|
+
"super_reduced": null,
|
|
353
|
+
"parking": null,
|
|
354
|
+
"eu_member": false
|
|
355
|
+
},
|
|
356
|
+
"MK": {
|
|
357
|
+
"country": "North Macedonia",
|
|
358
|
+
"currency": "MKD",
|
|
359
|
+
"standard": 18.0,
|
|
360
|
+
"reduced": [
|
|
361
|
+
5.0,
|
|
362
|
+
10.0
|
|
363
|
+
],
|
|
364
|
+
"super_reduced": null,
|
|
365
|
+
"parking": null,
|
|
366
|
+
"eu_member": false
|
|
367
|
+
},
|
|
224
368
|
"MT": {
|
|
225
369
|
"country": "Malta",
|
|
226
370
|
"currency": "EUR",
|
|
371
|
+
"eu_member": true,
|
|
227
372
|
"standard": 18.0,
|
|
228
373
|
"reduced": [
|
|
229
374
|
5.0,
|
|
@@ -235,6 +380,7 @@
|
|
|
235
380
|
"NL": {
|
|
236
381
|
"country": "Netherlands",
|
|
237
382
|
"currency": "EUR",
|
|
383
|
+
"eu_member": true,
|
|
238
384
|
"standard": 21.0,
|
|
239
385
|
"reduced": [
|
|
240
386
|
9.0
|
|
@@ -242,9 +388,22 @@
|
|
|
242
388
|
"super_reduced": null,
|
|
243
389
|
"parking": null
|
|
244
390
|
},
|
|
391
|
+
"NO": {
|
|
392
|
+
"country": "Norway",
|
|
393
|
+
"currency": "NOK",
|
|
394
|
+
"standard": 25.0,
|
|
395
|
+
"reduced": [
|
|
396
|
+
12.0,
|
|
397
|
+
15.0
|
|
398
|
+
],
|
|
399
|
+
"super_reduced": null,
|
|
400
|
+
"parking": null,
|
|
401
|
+
"eu_member": false
|
|
402
|
+
},
|
|
245
403
|
"PL": {
|
|
246
404
|
"country": "Poland",
|
|
247
405
|
"currency": "PLN",
|
|
406
|
+
"eu_member": true,
|
|
248
407
|
"standard": 23.0,
|
|
249
408
|
"reduced": [
|
|
250
409
|
5.0,
|
|
@@ -256,6 +415,7 @@
|
|
|
256
415
|
"PT": {
|
|
257
416
|
"country": "Portugal",
|
|
258
417
|
"currency": "EUR",
|
|
418
|
+
"eu_member": true,
|
|
259
419
|
"standard": 23.0,
|
|
260
420
|
"reduced": [
|
|
261
421
|
6.0,
|
|
@@ -269,6 +429,7 @@
|
|
|
269
429
|
"RO": {
|
|
270
430
|
"country": "Romania",
|
|
271
431
|
"currency": "RON",
|
|
432
|
+
"eu_member": true,
|
|
272
433
|
"standard": 21.0,
|
|
273
434
|
"reduced": [
|
|
274
435
|
11.0
|
|
@@ -276,9 +437,21 @@
|
|
|
276
437
|
"super_reduced": null,
|
|
277
438
|
"parking": null
|
|
278
439
|
},
|
|
440
|
+
"RS": {
|
|
441
|
+
"country": "Serbia",
|
|
442
|
+
"currency": "RSD",
|
|
443
|
+
"standard": 20.0,
|
|
444
|
+
"reduced": [
|
|
445
|
+
10.0
|
|
446
|
+
],
|
|
447
|
+
"super_reduced": null,
|
|
448
|
+
"parking": null,
|
|
449
|
+
"eu_member": false
|
|
450
|
+
},
|
|
279
451
|
"SE": {
|
|
280
452
|
"country": "Sweden",
|
|
281
453
|
"currency": "SEK",
|
|
454
|
+
"eu_member": true,
|
|
282
455
|
"standard": 25.0,
|
|
283
456
|
"reduced": [
|
|
284
457
|
6.0,
|
|
@@ -290,6 +463,7 @@
|
|
|
290
463
|
"SI": {
|
|
291
464
|
"country": "Slovenia",
|
|
292
465
|
"currency": "EUR",
|
|
466
|
+
"eu_member": true,
|
|
293
467
|
"standard": 22.0,
|
|
294
468
|
"reduced": [
|
|
295
469
|
5.0,
|
|
@@ -301,6 +475,7 @@
|
|
|
301
475
|
"SK": {
|
|
302
476
|
"country": "Slovakia",
|
|
303
477
|
"currency": "EUR",
|
|
478
|
+
"eu_member": true,
|
|
304
479
|
"standard": 23.0,
|
|
305
480
|
"reduced": [
|
|
306
481
|
5.0,
|
|
@@ -308,6 +483,41 @@
|
|
|
308
483
|
],
|
|
309
484
|
"super_reduced": null,
|
|
310
485
|
"parking": null
|
|
486
|
+
},
|
|
487
|
+
"TR": {
|
|
488
|
+
"country": "Turkey",
|
|
489
|
+
"currency": "TRY",
|
|
490
|
+
"standard": 20.0,
|
|
491
|
+
"reduced": [
|
|
492
|
+
1.0,
|
|
493
|
+
10.0
|
|
494
|
+
],
|
|
495
|
+
"super_reduced": null,
|
|
496
|
+
"parking": null,
|
|
497
|
+
"eu_member": false
|
|
498
|
+
},
|
|
499
|
+
"UA": {
|
|
500
|
+
"country": "Ukraine",
|
|
501
|
+
"currency": "UAH",
|
|
502
|
+
"standard": 20.0,
|
|
503
|
+
"reduced": [
|
|
504
|
+
7.0,
|
|
505
|
+
14.0
|
|
506
|
+
],
|
|
507
|
+
"super_reduced": null,
|
|
508
|
+
"parking": null,
|
|
509
|
+
"eu_member": false
|
|
510
|
+
},
|
|
511
|
+
"XK": {
|
|
512
|
+
"country": "Kosovo",
|
|
513
|
+
"currency": "EUR",
|
|
514
|
+
"standard": 18.0,
|
|
515
|
+
"reduced": [
|
|
516
|
+
8.0
|
|
517
|
+
],
|
|
518
|
+
"super_reduced": null,
|
|
519
|
+
"parking": null,
|
|
520
|
+
"eu_member": false
|
|
311
521
|
}
|
|
312
522
|
}
|
|
313
523
|
}
|
data/lib/eu_vat_rates_data.rb
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
require_relative "eu_vat_rates_data/version"
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
# VAT rates for 44 European countries (EU-27 + 17 non-EU).
|
|
5
5
|
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
6
|
+
# EU rates sourced from the European Commission TEDB (Taxes in Europe Database),
|
|
7
|
+
# checked daily. Non-EU rates maintained manually.
|
|
8
8
|
#
|
|
9
9
|
# Usage:
|
|
10
10
|
# require "eu_vat_rates_data"
|
|
11
11
|
#
|
|
12
12
|
# EuVatRatesData.get_rate("FI")
|
|
13
|
-
# # => {"country"=>"Finland", "currency"=>"EUR", "
|
|
14
|
-
# # "reduced"=>[10.0, 13.5], "super_reduced"=>nil, "parking"=>nil}
|
|
13
|
+
# # => {"country"=>"Finland", "currency"=>"EUR", "eu_member"=>true,
|
|
14
|
+
# # "standard"=>25.5, "reduced"=>[10.0, 13.5], "super_reduced"=>nil, "parking"=>nil}
|
|
15
15
|
#
|
|
16
16
|
# EuVatRatesData.get_standard_rate("DE") # => 19.0
|
|
17
|
+
# EuVatRatesData.eu_member?("NO") # => false
|
|
17
18
|
# EuVatRatesData.eu_member?("FR") # => true
|
|
18
|
-
# EuVatRatesData.data_version # => "2026-
|
|
19
|
+
# EuVatRatesData.data_version # => "2026-03-18"
|
|
19
20
|
module EuVatRatesData
|
|
20
|
-
DATA_FILE = File.expand_path("../../data/eu-vat-rates.json", __dir__)
|
|
21
|
+
DATA_FILE = File.expand_path("../../data/eu-vat-rates-data.json", __dir__)
|
|
21
22
|
|
|
22
23
|
@dataset = nil
|
|
23
24
|
|
|
@@ -30,7 +31,7 @@ module EuVatRatesData
|
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
# Return the full rate hash for a country, or nil if not found.
|
|
33
|
-
# @param country_code [String] ISO 3166-1 alpha-2 code (e.g. "FI", "DE", "
|
|
34
|
+
# @param country_code [String] ISO 3166-1 alpha-2 code (e.g. "FI", "DE", "NO")
|
|
34
35
|
# @return [Hash, nil]
|
|
35
36
|
def self.get_rate(country_code)
|
|
36
37
|
rates[country_code.upcase]
|
|
@@ -44,21 +45,23 @@ module EuVatRatesData
|
|
|
44
45
|
rate&.fetch("standard")
|
|
45
46
|
end
|
|
46
47
|
|
|
47
|
-
# Return all
|
|
48
|
+
# Return all 44 country rate hashes keyed by ISO country code.
|
|
48
49
|
# @return [Hash{String => Hash}]
|
|
49
50
|
def self.all_rates
|
|
50
51
|
rates.dup
|
|
51
52
|
end
|
|
52
53
|
|
|
53
|
-
# Return true if the country
|
|
54
|
+
# Return true if the country is an EU-27 member state.
|
|
55
|
+
# Returns false for non-EU countries (GB, NO, CH, etc.) and unknown codes.
|
|
54
56
|
# @param country_code [String] ISO 3166-1 alpha-2 code
|
|
55
57
|
# @return [Boolean]
|
|
56
58
|
def self.eu_member?(country_code)
|
|
57
|
-
|
|
59
|
+
rate = get_rate(country_code)
|
|
60
|
+
rate ? rate["eu_member"] == true : false
|
|
58
61
|
end
|
|
59
62
|
|
|
60
|
-
# Return the ISO 8601 date when data was last fetched from EC TEDB.
|
|
61
|
-
# @return [String] e.g. "2026-
|
|
63
|
+
# Return the ISO 8601 date when EU data was last fetched from EC TEDB.
|
|
64
|
+
# @return [String] e.g. "2026-03-18"
|
|
62
65
|
def self.data_version
|
|
63
66
|
dataset["version"]
|
|
64
67
|
end
|
metadata
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eu_vat_rates_data
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2026.
|
|
4
|
+
version: 2026.3.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iurii Rogulia
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: EU VAT rates
|
|
14
|
-
|
|
13
|
+
description: EU VAT rates (standard, reduced, super-reduced, parking) for all 27 EU
|
|
14
|
+
member states plus UK. Updated daily from the official European Commission TEDB.
|
|
15
|
+
Useful for billing, invoicing, e-commerce, fintech, and VAT MOSS compliance.
|
|
15
16
|
email:
|
|
16
17
|
- iurii@rogulia.fi
|
|
17
18
|
executables: []
|
|
@@ -20,17 +21,17 @@ extra_rdoc_files: []
|
|
|
20
21
|
files:
|
|
21
22
|
- LICENSE
|
|
22
23
|
- README.md
|
|
23
|
-
- data/eu-vat-rates.json
|
|
24
|
+
- data/eu-vat-rates-data.json
|
|
24
25
|
- lib/eu_vat_rates_data.rb
|
|
25
26
|
- lib/eu_vat_rates_data/version.rb
|
|
26
|
-
homepage: https://github.com/vatnode/eu-vat-rates-ruby
|
|
27
|
+
homepage: https://github.com/vatnode/eu-vat-rates-data-ruby
|
|
27
28
|
licenses:
|
|
28
29
|
- MIT
|
|
29
30
|
metadata:
|
|
30
|
-
homepage_uri: https://github.com/vatnode/eu-vat-rates-ruby
|
|
31
|
-
source_code_uri: https://github.com/vatnode/eu-vat-rates-ruby
|
|
32
|
-
bug_tracker_uri: https://github.com/vatnode/eu-vat-rates-ruby/issues
|
|
33
|
-
post_install_message:
|
|
31
|
+
homepage_uri: https://github.com/vatnode/eu-vat-rates-data-ruby
|
|
32
|
+
source_code_uri: https://github.com/vatnode/eu-vat-rates-data-ruby
|
|
33
|
+
bug_tracker_uri: https://github.com/vatnode/eu-vat-rates-data-ruby/issues
|
|
34
|
+
post_install_message:
|
|
34
35
|
rdoc_options: []
|
|
35
36
|
require_paths:
|
|
36
37
|
- lib
|
|
@@ -45,8 +46,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
45
46
|
- !ruby/object:Gem::Version
|
|
46
47
|
version: '0'
|
|
47
48
|
requirements: []
|
|
48
|
-
rubygems_version: 3.
|
|
49
|
-
signing_key:
|
|
49
|
+
rubygems_version: 3.0.3.1
|
|
50
|
+
signing_key:
|
|
50
51
|
specification_version: 4
|
|
51
|
-
summary: EU VAT rates for all 27 member states + UK
|
|
52
|
+
summary: EU VAT rates for all 27 member states + UK — daily auto-updates from EC TEDB
|
|
52
53
|
test_files: []
|