コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
ファイル: UpsertTest.php プロジェクト: hitmeister/api-sdk-php
 /**
  * @expectedException \Hitmeister\Component\Api\Exceptions\RuntimeException
  * @expectedExceptionMessage Required params id is not set
  */
 public function testExceptionOnEmptyId()
 {
     $update = new Upsert($this->transport);
     $update->getURI();
 }