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

- old
+ new

@@ -50,11 +50,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 ## @@ -62,11 +62,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 @@ -125,11 +125,11 @@ 'POST', @uri, data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s @@ -156,11 +156,11 @@ ## # Build an instance of ServiceInstance # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s @@ -178,11 +178,11 @@ # @return [ServiceContext] ServiceContext def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @field_types = nil @intents = nil @@ -200,11 +200,11 @@ 'GET', @uri, params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## # Update the ServiceInstance # @param [String] friendly_name The friendly_name @@ -224,11 +224,11 @@ 'POST', @uri, data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## # Deletes the ServiceInstance # @return [Boolean] true if delete succeeds, true otherwise @@ -242,15 +242,15 @@ # @return [FieldTypeContext] if sid was passed. def field_types(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FieldTypeContext.new(@version, @solution[:sid], sid,) + return FieldTypeContext.new(@version, @solution[:sid], sid) end unless @field_types - @field_types = FieldTypeList.new(@version, service_sid: @solution[:sid],) + @field_types = FieldTypeList.new(@version, service_sid: @solution[:sid]) end @field_types end @@ -260,15 +260,15 @@ # @return [IntentContext] if sid was passed. def intents(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IntentContext.new(@version, @solution[:sid], sid,) + return IntentContext.new(@version, @solution[:sid], sid) end unless @intents - @intents = IntentList.new(@version, service_sid: @solution[:sid],) + @intents = IntentList.new(@version, service_sid: @solution[:sid]) end @intents end @@ -278,15 +278,15 @@ # @return [ModelBuildContext] if sid was passed. def model_builds(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ModelBuildContext.new(@version, @solution[:sid], sid,) + return ModelBuildContext.new(@version, @solution[:sid], sid) end unless @model_builds - @model_builds = ModelBuildList.new(@version, service_sid: @solution[:sid],) + @model_builds = ModelBuildList.new(@version, service_sid: @solution[:sid]) end @model_builds end @@ -296,15 +296,15 @@ # @return [QueryContext] if sid was passed. def queries(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return QueryContext.new(@version, @solution[:sid], sid,) + return QueryContext.new(@version, @solution[:sid], sid) end unless @queries - @queries = QueryList.new(@version, service_sid: @solution[:sid],) + @queries = QueryList.new(@version, service_sid: @solution[:sid]) end @queries end @@ -343,19 +343,19 @@ 'url' => payload['url'], } # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'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 [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end ## \ No newline at end of file