class Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskActionsInstance

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

Public Class Methods

new(version, payload, assistant_sid: nil, task_sid: nil) click to toggle source

Initialize the TaskActionsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] assistant_sid The unique ID of the parent Assistant. @param [String] task_sid The unique ID of the Task. @return [TaskActionsInstance] TaskActionsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
148 def initialize(version, payload, assistant_sid: nil, task_sid: nil)
149   super(version)
150 
151   # Marshaled Properties
152   @properties = {
153       'account_sid' => payload['account_sid'],
154       'assistant_sid' => payload['assistant_sid'],
155       'task_sid' => payload['task_sid'],
156       'url' => payload['url'],
157       'data' => payload['data'],
158   }
159 
160   # Context
161   @instance_context = nil
162   @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, }
163 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The unique ID of the Account that created this Field.

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
178 def account_sid
179   @properties['account_sid']
180 end
assistant_sid() click to toggle source

@return [String] The unique ID of the parent Assistant.

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
184 def assistant_sid
185   @properties['assistant_sid']
186 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [TaskActionsContext] TaskActionsContext for this TaskActionsInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
169 def context
170   unless @instance_context
171     @instance_context = TaskActionsContext.new(@version, @params['assistant_sid'], @params['task_sid'], )
172   end
173   @instance_context
174 end
data() click to toggle source

@return [Hash] The data

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
202 def data
203   @properties['data']
204 end
fetch() click to toggle source

Fetch the TaskActionsInstance @return [TaskActionsInstance] Fetched TaskActionsInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
209 def fetch
210   context.fetch
211 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
231 def inspect
232   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
233   "<Twilio.Preview.Understand.TaskActionsInstance #{values}>"
234 end
task_sid() click to toggle source

@return [String] The unique ID of the Task.

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
190 def task_sid
191   @properties['task_sid']
192 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
224 def to_s
225   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
226   "<Twilio.Preview.Understand.TaskActionsInstance #{values}>"
227 end
update(actions: :unset) click to toggle source

Update the TaskActionsInstance @param [Hash] actions The JSON actions that instruct the Assistant how to

perform this task.

@return [TaskActionsInstance] Updated TaskActionsInstance

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
218 def update(actions: :unset)
219   context.update(actions: actions, )
220 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
196 def url
197   @properties['url']
198 end