lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb in twilio-ruby-5.6.0 vs lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb in twilio-ruby-5.6.1
- old
+ new
@@ -43,11 +43,11 @@
'POST',
@uri,
data: data
)
- UserInstance.new(@version, payload, service_sid: @solution[:service_sid])
+ UserInstance.new(@version, payload, service_sid: @solution[:service_sid], )
end
##
# Lists UserInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
@@ -75,11 +75,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
##
@@ -87,11 +87,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
@@ -154,11 +154,11 @@
##
# Build an instance of UserInstance
# @param [Hash] payload Payload response from the API
# @return [UserInstance] UserInstance
def get_instance(payload)
- UserInstance.new(@version, payload, service_sid: @solution[:service_sid])
+ UserInstance.new(@version, payload, service_sid: @solution[:service_sid], )
end
##
# Provide a user friendly representation
def to_s
@@ -175,11 +175,11 @@
# @return [UserContext] UserContext
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]}/Users/#{@solution[:sid]}"
# Dependents
@user_channels = nil
@user_bindings = nil
@@ -195,11 +195,11 @@
'GET',
@uri,
params,
)
- UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
+ UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
end
##
# Deletes the UserInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -224,11 +224,11 @@
'POST',
@uri,
data: data,
)
- UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
+ UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid], )
end
##
# Access the user_channels
# @return [UserChannelList]
@@ -251,11 +251,11 @@
# @return [UserBindingContext] if sid was passed.
def user_bindings(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
- return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid)
+ return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid, )
end
unless @user_bindings
@user_bindings = UserBindingList.new(
@version,
@@ -304,20 +304,20 @@
'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 [UserContext] UserContext for this UserInstance
def context
unless @instance_context
- @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'])
+ @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'], )
end
@instance_context
end
##
@@ -423,10 +423,10 @@
# @param [String] role_sid The role_sid
# @param [String] attributes The attributes
# @param [String] friendly_name The friendly_name
# @return [UserInstance] Updated UserInstance
def update(role_sid: :unset, attributes: :unset, friendly_name: :unset)
- context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name)
+ context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name, )
end
##
# Access the user_channels
# @return [user_channels] user_channels
\ No newline at end of file