lib/twilio-ruby/rest/chat/v1/service/role.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/chat/v1/service/role.rb in twilio-ruby-5.4.5
- old
+ new
@@ -41,11 +41,11 @@
'POST',
@uri,
data: data
)
- RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ RoleInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Lists RoleInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
@@ -73,11 +73,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
##
@@ -85,11 +85,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
@@ -152,11 +152,11 @@
##
# Build an instance of RoleInstance
# @param [Hash] payload Payload response from the API
# @return [RoleInstance] RoleInstance
def get_instance(payload)
- RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ RoleInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Provide a user friendly representation
def to_s
@@ -173,11 +173,11 @@
# @return [RoleContext] RoleContext
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]}/Roles/#{@solution[:sid]}"
end
##
# Fetch a RoleInstance
@@ -189,11 +189,11 @@
'GET',
@uri,
params,
)
- RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
+ RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
end
##
# Deletes the RoleInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -204,19 +204,19 @@
##
# Update the RoleInstance
# @param [String] permission The permission
# @return [RoleInstance] Updated RoleInstance
def update(permission: nil)
- data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e },})
+ data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }})
payload = @version.update(
'POST',
@uri,
data: data,
)
- RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
+ RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
end
##
# Provide a user friendly representation
def to_s
@@ -249,20 +249,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 [RoleContext] RoleContext for this RoleInstance
def context
unless @instance_context
- @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'],)
+ @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'])
end
@instance_context
end
##
@@ -336,10 +336,10 @@
##
# Update the RoleInstance
# @param [String] permission The permission
# @return [RoleInstance] Updated RoleInstance
def update(permission: nil)
- context.update(permission: permission,)
+ context.update(permission: permission)
end
##
# Provide a user friendly representation
def to_s
\ No newline at end of file