/** * Get order info * * @param int $orderId * @return Models\Order * * @link http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-orders-id.xml */ public function getOrder($orderId) { $resource = 'campaigns/' . $this->campaignId . '/orders/' . $orderId . '.json'; $response = $this->sendRequest('GET', $this->getServiceUrl($resource)); $decodedResponseBody = $this->getDecodedBody($response->getBody()); $getOrderResponse = new Models\GetOrderResponse($decodedResponseBody); return $getOrderResponse->getOrder(); }
/** * Get order info * * @param int $orderId * @return Models\Order * * @link http://api.yandex.ru/market/partner/doc/dg/reference/get-campaigns-id-orders-id.xml */ public function getOrder($orderId) { $resource = 'campaigns/' . $this->campaignId . '/orders/' . $orderId . '.json'; $client = new Client($this->getServiceUrl($resource)); $request = $client->createRequest('GET'); $response = $this->sendRequest($request)->json(); $getOrderResponse = new Models\GetOrderResponse($response); return $getOrderResponse->getOrder(); }