/** * @param array $adverts of AdvertStatus * @return mixed * @throws OtomotoException */ public function advertChangeStatus(array $adverts) { try { $result = $this->client->AdvertChangeStatus(array('request' => array('Username' => $this->username, 'AutorizationKey' => $this->generateKey(), 'Advert' => $adverts))); if (!$result->AdvertChangeStatusResult->IsOk) { throw new OtomotoException($result->AdvertChangeStatusResult->Message); } return $result; } catch (\Exception $e) { throw new OtomotoException($e->getMessage(), $e->getCode()); } }