lib/twilio-ruby/rest/preview/understand/service/intent.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/preview/understand/service/intent.rb in twilio-ruby-5.4.5
- old
+ new
@@ -52,11 +52,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
##
@@ -64,11 +64,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
@@ -112,19 +112,19 @@
# Request is executed immediately.
# @param [String] unique_name The unique_name
# @param [String] friendly_name The friendly_name
# @return [IntentInstance] Newly created IntentInstance
def create(unique_name: nil, friendly_name: :unset)
- data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name,})
+ data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name})
payload = @version.create(
'POST',
@uri,
data: data
)
- IntentInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ IntentInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Provide a user friendly representation
def to_s
@@ -151,11 +151,11 @@
##
# Build an instance of IntentInstance
# @param [Hash] payload Payload response from the API
# @return [IntentInstance] IntentInstance
def get_instance(payload)
- IntentInstance.new(@version, payload, service_sid: @solution[:service_sid],)
+ IntentInstance.new(@version, payload, service_sid: @solution[:service_sid])
end
##
# Provide a user friendly representation
def to_s
@@ -174,11 +174,11 @@
# @return [IntentContext] IntentContext
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]}/Intents/#{@solution[:sid]}"
# Dependents
@fields = nil
@samples = nil
@@ -194,28 +194,28 @@
'GET',
@uri,
params,
)
- IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
+ IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
end
##
# Update the IntentInstance
# @param [String] friendly_name The friendly_name
# @param [String] unique_name The unique_name
# @return [IntentInstance] Updated IntentInstance
def update(friendly_name: :unset, unique_name: :unset)
- data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name,})
+ data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name})
payload = @version.update(
'POST',
@uri,
data: data,
)
- IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],)
+ IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
end
##
# Deletes the IntentInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -229,15 +229,15 @@
# @return [FieldContext] if sid was passed.
def fields(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
- return FieldContext.new(@version, @solution[:service_sid], @solution[:sid], sid,)
+ return FieldContext.new(@version, @solution[:service_sid], @solution[:sid], sid)
end
unless @fields
- @fields = FieldList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid],)
+ @fields = FieldList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid])
end
@fields
end
@@ -247,15 +247,15 @@
# @return [SampleContext] if sid was passed.
def samples(sid=:unset)
raise ArgumentError, 'sid cannot be nil' if sid.nil?
if sid != :unset
- return SampleContext.new(@version, @solution[:service_sid], @solution[:sid], sid,)
+ return SampleContext.new(@version, @solution[:service_sid], @solution[:sid], sid)
end
unless @samples
- @samples = SampleList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid],)
+ @samples = SampleList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid])
end
@samples
end
@@ -293,20 +293,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 [IntentContext] IntentContext for this IntentInstance
def context
unless @instance_context
- @instance_context = IntentContext.new(@version, @params['service_sid'], @params['sid'],)
+ @instance_context = IntentContext.new(@version, @params['service_sid'], @params['sid'])
end
@instance_context
end
##
@@ -374,10 +374,10 @@
# Update the IntentInstance
# @param [String] friendly_name The friendly_name
# @param [String] unique_name The unique_name
# @return [IntentInstance] Updated IntentInstance
def update(friendly_name: :unset, unique_name: :unset)
- context.update(friendly_name: friendly_name, unique_name: unique_name,)
+ context.update(friendly_name: friendly_name, unique_name: unique_name)
end
##
# Deletes the IntentInstance
# @return [Boolean] true if delete succeeds, true otherwise
\ No newline at end of file