PHP code example of anthogirard / delivengo-sdk

1. Go to this page and download the library: Download anthogirard/delivengo-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anthogirard / delivengo-sdk example snippets


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

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