lib/twilio-ruby/rest/proxy/v1/service/session.rb in twilio-ruby-5.18.0 vs lib/twilio-ruby/rest/proxy/v1/service/session.rb in twilio-ruby-5.19.0

- old
+ new

@@ -29,40 +29,36 @@ ## # Lists SessionInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into # memory before returning. - # @param [String] unique_name The unique_name - # @param [session.Status] status The status # @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(unique_name: :unset, status: :unset, limit: nil, page_size: nil) - self.stream(unique_name: unique_name, status: status, 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 SessionInstance records from the API as an Enumerable. # This operation lazily loads records as efficiently as possible until the limit # is reached. - # @param [String] unique_name The unique_name - # @param [session.Status] status The status # @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(unique_name: :unset, status: :unset, limit: nil, page_size: nil) + def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(unique_name: unique_name, status: status, 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 ## @@ -80,19 +76,15 @@ end ## # Retrieve a single page of SessionInstance records from the API. # Request is executed immediately. - # @param [String] unique_name The unique_name - # @param [session.Status] status The status # @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 SessionInstance - def page(unique_name: :unset, status: :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({ - 'UniqueName' => unique_name, - 'Status' => status, 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) response = @version.page( \ No newline at end of file