lib/twilio-ruby/rest/bulkexports/v1/export/day.rb in twilio-ruby-5.41.0 vs lib/twilio-ruby/rest/bulkexports/v1/export/day.rb in twilio-ruby-5.42.0

- old
+ new

@@ -29,49 +29,36 @@ ## # Lists DayInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into # memory before returning. - # @param [String] next_token The next_token - # @param [String] previous_token The previous_token # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when # not set will use the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the limit with the most # efficient page size, i.e. min(limit, 1000) # @return [Array] Array of up to limit results - def list(next_token: :unset, previous_token: :unset, limit: nil, page_size: nil) - self.stream( - next_token: next_token, - previous_token: previous_token, - limit: limit, - page_size: page_size - ).entries + def list(limit: nil, page_size: nil) + self.stream(limit: limit, page_size: page_size).entries end ## # Streams DayInstance records from the API as an Enumerable. # This operation lazily loads records as efficiently as possible until the limit # is reached. - # @param [String] next_token The next_token - # @param [String] previous_token The previous_token # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit. # @param [Integer] page_size Number of records to fetch per request, when # not set will use the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the limit with the most # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results - def stream(next_token: :unset, previous_token: :unset, limit: nil, page_size: nil) + def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page( - next_token: next_token, - previous_token: previous_token, - page_size: limits[:page_size], - ) + page = self.page(page_size: limits[:page_size], ) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end ## @@ -89,19 +76,15 @@ end ## # Retrieve a single page of DayInstance records from the API. # Request is executed immediately. - # @param [String] next_token The next_token - # @param [String] previous_token The previous_token # @param [String] page_token PageToken provided by the API # @param [Integer] page_number Page Number, this value is simply for client state # @param [Integer] page_size Number of records to return, defaults to 50 # @return [Page] Page of DayInstance - def page(next_token: :unset, previous_token: :unset, page_token: :unset, page_number: :unset, page_size: :unset) + def page(page_token: :unset, page_number: :unset, page_size: :unset) params = Twilio::Values.of({ - 'NextToken' => next_token, - 'PreviousToken' => previous_token, 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) \ No newline at end of file