Pagination protocol for Stripe API responses.
Defines a common interface for pagination across API versions:
Pagination protocol for Stripe API responses. Defines a common interface for pagination across API versions: - v1: Cursor-based pagination with starting_after/ending_before - v2: URL-based pagination with next_page_url
Protocol for handling pagination of Stripe API responses.
Protocol for handling pagination of Stripe API responses.
(get-items this response)Extracts the data items from a response.
Parameters:
Returns: A sequence of items from the response.
Extracts the data items from a response. Parameters: - response: The API response map Returns: A sequence of items from the response.
(has-more? this response)Returns true if there are more pages available.
Parameters:
Returns: Boolean indicating if more pages exist.
Returns true if there are more pages available. Parameters: - response: The API response map Returns: Boolean indicating if more pages exist.
(next-page-params this response current-params)Extracts parameters for fetching the next page.
Parameters:
Returns: A map of parameters for the next page request, or nil if no more pages.
Extracts parameters for fetching the next page. Parameters: - response: The current API response map - current-params: The parameters used for the current request Returns: A map of parameters for the next page request, or nil if no more pages.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |