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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb5b86d58fcdbe133bd4bf54b32dcf24e2d900d62f6627ebef52ab77f9e1bbf0
4
- data.tar.gz: 1bf85bc52bb6b6a54fd5d37388dc617a72ba25cd696a7bbf82b98401696ae485
3
+ metadata.gz: bab129e8005d6520ab7069c89296c622fe5fc891f086bc056470d464f7706459
4
+ data.tar.gz: 2e83a2c0cf809568dc91943b6550b3791c212762e54cdb92f9c164bc6e712455
5
5
  SHA512:
6
- metadata.gz: 93bc4e47661b3e638f8f79cd9c354e7f4a93a8f596ee8e9ce3f582ebfa635892fd0e4a78911551cb1c1539469204360caea81a1564fd7961371edd549ada3f8c
7
- data.tar.gz: dc0517711fbbe16c6a8ca677b3bfdb687f681fab7948f558bec9072464c8ec645c8032dd41592caa6ded1ef4475b1b9108f8bbc6e859d0a3c27395a7eb6fa31c
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
  [![Gem Version](https://img.shields.io/gem/v/eu_vat_rates_data)](https://rubygems.org/gems/eu_vat_rates_data)
4
+ [![Gem downloads](https://img.shields.io/gem/dt/eu_vat_rates_data)](https://rubygems.org/gems/eu_vat_rates_data)
5
+ [![Test](https://github.com/vatnode/eu-vat-rates-data-ruby/actions/workflows/test.yml/badge.svg)](https://github.com/vatnode/eu-vat-rates-data-ruby/actions/workflows/test.yml)
4
6
  [![Last updated](https://img.shields.io/github/last-commit/vatnode/eu-vat-rates-data-ruby?path=data%2Feu-vat-rates-data.json&label=last%20updated)](https://github.com/vatnode/eu-vat-rates-data-ruby/commits/main)
5
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](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 on their own rarely answer the question you actually have, which is what
116
- to put on the invoice. Two rules cover most of it: charge the buyer's domestic
117
- rate, unless the sale is cross-border B2B inside the EU, where the reverse
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, seller_country, buyer_country, buyer_vat_id = nil)
123
- cross_border_b2b = buyer_country != seller_country &&
124
- !buyer_vat_id.nil? &&
125
- EuVatRatesData.valid_format?(buyer_vat_id)
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', '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, 'FI', 'DE', 'DE123456789')
141
+ invoice_total(10_000, 'DE', true)
141
142
  # => { vat_cents: 0, total_cents: 10000, reverse_charge: true }
142
143
  ```
143
144
 
144
- `valid_format?` only checks the shape of the number. Applying the reverse charge
145
- requires the buyer to actually be VAT-registered, which is a VIES lookup — see
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026-08-19",
2
+ "version": "2026-08-23",
3
3
  "source": "European Commission TEDB",
4
4
  "publisher": {
5
5
  "name": "vatnode.dev",
@@ -1,3 +1,3 @@
1
1
  module EuVatRatesData
2
- VERSION = "2026.8.20"
2
+ VERSION = "2026.8.23"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require "json"
2
2
  require_relative "eu_vat_rates_data/version"
3
3
 
4
- # VAT rates for 44 European countries (EU-27 + 17 non-EU).
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 44 country rate hashes keyed by ISO country code.
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 44 countries).
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.20
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-19 00:00:00.000000000 Z
11
+ date: 2026-08-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: VAT rates (standard, reduced, super-reduced, parking) for 45 European
14
- countries EU-27 plus Norway, Switzerland, UK, and more. Includes eu_member flag,
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 European countries — EU-27 plus Norway, Switzerland, UK,
56
- and more. From vatnode.dev.
54
+ summary: Official-source European VAT rates for 45 jurisdictions
57
55
  test_files: []