Class: MailchimpAPI::Pagination::PrepareQueryParams Private
- Inherits:
-
Object
- Object
- MailchimpAPI::Pagination::PrepareQueryParams
- Defined in:
- lib/mailchimp-api/pagination/prepare_query_params.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Internal class for preparing query parameters for paginated requests
Class Method Summary collapse
-
.call(query, items_field:) ⇒ Hash
private
Prepares query parameters for paginated requests.
Class Method Details
.call(query, items_field:) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Prepares query parameters for paginated requests
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mailchimp-api/pagination/prepare_query_params.rb', line 13 def call(query, items_field:) query ||= {} query = query.transform_keys(&:to_sym) prepare_offset(query) prepare_count(query) ensure_fields_included(query, items_field: items_field.to_s, total_field: "total_items") ensure_fields_not_excluded(query, items_field: items_field.to_s, total_field: "total_items") query end |