/** * @param string $ean * @param ProductDataTransfer $data * * @return string * @throws \Hitmeister\Component\Api\Exceptions\ServerException */ public function upsert($ean, ProductDataTransfer $data) { $endpoint = new Upsert($this->getTransport()); $endpoint->setId($ean); $endpoint->setTransfer($data); $resultRequest = $endpoint->performRequest(); return $resultRequest['status'] == 201; }
/** * @expectedException \Hitmeister\Component\Api\Exceptions\RuntimeException * @expectedExceptionMessage Required params id is not set */ public function testExceptionOnEmptyId() { $update = new Upsert($this->transport); $update->getURI(); }