eu_vat_rates_data 2026.8.12 → 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 +3 -16
- 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 the VIES consultation number as your reference for the check — there's **[vatnode](https://vatnode.dev)**:
|
|
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
|
|
|
@@ -149,22 +149,9 @@ No package needed — parse it with a single `fetch()` / `http.get()` / `file_ge
|
|
|
149
149
|
|
|
150
150
|
---
|
|
151
151
|
|
|
152
|
-
## Need to validate VAT numbers?
|
|
153
|
-
|
|
154
|
-
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.
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
curl https://api.vatnode.dev/v1/vat/FI17156132 \
|
|
158
|
-
-H "Authorization: Bearer vat_live_..."
|
|
159
|
-
# → { "valid": true, "companyName": "Suomen Pehmeä Ikkuna Oy" }
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
152
|
## Changelog
|
|
165
153
|
|
|
166
|
-
|
|
167
|
-
- **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).
|
|
168
155
|
|
|
169
156
|
---
|
|
170
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.8.
|
|
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-08-
|
|
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:
|