protected function rest_read($id, array $filters)
    {
        if (empty($id)) {
            throw new ApiException("Invalid resource id.");
        }

        $id = urlencode($id);
        $result = $this->client->performHttpCall(
            self::REST_READ,
            "{$this->getResourcePath()}/{$id}" . $this->buildQueryString($filters)
        );

        return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
    }
protected function rest_read($id, array $filters)
    {
        if (empty($id)) {
            throw new ApiException("Invalid resource id.");
        }

        $id = urlencode($id);
        $result = $this->client->performHttpCall(
            self::REST_READ,
            "{$this->getResourcePath()}/{$id}" . $this->buildQueryString($filters)
        );

        return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
    }
protected function rest_read ( $ id , array $ filters ) { if ( empty ( $ id ) ) { throw new ApiException ( "Invalid resource id." ) ; } $ id = urlencode ( $ id ) ; $ result = $ this -> client -> performHttpCall ( self :: REST_READ , "{$this->getResourcePath()}/{$id}" . $ this -> buildQueryString ( $ filters ) ) ; return ResourceFactory :: createFromApiResult ( $ result , $ this -> getResourceObject ( ) ) ; }
Retrieves a single object from the REST API.

@param string $id Id of the object to retrieve.
@param array $filters
@return BaseResource
@throws ApiException
Retrieves a single object from the REST API .