pages_retrieved = $pages_retrieved; } /** * Gets the number of pages retrieved from this response. * * @since 2.0.0 * * @return int */ public function get_pages_retrieved() { return $this->pages_retrieved; } /** * Gets the response data. * * @since 2.0.0 * * @return array */ public function get_data() { return $this->response_data['data'] ?? []; } /** * Gets the pagination data. * * @since 2.0.0 * * @return object */ public function get_pagination_data() { return $this->response_data['paging'] ?? new stdClass(); } /** * Gets the API endpoint for the next page of results. * * @since 2.0.0 * * @return string */ public function get_next_page_endpoint() { return $this->get_pagination_data()->next ?? ''; } /** * Gets the API endpoint for the previous page of results. * * @since 2.0.0 * * @return string */ public function get_previous_page_endpoint() { return $this->get_pagination_data()->previous ?? ''; } }