PHP code example of yproximite / ekomi-api-bundle

1. Go to this page and download the library: Download yproximite/ekomi-api-bundle 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/ */

    

yproximite / ekomi-api-bundle example snippets


// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Yproximite\Bundle\EkomiApiBundle\YproximiteEkomiApiBundle(),
    );
}

use Yproximite\Ekomi\Api\Message\Order\OrderListMessage;

$api = $this->get('yproximite.ekomi_api.service_aggregator');

$message = new OrderListMessage();
$message->setOffset(5);
$message->setLimit(10);
$message->setOrderBy(OrderListMessage::ORDER_BY_CREATED);
$message->setOrderDirection(OrderListMessage::ORDER_DIRECTION_DESC);
$message->setWithFeedbackOnly(true);
$message->setCreatedFrom(new \DateTime('2016-10-06 00:00:10'));
$message->setCreatedTill(new \DateTime('2016-11-06 00:14:29'));
$message->setShopId(11);
$message->setCustomDataFilter(['vendor_id' => 123]);

// Yproximite\Ekomi\Api\Model\Order\Order[]
$orders = $api->order()->getOrders($message);