/** * Method to get category tree elements from Arena.pl * * @param AuthForm $auth * @param null|integer $page * @return \stdClass[] */ public function getProductList(AuthForm $auth, $page = null) { $uri = $this->prepareUri($page); $client = new Client(); $r = $client->request('POST', $uri, ['json' => $auth->getRequestArray(), 'debug' => false]); return json_decode($r->getBody()->getContents()); }
/** * Method to get single order from Arena.pl * * @param AuthForm $auth * @param null|integer $orderId * @return \stdClass[] */ public function getOrderSingle(AuthForm $auth, $orderId) { $uri = $this->prepareUriForGetOrder($orderId); $client = new Client(); $r = $client->request('POST', $uri, ['json' => $auth->getRequestArray(), 'debug' => true]); return json_decode($r->getBody()->getContents()); }
/** * Method to get category tree elements from Arena.pl * * @param AuthForm $auth * @param null $categoryId * @return \stdClass[] */ public function getCategoryTree(AuthForm $auth, $categoryId = null) { $uri = $this->prepareUri($categoryId); $client = new Client(); $r = $client->request('POST', $uri, ['json' => $auth->getRequestArray(), 'debug' => false]); // var_dump(json_decode($r->getBody()->getContents())); return json_decode($r->getBody()->getContents()); }
/** * Method to remove single product picture * * @param $pictureId * @param AuthForm $auth * @return mixed */ public function removeProductPicture($pictureId, AuthForm $auth) { $uri = $this->prepareUriForPictureDelete($pictureId); $client = new Client(); $r = $client->request('POST', $uri, ['json' => $auth->getRequestArray(), 'debug' => false]); return json_decode($r->getBody()->getContents()); }