Ejemplo n.º 1
0
 /**
  * @param string $type
  * @param string $categoryIdAndRefinements
  * @param array|null $options
  * @return Response\ListResultResponse
  */
 public function listResults($type, $categoryIdAndRefinements, array $options = null)
 {
     $path = '/openapi/services/rest/catalog/v3/listresults/' . $type . '/' . $categoryIdAndRefinements;
     $defaulOptions = array('offset' => null, 'nrProducts' => 10, 'sortingMethod' => null, 'sortingAscending' => true, 'includeProducts' => false, 'includeCategories' => true, 'includeRefinements' => true);
     $options = $this->mergeOptions($defaulOptions, $options);
     $uri = $path . '?' . http_build_query($options);
     $obj = new ResponseFactory();
     return $obj->createListResultsResponse($this->getXmlElement($this->call($uri)));
 }
 public function setUp()
 {
     $simpleXmlElement = new \SimpleXMLElement(__DIR__ . '/../../../../fixtures/list_results_response.xml', 0, true);
     $factory = new ResponseFactory();
     $this->listResultsResponse = $factory->createListResultsResponse($simpleXmlElement);
 }