lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-5.6.0 vs lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb in twilio-ruby-5.6.1

- old
+ new

@@ -43,11 +43,11 @@ 'POST', @uri, data: data ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], ) end ## # Lists ChannelInstance 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(type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(type: type, page_size: limits[:page_size]) + page = self.page(type: type, 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 @@ -158,11 +158,11 @@ ## # Build an instance of ChannelInstance # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], ) end ## # Provide a user friendly representation def to_s @@ -179,11 +179,11 @@ # @return [ChannelContext] ChannelContext 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]}/Channels/#{@solution[:sid]}" # Dependents @members = nil @messages = nil @@ -200,11 +200,11 @@ 'GET', @uri, params, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end ## # Deletes the ChannelInstance # @return [Boolean] true if delete succeeds, true otherwise @@ -229,22 +229,22 @@ 'POST', @uri, data: data, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], ) end ## # Access the members # @return [MemberList] # @return [MemberContext] if sid was passed. def members(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid) + return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid, ) end unless @members @members = MemberList.new( @version, @@ -262,11 +262,11 @@ # @return [MessageContext] if sid was passed. def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid) + return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid, ) end unless @messages @messages = MessageList.new( @version, @@ -284,11 +284,11 @@ # @return [InviteContext] if sid was passed. def invites(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid) + return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid, ) end unless @invites @invites = InviteList.new( @version, @@ -337,20 +337,20 @@ 'links' => payload['links'], } # 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 [ChannelContext] ChannelContext for this ChannelInstance def context unless @instance_context - @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid']) + @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid'], ) end @instance_context end ## @@ -456,10 +456,10 @@ # @param [String] friendly_name The friendly_name # @param [String] unique_name The unique_name # @param [String] attributes The attributes # @return [ChannelInstance] Updated ChannelInstance def update(friendly_name: :unset, unique_name: :unset, attributes: :unset) - context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes) + context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes, ) end ## # Access the members # @return [members] members \ No newline at end of file