コード例 #1
0
 public function testUpdate()
 {
     $this->transport->shouldReceive('performRequest')->once()->withArgs(['PATCH', 'product-data/1231231231232/', [], ['category' => ['alpin-skier']], \Mockery::any()])->andReturn(['status' => 204]);
     $namespace = new ProductDataNamespace($this->transport);
     $result = $namespace->update("1231231231232", ProductDataTransfer::make(['category' => ['alpin-skier']]));
     $this->assertTrue($result);
 }
コード例 #2
0
 /**
  * @param string $ean
  *
  * @return ProductDataTransfer|null
  */
 public function get($ean)
 {
     $endpoint = new Get($this->getTransport());
     $result = $this->performWithId($endpoint, $ean);
     return $result ? ProductDataTransfer::make($result) : null;
 }