lib/twilio-ruby/rest/api/v2010/account/queue.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/api/v2010/account/queue.rb in twilio-ruby-5.39.0

- old
+ new

@@ -86,15 +86,13 @@ params = Twilio::Values.of({ 'PageToken' => page_token, 'Page' => page_number, 'PageSize' => page_size, }) - response = @version.page( - 'GET', - @uri, - params - ) + + response = @version.page('GET', @uri, params) + QueuePage.new(@version, response, @solution) end ## # Retrieve a single page of QueueInstance records from the API. @@ -108,25 +106,20 @@ ) QueuePage.new(@version, response, @solution) end ## - # Retrieve a single page of QueueInstance records from the API. - # Request is executed immediately. + # Create the QueueInstance # @param [String] friendly_name A descriptive string that you created to describe # this resource. It can be up to 64 characters long. # @param [String] max_size The maximum number of calls allowed to be in the queue. # The default is 100. The maximum is 5000. - # @return [QueueInstance] Newly created QueueInstance + # @return [QueueInstance] Created QueueInstance def create(friendly_name: nil, max_size: :unset) data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, }) - payload = @version.create( - 'POST', - @uri, - data: data - ) + payload = @version.create('POST', @uri, data: data) QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], ) end ## @@ -185,21 +178,15 @@ # Dependents @members = nil end ## - # Fetch a QueueInstance + # Fetch the QueueInstance # @return [QueueInstance] Fetched QueueInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], ) end ## # Update the QueueInstance @@ -209,24 +196,20 @@ # The default is 100. The maximum is 5000. # @return [QueueInstance] Updated QueueInstance def update(friendly_name: :unset, max_size: :unset) data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, }) - payload = @version.update( - 'POST', - @uri, - data: data, - ) + payload = @version.update('POST', @uri, data: data) QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], ) end ## - # Deletes the QueueInstance + # Delete the QueueInstance # @return [Boolean] true if delete succeeds, false otherwise def delete - @version.delete('delete', @uri) + @version.delete('DELETE', @uri) end ## # Access the members # @return [MemberList] @@ -360,11 +343,11 @@ def max_size @properties['max_size'] end ## - # Fetch a QueueInstance + # Fetch the QueueInstance # @return [QueueInstance] Fetched QueueInstance def fetch context.fetch end @@ -378,10 +361,10 @@ def update(friendly_name: :unset, max_size: :unset) context.update(friendly_name: friendly_name, max_size: max_size, ) end ## - # Deletes the QueueInstance + # Delete the QueueInstance # @return [Boolean] true if delete succeeds, false otherwise def delete context.delete end \ No newline at end of file