lib/twilio-ruby/rest/notify/v1/service.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/notify/v1/service.rb in twilio-ruby-5.4.5

- old
+ new

@@ -63,11 +63,11 @@ 'POST', @uri, data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## # Lists ServiceInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into @@ -97,11 +97,11 @@ # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end ## @@ -109,11 +109,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 @@ -180,11 +180,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 @@ -202,11 +202,11 @@ # @return [ServiceContext] ServiceContext def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @bindings = nil @notifications = nil @@ -231,11 +231,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 @@ -275,26 +275,26 @@ 'POST', @uri, data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## # Access the bindings # @return [BindingList] # @return [BindingContext] if sid was passed. def bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return BindingContext.new(@version, @solution[:sid], sid,) + return BindingContext.new(@version, @solution[:sid], sid) end unless @bindings - @bindings = BindingList.new(@version, service_sid: @solution[:sid],) + @bindings = BindingList.new(@version, service_sid: @solution[:sid]) end @bindings end @@ -302,11 +302,11 @@ # Access the notifications # @return [NotificationList] # @return [NotificationContext] def notifications unless @notifications - @notifications = NotificationList.new(@version, service_sid: @solution[:sid],) + @notifications = NotificationList.new(@version, service_sid: @solution[:sid]) end @notifications end @@ -316,15 +316,15 @@ # @return [UserContext] if identity was passed. def users(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return UserContext.new(@version, @solution[:sid], identity,) + return UserContext.new(@version, @solution[:sid], identity) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users end @@ -332,11 +332,11 @@ # Access the segments # @return [SegmentList] # @return [SegmentContext] def segments unless @segments - @segments = SegmentList.new(@version, service_sid: @solution[:sid],) + @segments = SegmentList.new(@version, service_sid: @solution[:sid]) end @segments end @@ -382,19 +382,19 @@ 'default_alexa_notification_protocol_version' => payload['default_alexa_notification_protocol_version'], } # 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