lib/twilio-ruby/rest/preview/understand/assistant/intent.rb in twilio-ruby-5.12.1 vs lib/twilio-ruby/rest/preview/understand/assistant/intent.rb in twilio-ruby-5.12.2
- old
+ new
@@ -114,13 +114,18 @@
# Request is executed immediately.
# @param [String] unique_name A user-provided string that uniquely identifies this
# resource as an alternative to the sid. Unique up to 64 characters long.
# @param [String] friendly_name A user-provided string that identifies this
# resource. It is non-unique and can up to 255 characters long.
+ # @param [Hash] actions The actions
# @return [IntentInstance] Newly created IntentInstance
- def create(unique_name: nil, friendly_name: :unset)
- data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name, })
+ def create(unique_name: nil, friendly_name: :unset, actions: :unset)
+ data = Twilio::Values.of({
+ 'UniqueName' => unique_name,
+ 'FriendlyName' => friendly_name,
+ 'Actions' => Twilio.serialize_object(actions),
+ })
payload = @version.create(
'POST',
@uri,
data: data
@@ -184,10 +189,11 @@
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:sid]}"
# Dependents
@fields = nil
@samples = nil
+ @intent_actions = nil
@statistics = nil
end
##
# Fetch a IntentInstance
@@ -213,13 +219,18 @@
# Update the IntentInstance
# @param [String] friendly_name A user-provided string that identifies this
# resource. It is non-unique and can up to 255 characters long.
# @param [String] unique_name A user-provided string that uniquely identifies this
# resource as an alternative to the sid. Unique up to 64 characters long.
+ # @param [Hash] actions The actions
# @return [IntentInstance] Updated IntentInstance
- def update(friendly_name: :unset, unique_name: :unset)
- data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name, })
+ def update(friendly_name: :unset, unique_name: :unset, actions: :unset)
+ data = Twilio::Values.of({
+ 'FriendlyName' => friendly_name,
+ 'UniqueName' => unique_name,
+ 'Actions' => Twilio.serialize_object(actions),
+ })
payload = @version.update(
'POST',
@uri,
data: data,
@@ -283,10 +294,18 @@
@samples
end
##
+ # Access the intent_actions
+ # @return [IntentActionsList]
+ # @return [IntentActionsContext]
+ def intent_actions
+ IntentActionsContext.new(@version, @solution[:assistant_sid], @solution[:sid], )
+ end
+
+ ##
# Access the statistics
# @return [IntentStatisticsList]
# @return [IntentStatisticsContext]
def statistics
IntentStatisticsContext.new(@version, @solution[:assistant_sid], @solution[:sid], )
@@ -407,13 +426,14 @@
# Update the IntentInstance
# @param [String] friendly_name A user-provided string that identifies this
# resource. It is non-unique and can up to 255 characters long.
# @param [String] unique_name A user-provided string that uniquely identifies this
# resource as an alternative to the sid. Unique up to 64 characters long.
+ # @param [Hash] actions The actions
# @return [IntentInstance] Updated IntentInstance
- def update(friendly_name: :unset, unique_name: :unset)
- context.update(friendly_name: friendly_name, unique_name: unique_name, )
+ def update(friendly_name: :unset, unique_name: :unset, actions: :unset)
+ context.update(friendly_name: friendly_name, unique_name: unique_name, actions: actions, )
end
##
# Deletes the IntentInstance
# @return [Boolean] true if delete succeeds, true otherwise
@@ -431,9 +451,16 @@
##
# Access the samples
# @return [samples] samples
def samples
context.samples
+ end
+
+ ##
+ # Access the intent_actions
+ # @return [intent_actions] intent_actions
+ def intent_actions
+ context.intent_actions
end
##
# Access the statistics
# @return [statistics] statistics
\ No newline at end of file