msantang / afip-public-api
Simple Afip public API library
v0.1.0
2017-06-01 22:20 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2024-10-29 05:22:19 UTC
README
Small lib to query Afip (Argentina) public api for persons data.
Quick Start
Installation
$ composer require msantang/afip-public-api
Using
<?php
use Msantang\AfipPublicApi\Exceptions\Exception;
use Msantang\AfipPublicApi\Exceptions\NotFoundException;
require 'vendor/autoload.php';
$httpClient = new \GuzzleHttp\Client();
$var = new Msantang\AfipPublicApi\Client($httpClient);
try {
$r = $var->persona("20222222229");
print_r($r);
} catch (NotFoundException $e) {
echo 'Persona no encontrada: '.$e->getMessage();
} catch (Exception $e) {
echo 'Error: '.$e->getMessage();
}
Features
- PSR-4 autoloading compliant structure
- Unit-Testing with PHPUnit
TODO
- Finish documentation
- More testing
- Add more api methods