lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb in twilio-ruby-5.4.5

- old
+ new

@@ -33,19 +33,19 @@ # this Key credential, up to 256 characters long. # @param [String] device_sid Provides the unique string identifier of an existing # Device to become authenticated with this Key credential. # @return [KeyInstance] Newly created KeyInstance def create(friendly_name: :unset, device_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid}) payload = @version.create( 'POST', @uri, data: data ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## # Lists KeyInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into @@ -77,11 +77,11 @@ # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results def stream(device_sid: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(device_sid: device_sid, page_size: limits[:page_size],) + page = self.page(device_sid: device_sid, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end ## @@ -89,11 +89,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 @@ -161,11 +161,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, fleet_sid: @solution[:fleet_sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## # Provide a user friendly representation def to_s @@ -185,11 +185,11 @@ # @return [KeyContext] KeyContext def initialize(version, fleet_sid, sid) super(version) # Path Solution - @solution = {fleet_sid: fleet_sid, sid: sid,} + @solution = {fleet_sid: fleet_sid, sid: sid} @uri = "/Fleets/#{@solution[:fleet_sid]}/Keys/#{@solution[:sid]}" end ## # Fetch a KeyInstance @@ -201,11 +201,11 @@ 'GET', @uri, params, ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## # Deletes the KeyInstance # @return [Boolean] true if delete succeeds, true otherwise @@ -219,19 +219,19 @@ # this Key credential, up to 256 characters long. # @param [String] device_sid Provides the unique string identifier of an existing # Device to become authenticated with this Key credential. # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset, device_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid}) payload = @version.update( 'POST', @uri, data: data, ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## # Provide a user friendly representation def to_s @@ -268,20 +268,20 @@ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } # Context @instance_context = nil - @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'],} + @params = {'fleet_sid' => fleet_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['fleet_sid'], @params['sid'],) + @instance_context = KeyContext.new(@version, @params['fleet_sid'], @params['sid']) end @instance_context end ## @@ -358,10 +358,10 @@ # this Key credential, up to 256 characters long. # @param [String] device_sid Provides the unique string identifier of an existing # Device to become authenticated with this Key credential. # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset, device_sid: :unset) - context.update(friendly_name: friendly_name, device_sid: device_sid,) + context.update(friendly_name: friendly_name, device_sid: device_sid) end ## # Provide a user friendly representation def to_s \ No newline at end of file