Module: Helio::APIOperations::List
- Included in:
- CustomerList, ListObject, Participant
- Defined in:
- lib/helio/api_operations/list.rb
Instance Method Summary collapse
Instance Method Details
#list(filters = {}, opts = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/helio/api_operations/list.rb', line 6 def list(filters = {}, opts = {}) opts = Util.normalize_opts(opts) resp, opts = request(:get, resource_url, filters, opts) obj = ListObject.construct_from(resp.data, opts) # set filters so that we can fetch the same limit, expansions, and # predicates when accessing the next and previous pages # # just for general cleanliness, remove any paging options obj.filters = filters.dup obj.filters.delete(:ending_before) obj.filters.delete(:starting_after) obj end |