Ejemplo n.º 1
0
 /**
  * Inventory Update
  *
  * @param ProductCollection $products
  *
  * @return Response
  */
 public function inventoryUpdate(ProductCollection $products)
 {
     $endpoint = $this->configuration->getEndpoint(Configuration::ENDPOINT_INVENTORY);
     $request = new Request($endpoint, $products, $this->configuration, $this->getLogger());
     $response = new Response();
     $response->mergeData($products, $request->send());
     return $response;
 }
Ejemplo n.º 2
0
 /**
  * Test of Request
  *
  * @return void
  **/
 public function testRequest()
 {
     $endpoint = $this->configuration->getEndpoint(Configuration::ENDPOINT_COLLECTION);
     $collection = $this->getCollection();
     $request = new Request($endpoint, $collection, $this->configuration);
     $response = $request->send();
     $expected = $this->getRequestExpected($collection, $endpoint->chunk);
     $this->assertEquals($expected, $response);
 }