https://github.com/cba85/eu-vat-rates
💰 A PHP package to grab up-to-date VAT rates for any European Union member state
https://github.com/cba85/eu-vat-rates
php vat-rates
Last synced: 19 days ago
JSON representation
💰 A PHP package to grab up-to-date VAT rates for any European Union member state
- Host: GitHub
- URL: https://github.com/cba85/eu-vat-rates
- Owner: cba85
- License: mit
- Created: 2016-12-20T15:31:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-05-02T18:01:59.000Z (about 5 years ago)
- Last Synced: 2025-03-11T21:44:19.720Z (over 1 year ago)
- Topics: php, vat-rates
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# European VAT rates
A PHP package to grab up-to-date VAT rates for any European Union member state.
This package uses http://jsonvat.com to obtain its data for the VAT rates.
## Installation
Install using Composer :
```
$ composer require cba85/eu-vat-rates dev-master
```
## Usage
```php
$rates = new Rates;
/**
* Get VAT rate of a country
*/
$rate = $rates->getRate('FR');
/**
* Get specific VAT rate of a country
*/
$rate = $rates->getRate('FR', 'reduced2');
```
You'll find more examples in the ``example`` folder.
## Tests
If VAT rates evolve, change the results expected.
```bash
$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/RatesTest
```