anthogirard/delivengo-sdk

PHP client library for the Delivengo Easy v2.3 API


License
MIT

Documentation

Delivengo PHP SDK

Requirements

  • PHP 5.3+
  • Composer
  • Delivengo API key
  • cURL

Install

Using composer

composer install

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();