eu_vat_rates_data 2026.2.25

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 15357688842bd70586f57a2678b08ce246ebb0e525248c9e12ae67a2051c01d9
4
+ data.tar.gz: ecad4f2631121944b1cd9036b8527a9bfa7f9c1e70bc8ff2bae7bd2d5c84c8ce
5
+ SHA512:
6
+ metadata.gz: a925836fe270f468c0f4eba847a42856b2e8f3b30d5f566aaeeea9b75e08dc11d0d97c8d33f0c814d83dbb94ea55f5eb7412f82bdb3bc0161f6dc4f5e7b5834a
7
+ data.tar.gz: 54d9df56f30f2c8cc202eae9293612cbdf9c8b82fe941d1e7f9246ccca3f257310704564a347cccc9ac63a725df36e9af27493df1524ddb5360232129559e84a
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Iurii Rogulia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # eu_vat_rates_data · Ruby
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/eu_vat_rates_data)](https://rubygems.org/gems/eu_vat_rates_data)
4
+ [![Last updated](https://img.shields.io/github/last-commit/vatnode/eu-vat-rates-data-ruby?path=data%2Feu-vat-rates.json&label=last%20updated)](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+
7
+ EU VAT rates for all **27 EU member states** plus the **United Kingdom**, sourced from the [European Commission TEDB](https://taxation-customs.ec.europa.eu/tedb/vatRates.html). Checked daily, published automatically when rates change.
8
+
9
+ - Standard, reduced, super-reduced, and parking rates
10
+ - No dependencies — pure Ruby 3.0+
11
+ - Data bundled in the gem — works offline, no network calls
12
+ - Checked daily via GitHub Actions, new version published only when rates change
13
+
14
+ 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
+ ---
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ gem install eu_vat_rates_data
22
+ # or in Gemfile:
23
+ gem 'eu_vat_rates_data'
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Usage
29
+
30
+ ```ruby
31
+ require "eu_vat_rates_data"
32
+
33
+ # Full rate hash for a country
34
+ fi = EuVatRatesData.get_rate("FI")
35
+ # {
36
+ # "country" => "Finland",
37
+ # "currency" => "EUR",
38
+ # "standard" => 25.5,
39
+ # "reduced" => [10.0, 13.5],
40
+ # "super_reduced" => nil,
41
+ # "parking" => nil
42
+ # }
43
+
44
+ # Just the standard rate
45
+ EuVatRatesData.get_standard_rate("DE") # => 19.0
46
+
47
+ # Type guard
48
+ if EuVatRatesData.eu_member?(user_input)
49
+ rate = EuVatRatesData.get_rate(user_input) # always non-nil here
50
+ end
51
+
52
+ # All 28 countries at once
53
+ EuVatRatesData.all_rates.each do |code, rate|
54
+ puts "#{code}: #{rate['standard']}%"
55
+ end
56
+
57
+ # When were these rates last fetched?
58
+ puts EuVatRatesData.data_version # e.g. "2026-02-25"
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Data source & update frequency
64
+
65
+ Rates are fetched from the **European Commission Taxes in Europe Database (TEDB)**:
66
+
67
+ - Canonical data repo: **https://github.com/vatnode/eu-vat-rates-data**
68
+ - Refreshed: **daily at 08:00 UTC**
69
+ - Published to RubyGems only when actual rates change
70
+
71
+ ---
72
+
73
+ ## Covered countries
74
+
75
+ EU-27 member states + United Kingdom (28 countries total):
76
+
77
+ `AT BE BG CY CZ DE DK EE ES FI FR GB GR HR HU IE IT LT LU LV MT NL PL PT RO SE SI SK`
78
+
79
+ ---
80
+
81
+ ## License
82
+
83
+ MIT
@@ -0,0 +1,313 @@
1
+ {
2
+ "version": "2026-02-25",
3
+ "source": "European Commission TEDB",
4
+ "url": "https://taxation-customs.ec.europa.eu/tedb/vatRates.html",
5
+ "rates": {
6
+ "AT": {
7
+ "country": "Austria",
8
+ "currency": "EUR",
9
+ "standard": 20.0,
10
+ "reduced": [
11
+ 10.0,
12
+ 13.0,
13
+ 19.0
14
+ ],
15
+ "super_reduced": null,
16
+ "parking": null
17
+ },
18
+ "BE": {
19
+ "country": "Belgium",
20
+ "currency": "EUR",
21
+ "standard": 21.0,
22
+ "reduced": [
23
+ 6.0,
24
+ 12.0
25
+ ],
26
+ "super_reduced": null,
27
+ "parking": 12.0
28
+ },
29
+ "BG": {
30
+ "country": "Bulgaria",
31
+ "currency": "BGN",
32
+ "standard": 20.0,
33
+ "reduced": [
34
+ 9.0
35
+ ],
36
+ "super_reduced": null,
37
+ "parking": null
38
+ },
39
+ "CY": {
40
+ "country": "Cyprus",
41
+ "currency": "EUR",
42
+ "standard": 19.0,
43
+ "reduced": [
44
+ 5.0,
45
+ 9.0
46
+ ],
47
+ "super_reduced": 3.0,
48
+ "parking": null
49
+ },
50
+ "CZ": {
51
+ "country": "Czech Republic",
52
+ "currency": "CZK",
53
+ "standard": 21.0,
54
+ "reduced": [
55
+ 12.0
56
+ ],
57
+ "super_reduced": null,
58
+ "parking": null
59
+ },
60
+ "DE": {
61
+ "country": "Germany",
62
+ "currency": "EUR",
63
+ "standard": 19.0,
64
+ "reduced": [
65
+ 7.0
66
+ ],
67
+ "super_reduced": null,
68
+ "parking": null
69
+ },
70
+ "DK": {
71
+ "country": "Denmark",
72
+ "currency": "DKK",
73
+ "standard": 25.0,
74
+ "reduced": [],
75
+ "super_reduced": null,
76
+ "parking": null
77
+ },
78
+ "EE": {
79
+ "country": "Estonia",
80
+ "currency": "EUR",
81
+ "standard": 24.0,
82
+ "reduced": [
83
+ 9.0,
84
+ 13.0
85
+ ],
86
+ "super_reduced": null,
87
+ "parking": null
88
+ },
89
+ "ES": {
90
+ "country": "Spain",
91
+ "currency": "EUR",
92
+ "standard": 21.0,
93
+ "reduced": [
94
+ 10.0
95
+ ],
96
+ "super_reduced": 4.0,
97
+ "parking": null
98
+ },
99
+ "FI": {
100
+ "country": "Finland",
101
+ "currency": "EUR",
102
+ "standard": 25.5,
103
+ "reduced": [
104
+ 10.0,
105
+ 13.5
106
+ ],
107
+ "super_reduced": null,
108
+ "parking": null
109
+ },
110
+ "FR": {
111
+ "country": "France",
112
+ "currency": "EUR",
113
+ "standard": 20.0,
114
+ "reduced": [
115
+ 0.9,
116
+ 1.05,
117
+ 5.5,
118
+ 8.5,
119
+ 10.0,
120
+ 13.0
121
+ ],
122
+ "super_reduced": 2.1,
123
+ "parking": null
124
+ },
125
+ "GB": {
126
+ "country": "United Kingdom",
127
+ "currency": "GBP",
128
+ "standard": 20.0,
129
+ "reduced": [
130
+ 5.0
131
+ ],
132
+ "super_reduced": null,
133
+ "parking": null
134
+ },
135
+ "GR": {
136
+ "country": "Greece",
137
+ "currency": "EUR",
138
+ "standard": 24.0,
139
+ "reduced": [
140
+ 6.0,
141
+ 13.0,
142
+ 17.0
143
+ ],
144
+ "super_reduced": 4.0,
145
+ "parking": 13.0
146
+ },
147
+ "HR": {
148
+ "country": "Croatia",
149
+ "currency": "EUR",
150
+ "standard": 25.0,
151
+ "reduced": [
152
+ 5.0,
153
+ 13.0
154
+ ],
155
+ "super_reduced": null,
156
+ "parking": null
157
+ },
158
+ "HU": {
159
+ "country": "Hungary",
160
+ "currency": "HUF",
161
+ "standard": 27.0,
162
+ "reduced": [
163
+ 5.0,
164
+ 18.0
165
+ ],
166
+ "super_reduced": null,
167
+ "parking": null
168
+ },
169
+ "IE": {
170
+ "country": "Ireland",
171
+ "currency": "EUR",
172
+ "standard": 23.0,
173
+ "reduced": [
174
+ 9.0,
175
+ 13.5
176
+ ],
177
+ "super_reduced": null,
178
+ "parking": null
179
+ },
180
+ "IT": {
181
+ "country": "Italy",
182
+ "currency": "EUR",
183
+ "standard": 22.0,
184
+ "reduced": [
185
+ 5.0,
186
+ 10.0
187
+ ],
188
+ "super_reduced": 4.0,
189
+ "parking": null
190
+ },
191
+ "LT": {
192
+ "country": "Lithuania",
193
+ "currency": "EUR",
194
+ "standard": 21.0,
195
+ "reduced": [
196
+ 5.0,
197
+ 12.0
198
+ ],
199
+ "super_reduced": null,
200
+ "parking": null
201
+ },
202
+ "LU": {
203
+ "country": "Luxembourg",
204
+ "currency": "EUR",
205
+ "standard": 17.0,
206
+ "reduced": [
207
+ 8.0,
208
+ 14.0
209
+ ],
210
+ "super_reduced": 3.0,
211
+ "parking": 14.0
212
+ },
213
+ "LV": {
214
+ "country": "Latvia",
215
+ "currency": "EUR",
216
+ "standard": 21.0,
217
+ "reduced": [
218
+ 5.0,
219
+ 12.0
220
+ ],
221
+ "super_reduced": null,
222
+ "parking": null
223
+ },
224
+ "MT": {
225
+ "country": "Malta",
226
+ "currency": "EUR",
227
+ "standard": 18.0,
228
+ "reduced": [
229
+ 5.0,
230
+ 7.0
231
+ ],
232
+ "super_reduced": null,
233
+ "parking": 12.0
234
+ },
235
+ "NL": {
236
+ "country": "Netherlands",
237
+ "currency": "EUR",
238
+ "standard": 21.0,
239
+ "reduced": [
240
+ 9.0
241
+ ],
242
+ "super_reduced": null,
243
+ "parking": null
244
+ },
245
+ "PL": {
246
+ "country": "Poland",
247
+ "currency": "PLN",
248
+ "standard": 23.0,
249
+ "reduced": [
250
+ 5.0,
251
+ 8.0
252
+ ],
253
+ "super_reduced": 8.0,
254
+ "parking": null
255
+ },
256
+ "PT": {
257
+ "country": "Portugal",
258
+ "currency": "EUR",
259
+ "standard": 23.0,
260
+ "reduced": [
261
+ 6.0,
262
+ 13.0,
263
+ 16.0,
264
+ 22.0
265
+ ],
266
+ "super_reduced": 6.0,
267
+ "parking": 13.0
268
+ },
269
+ "RO": {
270
+ "country": "Romania",
271
+ "currency": "RON",
272
+ "standard": 21.0,
273
+ "reduced": [
274
+ 11.0
275
+ ],
276
+ "super_reduced": null,
277
+ "parking": null
278
+ },
279
+ "SE": {
280
+ "country": "Sweden",
281
+ "currency": "SEK",
282
+ "standard": 25.0,
283
+ "reduced": [
284
+ 6.0,
285
+ 12.0
286
+ ],
287
+ "super_reduced": null,
288
+ "parking": null
289
+ },
290
+ "SI": {
291
+ "country": "Slovenia",
292
+ "currency": "EUR",
293
+ "standard": 22.0,
294
+ "reduced": [
295
+ 5.0,
296
+ 9.5
297
+ ],
298
+ "super_reduced": null,
299
+ "parking": null
300
+ },
301
+ "SK": {
302
+ "country": "Slovakia",
303
+ "currency": "EUR",
304
+ "standard": 23.0,
305
+ "reduced": [
306
+ 5.0,
307
+ 19.0
308
+ ],
309
+ "super_reduced": null,
310
+ "parking": null
311
+ }
312
+ }
313
+ }
@@ -0,0 +1,3 @@
1
+ module EuVatRatesData
2
+ VERSION = "2026.2.25"
3
+ end
@@ -0,0 +1,65 @@
1
+ require "json"
2
+ require_relative "eu_vat_rates_data/version"
3
+
4
+ # EU VAT rates for all 27 member states + UK.
5
+ #
6
+ # Data sourced from the European Commission TEDB (Taxes in Europe Database).
7
+ # Updated daily, published automatically when rates change.
8
+ #
9
+ # Usage:
10
+ # require "eu_vat_rates_data"
11
+ #
12
+ # EuVatRatesData.get_rate("FI")
13
+ # # => {"country"=>"Finland", "currency"=>"EUR", "standard"=>25.5,
14
+ # # "reduced"=>[10.0, 13.5], "super_reduced"=>nil, "parking"=>nil}
15
+ #
16
+ # EuVatRatesData.get_standard_rate("DE") # => 19.0
17
+ # EuVatRatesData.eu_member?("FR") # => true
18
+ # EuVatRatesData.data_version # => "2026-02-25"
19
+ module EuVatRatesData
20
+ DATA_FILE = File.expand_path("../../data/eu-vat-rates.json", __dir__)
21
+
22
+ @dataset = nil
23
+
24
+ def self.dataset
25
+ @dataset ||= JSON.parse(File.read(DATA_FILE, encoding: "utf-8"))
26
+ end
27
+
28
+ def self.rates
29
+ dataset["rates"]
30
+ end
31
+
32
+ # 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", "GB")
34
+ # @return [Hash, nil]
35
+ def self.get_rate(country_code)
36
+ rates[country_code.upcase]
37
+ end
38
+
39
+ # Return the standard VAT rate for a country, or nil if not found.
40
+ # @param country_code [String] ISO 3166-1 alpha-2 code
41
+ # @return [Float, nil]
42
+ def self.get_standard_rate(country_code)
43
+ rate = get_rate(country_code)
44
+ rate&.fetch("standard")
45
+ end
46
+
47
+ # Return all 28 country rate hashes keyed by ISO country code.
48
+ # @return [Hash{String => Hash}]
49
+ def self.all_rates
50
+ rates.dup
51
+ end
52
+
53
+ # Return true if the country code is in the dataset (EU-27 + GB).
54
+ # @param country_code [String] ISO 3166-1 alpha-2 code
55
+ # @return [Boolean]
56
+ def self.eu_member?(country_code)
57
+ rates.key?(country_code.upcase)
58
+ end
59
+
60
+ # Return the ISO 8601 date when data was last fetched from EC TEDB.
61
+ # @return [String] e.g. "2026-02-25"
62
+ def self.data_version
63
+ dataset["version"]
64
+ end
65
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eu_vat_rates_data
3
+ version: !ruby/object:Gem::Version
4
+ version: 2026.2.25
5
+ platform: ruby
6
+ authors:
7
+ - Iurii Rogulia
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-02-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: EU VAT rates for all 27 member states + UK. Updated daily from EC TEDB,
14
+ published automatically when rates change.
15
+ email:
16
+ - iurii@rogulia.fi
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - LICENSE
22
+ - README.md
23
+ - data/eu-vat-rates.json
24
+ - lib/eu_vat_rates_data.rb
25
+ - lib/eu_vat_rates_data/version.rb
26
+ homepage: https://github.com/vatnode/eu-vat-rates-ruby
27
+ licenses:
28
+ - MIT
29
+ 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:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '3.0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.5.22
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: EU VAT rates for all 27 member states + UK
52
+ test_files: []