PHP code example of setono / budbee-php-sdk

1. Go to this page and download the library: Download setono/budbee-php-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/ */

    

setono / budbee-php-sdk example snippets




use Setono\Budbee\Client\Client;
use Setono\Budbee\DTO\Collection;
use Setono\Budbee\DTO\Box;

thrown
// $client->setLogger($logger);

// Enable sandbox mode to test your integration
// $client->setSandbox();

$boxes = $client
    ->boxes()
    ->getAvailableLockers('DK', '1159')
;

/** @var Box $box */
foreach ($boxes as $box) {
    echo $box->name . " ($box->id)\n";
    echo $box->address->street . "\n";
    echo $box->address->postalCode . ' ' . $box->address->city . "\n";
    echo $box->address->country . "\n\n";
}



use Setono\Budbee\Client\Client;

CRET');

/** @var \Psr\Http\Message\ResponseInterface $response */
$response = $client->request(/** @var \Psr\Http\Message\RequestInterface $request */ $request);



use CuyZ\Valinor\Cache\FileSystemCache;
use CuyZ\Valinor\MapperBuilder;
use Setono\Budbee\Client\Client;
use Setono\Budbee\DTO\Collection;
use Setono\Budbee\DTO\Box;

bash
composer