/**
  * @param int $id
  * @return OrderTimesDTO|NULL
  */
 public function getOrderTimes($id)
 {
     $request = $this->requestFactory->createRequest('order-times/' . intval($id))->setMethod(Request::GET);
     try {
         $response = $this->connector->send($request);
     } catch (BadStatusException $e) {
         $this->unexpectedResponseCode($e->getResponse()->getCode());
     }
     if ($response->getCode() !== Response::S200_OK) {
         $this->unexpectedResponseCode($response->getCode());
     }
     $orderTimes = Json::decode($response->getResponse(), Json::FORCE_ARRAY);
     return $orderTimes === NULL ?: new OrderTimesDTO($orderTimes);
 }
 public function getArrivals()
 {
     $request = $this->requestFactory->createRequest('arrivals')->setMethod(Request::GET);
     try {
         $response = $this->connector->send($request);
     } catch (BadStatusException $e) {
         $this->unexpectedResponseCode($e->getResponse()->getCode());
         return FALSE;
     }
     if (($responseCode = $response->getCode()) !== Response::S200_OK) {
         $this->unexpectedResponseCode($responseCode);
         return FALSE;
     }
     return Json::decode($response->response, TRUE);
 }