eu_vat_rates_data 2026.8.20 → 2026.8.23
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 +15 -15
- 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 -3
- metadata +6 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bab129e8005d6520ab7069c89296c622fe5fc891f086bc056470d464f7706459
|
|
4
|
+
data.tar.gz: 2e83a2c0cf809568dc91943b6550b3791c212762e54cdb92f9c164bc6e712455
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f0e69e72627a7fe888556af51d1ff52857cc228c6d544ef4b8ad1a32b3fecfda336b5ba993920cef904420988dda03f034737bdb41e36440b16b5ee717f28d1
|
|
7
|
+
data.tar.gz: e23eab87794d2b3e04435d621c2d2a6ee882b1bff41b2c5a327124c2de1601a688cfa26d5c82cf28efc66edc4583754fa8b8ae5fcefbcbb2f09b1209e5df3b11
|
data/README.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# eu_vat_rates_data · Ruby
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/eu_vat_rates_data)
|
|
4
|
+
[](https://rubygems.org/gems/eu_vat_rates_data)
|
|
5
|
+
[](https://github.com/vatnode/eu-vat-rates-data-ruby/actions/workflows/test.yml)
|
|
4
6
|
[](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
|
|
5
7
|
[](LICENSE)
|
|
6
8
|
|
|
7
9
|
VAT rates for **45 European countries** — EU-27 plus Norway, Switzerland, UK, and more. EU rates sourced from the European Commission TEDB and checked daily. Non-EU rates maintained manually.
|
|
8
10
|
|
|
11
|
+
Part of **[VATNode VAT Rates](https://vatnode.dev/vat-rates)** · [canonical dataset](https://github.com/vatnode/eu-vat-rates-data) · [methodology](https://vatnode.dev/data) · other languages: [JavaScript](https://github.com/vatnode/eu-vat-rates-data-js), [Python](https://github.com/vatnode/eu-vat-rates-data-python), [PHP](https://github.com/vatnode/eu-vat-rates-data-php), [Go](https://github.com/vatnode/eu-vat-rates-data-go)
|
|
12
|
+
|
|
9
13
|
- Standard, reduced, super-reduced, and parking rates
|
|
10
14
|
- `eu_member` flag on every country — `true` for EU-27, `false` for non-EU
|
|
11
15
|
- `vat_name` — official name of the VAT tax in the country's primary official language
|
|
@@ -112,19 +116,16 @@ EuVatRatesData.flag("XX") # => "" (empty string for unknown/invalid codes)
|
|
|
112
116
|
|
|
113
117
|
## Example: charging VAT on an invoice
|
|
114
118
|
|
|
115
|
-
Rates
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
charge applies and you invoice 0%.
|
|
119
|
+
Rates alone do not determine invoice treatment. Resolve place-of-supply,
|
|
120
|
+
customer status, category, exemptions, and any reverse-charge eligibility in
|
|
121
|
+
your tax logic first; then use the dataset for the applicable numeric rate.
|
|
119
122
|
|
|
120
123
|
```ruby
|
|
121
124
|
# Money in minor units (cents). Never floats.
|
|
122
|
-
def invoice_total(net_cents,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return { vat_cents: 0, total_cents: net_cents, reverse_charge: true } if cross_border_b2b
|
|
125
|
+
def invoice_total(net_cents, buyer_country, reverse_charge_eligible = false)
|
|
126
|
+
if reverse_charge_eligible
|
|
127
|
+
return { vat_cents: 0, total_cents: net_cents, reverse_charge: true }
|
|
128
|
+
end
|
|
128
129
|
|
|
129
130
|
rate = EuVatRatesData.get_standard_rate(buyer_country)
|
|
130
131
|
vat_cents = (net_cents * rate / 100.0).round
|
|
@@ -133,17 +134,16 @@ def invoice_total(net_cents, seller_country, buyer_country, buyer_vat_id = nil)
|
|
|
133
134
|
end
|
|
134
135
|
|
|
135
136
|
# Domestic sale in Finland — 25.5%
|
|
136
|
-
invoice_total(10_000, 'FI'
|
|
137
|
+
invoice_total(10_000, 'FI')
|
|
137
138
|
# => { vat_cents: 2550, total_cents: 12550, reverse_charge: false }
|
|
138
139
|
|
|
139
140
|
# Finnish seller, German business buyer — reverse charge
|
|
140
|
-
invoice_total(10_000, '
|
|
141
|
+
invoice_total(10_000, 'DE', true)
|
|
141
142
|
# => { vat_cents: 0, total_cents: 10000, reverse_charge: true }
|
|
142
143
|
```
|
|
143
144
|
|
|
144
|
-
`
|
|
145
|
-
|
|
146
|
-
above.
|
|
145
|
+
`reverse_charge_eligible` must come from applicable tax logic and evidence.
|
|
146
|
+
`valid_format?` only checks a number's shape; it does not establish registration or eligibility.
|
|
147
147
|
|
|
148
148
|
---
|
|
149
149
|
|
data/data/eu-vat-rates-data.json
CHANGED
data/lib/eu_vat_rates_data.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
require_relative "eu_vat_rates_data/version"
|
|
3
3
|
|
|
4
|
-
# VAT rates for
|
|
4
|
+
# VAT rates for 45 European jurisdictions (EU-27 + 18 non-EU/special VAT jurisdictions).
|
|
5
5
|
#
|
|
6
6
|
# EU rates sourced from the European Commission TEDB (Taxes in Europe Database),
|
|
7
7
|
# checked daily. Non-EU rates maintained manually.
|
|
@@ -46,7 +46,7 @@ module EuVatRatesData
|
|
|
46
46
|
rate&.fetch("standard")
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
# Return all
|
|
49
|
+
# Return all 45 jurisdiction rate hashes keyed by country code.
|
|
50
50
|
# @return [Hash{String => Hash}]
|
|
51
51
|
def self.all_rates
|
|
52
52
|
rates.dup
|
|
@@ -61,7 +61,7 @@ module EuVatRatesData
|
|
|
61
61
|
rate ? rate["eu_member"] == true : false
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Return true if the country code is present in the dataset (all
|
|
64
|
+
# Return true if the country code is present in the dataset (all 45 jurisdictions).
|
|
65
65
|
# Use eu_member? to check EU membership specifically.
|
|
66
66
|
# @param country_code [String] ISO 3166-1 alpha-2 code
|
|
67
67
|
# @return [Boolean]
|
metadata
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
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.23
|
|
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-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: VAT rates
|
|
14
|
-
|
|
15
|
-
local VAT name and abbreviation. Useful for billing, invoicing, e-commerce, fintech,
|
|
16
|
-
and VAT compliance. From vatnode.dev — live VIES validation via API.
|
|
13
|
+
description: Daily-checked European VAT rates with standard and reduced rate types,
|
|
14
|
+
offline access, local VAT metadata, and VAT number format validation.
|
|
17
15
|
email:
|
|
18
16
|
- iurii@rogulia.fi
|
|
19
17
|
executables: []
|
|
@@ -34,6 +32,7 @@ metadata:
|
|
|
34
32
|
bug_tracker_uri: https://github.com/vatnode/eu-vat-rates-data-ruby/issues
|
|
35
33
|
changelog_uri: https://github.com/vatnode/eu-vat-rates-data-ruby/blob/main/CHANGELOG.md
|
|
36
34
|
documentation_uri: https://github.com/vatnode/eu-vat-rates-data-ruby#readme
|
|
35
|
+
canonical_data_uri: https://github.com/vatnode/eu-vat-rates-data
|
|
37
36
|
post_install_message:
|
|
38
37
|
rdoc_options: []
|
|
39
38
|
require_paths:
|
|
@@ -52,6 +51,5 @@ requirements: []
|
|
|
52
51
|
rubygems_version: 3.5.22
|
|
53
52
|
signing_key:
|
|
54
53
|
specification_version: 4
|
|
55
|
-
summary: VAT rates for 45
|
|
56
|
-
and more. From vatnode.dev.
|
|
54
|
+
summary: Official-source European VAT rates for 45 jurisdictions
|
|
57
55
|
test_files: []
|