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