/** * 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; }
/** * 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); }