lib/twilio-ruby/rest/api/v2010/account/key.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/api/v2010/account/key.rb in twilio-ruby-5.4.5

- old
+ new

@@ -51,11 +51,11 @@ # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(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 ## @@ -63,11 +63,11 @@ # This operation lazily loads records as efficiently as possible until the limit # is reached. def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]).each {|x| yield x} end @@ -130,11 +130,11 @@ ## # Build an instance of KeyInstance # @param [Hash] payload Payload response from the API # @return [KeyInstance] KeyInstance def get_instance(payload) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## # Provide a user friendly representation def to_s @@ -151,11 +151,11 @@ # @return [KeyContext] KeyContext def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Keys/#{@solution[:sid]}.json" end ## # Fetch a KeyInstance @@ -167,27 +167,27 @@ 'GET', @uri, params, ) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## # Update the KeyInstance # @param [String] friendly_name The friendly_name # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @uri, data: data, ) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## # Deletes the KeyInstance # @return [Boolean] true if delete succeeds, true otherwise @@ -223,20 +223,20 @@ 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), } # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [KeyContext] KeyContext for this KeyInstance def context unless @instance_context - @instance_context = KeyContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = KeyContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end ## @@ -273,10 +273,10 @@ ## # Update the KeyInstance # @param [String] friendly_name The friendly_name # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## # Deletes the KeyInstance # @return [Boolean] true if delete succeeds, true otherwise \ No newline at end of file