protected function rest_list($from = null, $limit = null, array $filters)
    {
        $filters = array_merge(["from" => $from, "limit" => $limit], $filters);

        $apiPath = $this->getResourcePath() . $this->buildQueryString($filters);

        $result = $this->client->performHttpCall(self::REST_LIST, $apiPath);

        /** @var BaseCollection $collection */
        $collection = $this->getResourceCollectionObject($result->count, $result->_links);

        foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) {
            $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject());
        }

        return $collection;
    }
protected function rest_list($from = null, $limit = null, array $filters)
    {
        $filters = array_merge(["from" => $from, "limit" => $limit], $filters);

        $apiPath = $this->getResourcePath() . $this->buildQueryString($filters);

        $result = $this->client->performHttpCall(self::REST_LIST, $apiPath);

        /** @var BaseCollection $collection */
        $collection = $this->getResourceCollectionObject($result->count, $result->_links);

        foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) {
            $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->getResourceObject());
        }

        return $collection;
    }
protected function rest_list ( $ from = null , $ limit = null , array $ filters ) { $ filters = array_merge ( [ "from" => $ from , "limit" => $ limit ] , $ filters ) ; $ apiPath = $ this -> getResourcePath ( ) . $ this -> buildQueryString ( $ filters ) ; $ result = $ this -> client -> performHttpCall ( self :: REST_LIST , $ apiPath ) ; /** @var BaseCollection $collection */ $ collection = $ this -> getResourceCollectionObject ( $ result -> count , $ result -> _links ) ; foreach ( $ result -> _embedded -> { $ collection -> getCollectionResourceName ( ) } as $ dataResult ) { $ collection [ ] = ResourceFactory :: createFromApiResult ( $ dataResult , $ this -> getResourceObject ( ) ) ; } return $ collection ; }
Get a collection of objects from the REST API.

@param string $from The first resource ID you want to include in your list.
@param int $limit
@param array $filters

@return BaseCollection
@throws ApiException
Get a collection of objects from the REST API .