Skip to content
/ ares Public
forked from h4kuna/ares

Download information about customer via his IN.

Notifications You must be signed in to change notification settings

finwe/ares

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Downloads this Month Latest Stable Version Coverage Status Total Downloads License

More information about versions is in changelog.

Support development by QR code

Use QR code or sponsor button where is link on my revolut.

Thank you :)

QR payment

Installation to project

The best way to install h4kuna/ares is using Composer:

composer require h4kuna/ares

Download information about customer via his IN.

ARES

Homepage and official ARES documentation. And json API

Load data by one identification number.

use h4kuna\Ares;
$ares = (new Ares\AresFactory())->create();
try {
    $response = $ares->loadBasic('87744473');
    /* @var $response Ares\Ares\Core\Data */
    var_dump($response);
} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) {
    // log identification number, why is bad? Or make nothing.
} catch (Ares\Exceptions\ServerResponseException $e) {
    // no response from server or broken json
}

Load data by many identification numbers. Limit by ARES service is set to 100 items, but library chunk it and check duplicity.

use h4kuna\Ares;
/** @var Ares\Ares $ares */
$numbers = ['one' => '25596641', 'two' => '26713250', 'three' => '27082440', 'four' => '11111111'];

try { 
    foreach ($ares->loadBasicMulti($numbers) as $name => $r) {
        var_dump($name, $r->company);
    }
} catch (Ares\Exceptions\ServerResponseException $e) {
    // no response from server or broken json
}

Data Box (datavá schánka)

Manual

use h4kuna\Ares;
/** @var Ares\Ares $ares */
try {
    $response = $ares->loadDataBox('87744473');
    var_dump($response->ISDS);
} catch (h4kuna\Ares\Exceptions\ServerResponseException $e) {
    // catch error
}

About

Download information about customer via his IN.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%