Esempio n. 1
0
 /**
  * Get all updated orders since last run
  *
  * @return array
  */
 public function buildOrdersUpdate()
 {
     $lastSync = DataHelper::getDate($this->container->ordersUpdatesLog);
     $query = $this->rule->getSQL('orders_update_last');
     $handler = $this->rule->getHandler('OrdersUpdateHandler');
     $this->sql = $this->container->db->prepare($query);
     $this->sql->bindParam(':lastSync', $lastSync);
     return $this->build($handler);
 }
Esempio n. 2
0
 public function customersHistory()
 {
     $response = $this->api->customersHistory(new DateTime(DataHelper::getDate($this->container->customersHistoryLog)));
     if (!is_null($response)) {
         $this->logger($response->getGeneratedAt(), $this->container->customersHistoryLog);
         return $response['customers'];
     } else {
         return array();
     }
 }