anthogirard / delivengo-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP client library for the Delivengo Easy v2.3 API
1.2.1
2020-06-16 22:29 UTC
Requires
- php: >=5.3.0
- ext-curl: *
- ext-json: *
- netresearch/jsonmapper: ^1.6
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2022-06-05 19:53:35 UTC
README
Requirements
- PHP 5.3+
- Composer
- cURL
- Delivengo API key
Install
Using composer
composer require anthogirard/delivengo-sdk
Usage
Example of a request to list Mandats
$client = new \DelivengoSDK\DelivengoClient('API_KEY'); $request = new \DelivengoSDK\Request\ListMandatsRequest(); $response = $client->send('list', $request); /** @var \DelivengoSDK\Entity\Mandat[] $data */ $mandats = $response->getData(); foreach ($mandats as $mandat) { $rum = $mandat->getRum(); $iban = $mandat->getIban(); $bic = $mandat->getBic(); }
Example of a request to retrieve a Envoi
$client = new \DelivengoSDK\DelivengoClient('API_KEY'); $request = new \DelivengoSDK\Request\GetEnvoiRequest(); $response = $client->send('get', $request, ['id' => 1, 'support' => 4, 'position' => 2]); /** @var \DelivengoSDK\Entity\Envoi $envoi */ $envoi = $response->getData(); $dateCreation = $envoi->getDateCreation(); $plis = $envoi->getPlis();