Class: Moneybird::Middleware::Pagination
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Moneybird::Middleware::Pagination
- Defined in:
- lib/moneybird/middleware/pagination.rb,
lib/moneybird/middleware/pagination/links.rb
Defined Under Namespace
Classes: Links
Instance Method Summary collapse
Instance Method Details
#on_complete(response) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/moneybird/middleware/pagination.rb', line 6 def on_complete(response) return unless response[:response_headers] link_header = response[:response_headers][:link] return unless link_header response[:response_headers][:pagination_links] = find_links(link_header) end |