/** * @return $this */ public function getPreviousResult() { if ($this->getPreviousPage()) { return $this->client->getCollection($this->getNextPage(), $this->getCurrentPage() - 1, $this->getPerPage()); } return null; }
/** * Note: the web service never return next page URL, this method overrides the next_page url and resets the current pages param * @return $this */ public function getPreviousResult() { if ($this->getCurrentPage() > 1) { return $this->client->getCollection($this->getEndPoint(), 'tickets', $this->getCurrentPage() - 1, $this->getPerPage()); } return null; }