Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from evertharmeling/develop
Added README
- Loading branch information
Showing
8 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
VATClient | ||
=================== | ||
|
||
[![Latest Stable Version](https://img.shields.io/packagist/v/evertharmeling/vat-client.svg?style=flat-square)](https://packagist.org/packages/evertharmeling/vat-client) | ||
[![Build Status](https://travis-ci.org/evertharmeling/vat-client.png?branch=master)](https://travis-ci.org/evertharmeling/vat-client) | ||
|
||
This libray supports validating a vat number and getting the info about a taxable object. The library uses the `http://www.controleerbtwnummer.nl/` API to retrieve the info and validation. | ||
The `http://www.controleerbtwnummer.nl/` API relies on the [VIES/EU](http://ec.europa.eu/taxation_customs/vies/?locale=en) service and thus supports VAT numbers from all EU-countries. | ||
|
||
## Installation | ||
|
||
`composer install evertharmeling/vat-client` | ||
|
||
## Usage | ||
|
||
It's required to use a PSR-7 supported HTTPClient like `guzzle` (^6.0) to inject in the `Client`. | ||
|
||
```php | ||
$client = new VIESApi\Client\Client(new GuzzleHttp\Client(), VIESApi\Parser\VATParser()); | ||
|
||
try { | ||
$taxableObject = $client->getInfo('<VATNumber>'); | ||
|
||
var_dump($taxableObject); | ||
catch (TaxableObjectNotFoundException $e) { | ||
// VAT number not found | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters