Project

vat_rates

0.0
No commit activity in last 3 years
No release in over 3 years
VAT rates based on the ec.europa.eu website list. This gem parses information on the website and provides interface to the data
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0

Runtime

>= 0
 Project Readme

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