module Telnyx::APIOperations::List
Public Instance Methods
all(filters = {}, opts = {})
The original version of list
was given the somewhat unfortunate name of all
, and this alias allows us to maintain backward compatibility (the choice was somewhat misleading in the way that it only returned a single page rather than all objects).
Alias for: list
list(filters = {}, opts = {})
click to toggle source
# File lib/telnyx/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.merge(url: resource_url), 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(:page) # undo this as it interferes with the pagination system... obj end
Also aliased as: all