lib/twilio-ruby/rest/preview/proxy/service/short_code.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/preview/proxy/service/short_code.rb in twilio-ruby-5.4.5

- old
+ new

@@ -29,19 +29,19 @@ # Retrieve a single page of ShortCodeInstance records from the API. # Request is executed immediately. # @param [String] sid The shortcode Sid that uniquely identifies this resource # @return [ShortCodeInstance] Newly created ShortCodeInstance def create(sid: nil) - data = Twilio::Values.of({'Sid' => sid,}) + data = Twilio::Values.of({'Sid' => sid}) payload = @version.create( 'POST', @uri, data: data ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## # Lists ShortCodeInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into @@ -69,11 +69,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 ## @@ -81,11 +81,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 @@ -150,11 +150,11 @@ ## # Build an instance of ShortCodeInstance # @param [Hash] payload Payload response from the API # @return [ShortCodeInstance] ShortCodeInstance def get_instance(payload) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## # Provide a user friendly representation def to_s @@ -173,11 +173,11 @@ # @return [ShortCodeContext] ShortCodeContext def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/ShortCodes/#{@solution[:sid]}" end ## # Deletes the ShortCodeInstance @@ -196,11 +196,11 @@ 'GET', @uri, params, ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## # Provide a user friendly representation def to_s @@ -235,19 +235,19 @@ 'url' => payload['url'], } # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_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 [ShortCodeContext] ShortCodeContext for this ShortCodeInstance def context unless @instance_context - @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end ## \ No newline at end of file