Skip to content

VAT rates for european countries based on the ec.europa.eu website

License

Notifications You must be signed in to change notification settings

dmitry/vat_rates

Repository files navigation

VAT Rates

Build Status Gem Version

VAT rates based on the ec.europa.eu website list. This gem parses information on the website and provides interface to the data.

Format of the data:

code: 'ES' [required string, ISO 3166 format country code]
name: 'Spain' [required string, english name of the country]
rate: 21.0 [required float, standard rate percentage]
regions: [optional array]
  name: 'Canary Islands' [required string, name of the region in english]
  rate: 0 [required float or integer, standard rate percentage in the region, might be 0 or >= float number]
  reduced_rates: [optional hash]
    category: 'Taux intermédiaire' [required string, category of the reduced taxes]
    rate: 10.0 [required float, rate of the reduced tax in percentage]

Installation

Add this line to your application's Gemfile:

gem 'vat_rates'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vat_rates

Usage

To get current VAT rates from ec.europa.eu, just invoke following command:

VatRates.fetch

Load from file or fetch from server:

VatRates.load(filepath = nil)

Save to json file:

VatRates.save(filepath)

Changes

2014-12-23 - 0.0.2

Alternatives and more information

Contributing

  1. Fork it ( https://github.com/dmitry/vat_rates/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

VAT rates for european countries based on the ec.europa.eu website

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages