lib/twilio-ruby/rest/preview/sync/service/sync_map.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/preview/sync/service/sync_map.rb in twilio-ruby-5.4.5
- old
+ new
@@ -29,19 +29,19 @@
# Retrieve a single page of SyncMapInstance records from the API.
# Request is executed immediately.
# @param [String] unique_name The unique_name
# @return [SyncMapInstance] Newly created SyncMapInstance
def create(unique_name: :unset)
- data = Twilio::Values.of({'UniqueName' => unique_name,})
+ data = Twilio::Values.of({'UniqueName' => unique_name})
payload = @version.create(
'POST',
@uri,
data: data
)
- SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Lists SyncMapInstance records from the API as a list.
# Unlike stream(), this operation is eager and will load `limit` records into
@@ -69,11 +69,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
##
@@ -81,11 +81,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
@@ -150,11 +150,11 @@
##
# Build an instance of SyncMapInstance
# @param [Hash] payload Payload response from the API
# @return [SyncMapInstance] SyncMapInstance
def get_instance(payload)
- SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Provide a user friendly representation
def to_s
@@ -173,11 +173,11 @@
# @return [SyncMapContext] SyncMapContext
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]}/Maps/#{@solution[:sid]}"
# Dependents
@sync_map_items = nil
@sync_map_permissions = nil
@@ -193,11 +193,11 @@
'GET',
@uri,
params,
)
- SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
+ SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
end
##
# Deletes the SyncMapInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -211,11 +211,11 @@
# @return [SyncMapItemContext] if key was passed.
def sync_map_items(key=:unset)
raise ArgumentError, 'key cannot be nil' if key.nil?
if key != :unset
- return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key,)
+ return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key)
end
unless @sync_map_items
@sync_map_items = SyncMapItemList.new(
@version,
@@ -233,11 +233,11 @@
# @return [SyncMapPermissionContext] if identity was passed.
def sync_map_permissions(identity=:unset)
raise ArgumentError, 'identity cannot be nil' if identity.nil?
if identity != :unset
- return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,)
+ return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity)
end
unless @sync_map_permissions
@sync_map_permissions = SyncMapPermissionList.new(
@version,
@@ -284,19 +284,19 @@
'created_by' => payload['created_by'],
}
# 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 [SyncMapContext] SyncMapContext for this SyncMapInstance
def context
unless @instance_context
- @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid'],)
+ @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid'])
end
@instance_context
end
##
\ No newline at end of file