PHP code example of setono / economic-php-sdk

1. Go to this page and download the library: Download setono/economic-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 / economic-php-sdk example snippets



use Setono\Economic\Client\Client;

$client = new Client('demo', 'demo');

$products = $client
    ->products()
    ->get(filter: 'name$like:b', sortBy: 'name')
;

print_r($products);


use Setono\Economic\Client\Client;

$client = new Client('demo', 'demo');

$skipPages = 0;

do {
    $products = $client
        ->products()
        ->get(skipPages: $skipPages++);
} while(!$products->isEmpty());



use Setono\Economic\Client\Client;

ET');

/** @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\Economic\Client\Client;use Setono\Economic\DTO\Box;

che));
bash
composer