eu_vat_rates_data 2026.3.23 → 2026.3.26
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 +8 -1
- data/data/eu-vat-rates-data.json +2 -2
- data/lib/eu_vat_rates_data/version.rb +1 -1
- data/lib/eu_vat_rates_data.rb +9 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8427c28b7f6de6b2d18decd10b5ef180708689045f8ffce380877ef108fa93e3
|
|
4
|
+
data.tar.gz: 35cc04e92957c359367a48db96c5de27e8d3a5ccb89284fcd4174f1f875d586a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c29685f3a7e99e9d29a53025234b8f00b464d054d4bef91fc197a00e32bc428378fc0fc372f56a4c1130bcd2d815eac0123b09e9c16f3c84ca0a559a061ad33
|
|
7
|
+
data.tar.gz: 6b4a9dc0473e3455b199b9f64a12a004719a748b1d58b719556603c03b7290974fe2de37211ff825b234aa07cc47093235bb0e9290bfc69ad8f6b835d9028642
|
data/README.md
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
[](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
VAT rates for **44 European countries** — EU-27 plus Norway, Switzerland, UK, and more. EU rates sourced from the [European Commission TEDB](https://
|
|
7
|
+
VAT rates for **44 European countries** — EU-27 plus Norway, Switzerland, UK, and more. EU rates sourced from the [European Commission TEDB](https://ec.europa.eu/taxation_customs/tedb/) and checked daily. Non-EU rates maintained manually.
|
|
8
8
|
|
|
9
9
|
- Standard, reduced, super-reduced, and parking rates
|
|
10
10
|
- `eu_member` flag on every country — `true` for EU-27, `false` for non-EU
|
|
11
|
+
- `vat_name` — official name of the VAT tax in the country's primary official language
|
|
11
12
|
- No dependencies — pure Ruby 3.0+
|
|
12
13
|
- Data bundled in the gem — works offline, no network calls
|
|
13
14
|
- EU rates checked daily via GitHub Actions, new version published only when rates change
|
|
@@ -37,6 +38,7 @@ fi = EuVatRatesData.get_rate("FI")
|
|
|
37
38
|
# "country" => "Finland",
|
|
38
39
|
# "currency" => "EUR",
|
|
39
40
|
# "eu_member" => true,
|
|
41
|
+
# "vat_name" => "Arvonlisävero",
|
|
40
42
|
# "standard" => 25.5,
|
|
41
43
|
# "reduced" => [10.0, 13.5],
|
|
42
44
|
# "super_reduced" => nil,
|
|
@@ -51,6 +53,11 @@ if EuVatRatesData.eu_member?(user_input)
|
|
|
51
53
|
rate = EuVatRatesData.get_rate(user_input)
|
|
52
54
|
end
|
|
53
55
|
|
|
56
|
+
# Dataset membership check (all 44 countries)
|
|
57
|
+
if EuVatRatesData.has_rate?(user_input)
|
|
58
|
+
rate = EuVatRatesData.get_rate(user_input)
|
|
59
|
+
end
|
|
60
|
+
|
|
54
61
|
# All 44 countries at once
|
|
55
62
|
EuVatRatesData.all_rates.each do |code, rate|
|
|
56
63
|
puts "#{code}: #{rate['standard']}%"
|
data/data/eu-vat-rates-data.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2026-03-
|
|
2
|
+
"version": "2026-03-26",
|
|
3
3
|
"source": "European Commission TEDB",
|
|
4
|
-
"url": "https://
|
|
4
|
+
"url": "https://ec.europa.eu/taxation_customs/tedb/",
|
|
5
5
|
"rates": {
|
|
6
6
|
"AD": {
|
|
7
7
|
"country": "Andorra",
|
data/lib/eu_vat_rates_data.rb
CHANGED
|
@@ -60,7 +60,15 @@ module EuVatRatesData
|
|
|
60
60
|
rate ? rate["eu_member"] == true : false
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# Return
|
|
63
|
+
# Return true if the country code is present in the dataset (all 44 countries).
|
|
64
|
+
# Use eu_member? to check EU membership specifically.
|
|
65
|
+
# @param country_code [String] ISO 3166-1 alpha-2 code
|
|
66
|
+
# @return [Boolean]
|
|
67
|
+
def self.has_rate?(country_code)
|
|
68
|
+
rates.key?(country_code.upcase)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Return the ISO 8601 date when EU data was last fetched from EC TEDB.
|
|
64
72
|
# @return [String] e.g. "2026-03-18"
|
|
65
73
|
def self.data_version
|
|
66
74
|
dataset["version"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eu_vat_rates_data
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2026.3.
|
|
4
|
+
version: 2026.3.26
|
|
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-03-
|
|
11
|
+
date: 2026-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: VAT rates (standard, reduced, super-reduced, parking) for 44 European
|
|
14
14
|
countries — EU-27 plus Norway, Switzerland, UK, and more. Updated daily from the
|
|
@@ -32,7 +32,7 @@ metadata:
|
|
|
32
32
|
homepage_uri: https://github.com/vatnode/eu-vat-rates-data-ruby
|
|
33
33
|
source_code_uri: https://github.com/vatnode/eu-vat-rates-data-ruby
|
|
34
34
|
bug_tracker_uri: https://github.com/vatnode/eu-vat-rates-data-ruby/issues
|
|
35
|
-
post_install_message:
|
|
35
|
+
post_install_message:
|
|
36
36
|
rdoc_options: []
|
|
37
37
|
require_paths:
|
|
38
38
|
- lib
|
|
@@ -47,8 +47,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
48
|
version: '0'
|
|
49
49
|
requirements: []
|
|
50
|
-
rubygems_version: 3.
|
|
51
|
-
signing_key:
|
|
50
|
+
rubygems_version: 3.5.22
|
|
51
|
+
signing_key:
|
|
52
52
|
specification_version: 4
|
|
53
53
|
summary: VAT rates for 44 European countries — EU-27 plus Norway, Switzerland, UK,
|
|
54
54
|
and more. Daily auto-updates from EC TEDB.
|