eu_vat_rates_data 2026.7.1 → 2026.8.13
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 +7 -18
- data/data/eu-vat-rates-data.json +1 -1
- data/lib/eu_vat_rates_data/version.rb +1 -1
- data/lib/eu_vat_rates_data.rb +3 -0
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c62370ff31248e9e8423a48b7ccf89e430cb44fa87611f8ab4c64f9eb4d8362d
|
|
4
|
+
data.tar.gz: 67a77f3cdebffa3e96aad1ff9f3f7f359ea764cf8c1796b658886b1c41838429
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6aa11a7d0183249888ed564473a7160da82a3fd5047a545063914e2e3f3648600dc4648bfee3f08c570ac50c9e833415ef8ddd4fc644a30907f725cd16ae78d9
|
|
7
|
+
data.tar.gz: caf20520cbae2ac8d9a6a3055a58eaaaba10174fed37d54a92a7f9d36008824161363fa824cc675810406e88ac74d9feae7149a4727be9137f7fb058848abd8f
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Also available in: [JavaScript/TypeScript (npm)](https://www.npmjs.com/package/e
|
|
|
24
24
|
|
|
25
25
|
This package gives you VAT **rates** and **format checks** for free, offline, in your code. It does **not** call VIES — `valid_format?()` only checks the shape of a VAT number, not whether it actually exists.
|
|
26
26
|
|
|
27
|
-
For **live VIES validation** — confirming a VAT ID is real, pulling the registered company name and address, and getting
|
|
27
|
+
For **live VIES validation** — confirming a VAT ID is real, pulling the registered company name and address, and getting the VIES consultation number as your reference for the check — there's **[vatnode](https://vatnode.dev?ref=rates-readme-rb)**:
|
|
28
28
|
|
|
29
29
|
- Live VIES validation, with national-database fallback when VIES is down
|
|
30
30
|
- Registered company name, address, registration date
|
|
@@ -38,7 +38,7 @@ curl https://api.vatnode.dev/v1/vat/IE6388047V \
|
|
|
38
38
|
-H "Authorization: Bearer YOUR_API_KEY"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
[**Get a free API key
|
|
41
|
+
[**See what the API adds →**](https://vatnode.dev/vat-rates?ref=rates-readme-rb#beyond-rates) · [Get a free API key](https://vatnode.dev/login?ref=rates-readme-rb)
|
|
42
42
|
|
|
43
43
|
---
|
|
44
44
|
|
|
@@ -112,7 +112,9 @@ EuVatRatesData.flag("XX") # => "" (empty string for unknown/invalid codes)
|
|
|
112
112
|
|
|
113
113
|
## Data source & update frequency
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
How the daily check works, and what changed when: [vatnode.dev/data](https://vatnode.dev/data?ref=rates-readme-rb).
|
|
116
|
+
|
|
117
|
+
- EU-27 rates: **European Commission TEDB**, checked against the source **daily at 07:00 UTC**, updated on any change
|
|
116
118
|
- Non-EU rates: maintained manually, updated on official rate changes
|
|
117
119
|
- Published to RubyGems only when actual rates change
|
|
118
120
|
|
|
@@ -137,7 +139,7 @@ No package needed — parse it with a single `fetch()` / `http.get()` / `file_ge
|
|
|
137
139
|
|
|
138
140
|
## Covered countries
|
|
139
141
|
|
|
140
|
-
**EU-27** (daily
|
|
142
|
+
**EU-27** (checked daily against EC TEDB, updated on any change):
|
|
141
143
|
|
|
142
144
|
`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`
|
|
143
145
|
|
|
@@ -147,22 +149,9 @@ No package needed — parse it with a single `fetch()` / `http.get()` / `file_ge
|
|
|
147
149
|
|
|
148
150
|
---
|
|
149
151
|
|
|
150
|
-
## Need to validate VAT numbers?
|
|
151
|
-
|
|
152
|
-
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.
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
curl https://api.vatnode.dev/v1/vat/FI17156132 \
|
|
156
|
-
-H "Authorization: Bearer vat_live_..."
|
|
157
|
-
# → { "valid": true, "companyName": "Suomen Pehmeä Ikkuna Oy" }
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
152
|
## Changelog
|
|
163
153
|
|
|
164
|
-
|
|
165
|
-
- **fix:** Corrected Sweden (SE) VAT number regex — was `^SE\d{12}$`, now correctly requires the mandatory `01` suffix: `^SE\d{10}01$`.
|
|
154
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
166
155
|
|
|
167
156
|
---
|
|
168
157
|
|
data/data/eu-vat-rates-data.json
CHANGED
data/lib/eu_vat_rates_data.rb
CHANGED
|
@@ -77,6 +77,9 @@ module EuVatRatesData
|
|
|
77
77
|
# @return [Boolean]
|
|
78
78
|
def self.valid_format?(vat_id)
|
|
79
79
|
code = vat_id[0, 2].upcase
|
|
80
|
+
# Greek VAT numbers carry the VIES prefix EL, while the dataset keys Greece
|
|
81
|
+
# under its ISO code GR.
|
|
82
|
+
code = "GR" if code == "EL"
|
|
80
83
|
rate = get_rate(code)
|
|
81
84
|
return false unless rate && rate["pattern"]
|
|
82
85
|
!!(vat_id.upcase =~ /\A#{rate["pattern"]}\z/)
|
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.
|
|
4
|
+
version: 2026.8.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Iurii Rogulia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: VAT rates (standard, reduced, super-reduced, parking) for 45 European
|
|
14
14
|
countries — EU-27 plus Norway, Switzerland, UK, and more. Includes eu_member flag,
|
|
@@ -25,13 +25,15 @@ files:
|
|
|
25
25
|
- data/eu-vat-rates-data.json
|
|
26
26
|
- lib/eu_vat_rates_data.rb
|
|
27
27
|
- lib/eu_vat_rates_data/version.rb
|
|
28
|
-
homepage: https://
|
|
28
|
+
homepage: https://vatnode.dev/vat-rates?ref=rates-rubygems
|
|
29
29
|
licenses:
|
|
30
30
|
- MIT
|
|
31
31
|
metadata:
|
|
32
|
-
homepage_uri: https://
|
|
32
|
+
homepage_uri: https://vatnode.dev/vat-rates?ref=rates-rubygems
|
|
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
|
+
changelog_uri: https://github.com/vatnode/eu-vat-rates-data-ruby/blob/main/CHANGELOG.md
|
|
36
|
+
documentation_uri: https://github.com/vatnode/eu-vat-rates-data-ruby#readme
|
|
35
37
|
post_install_message:
|
|
36
38
|
rdoc_options: []
|
|
37
39
|
require_paths:
|