Class: Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskActionsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskActionsInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
Overview
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 [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique ID of the Account that created this Field.
-
#assistant_sid ⇒ String
The unique ID of the parent Assistant.
-
#context ⇒ TaskActionsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ Hash
The data.
-
#fetch ⇒ TaskActionsInstance
Fetch a TaskActionsInstance.
-
#initialize(version, payload, assistant_sid: nil, task_sid: nil) ⇒ TaskActionsInstance
constructor
Initialize the TaskActionsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#task_sid ⇒ String
The unique ID of the Task.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(actions: :unset) ⇒ TaskActionsInstance
Update the TaskActionsInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, assistant_sid: nil, task_sid: nil) ⇒ TaskActionsInstance
Initialize the TaskActionsInstance
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 158 def initialize(version, payload, assistant_sid: nil, task_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'task_sid' => payload['task_sid'], 'url' => payload['url'], 'data' => payload['data'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Field.
188 189 190 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 188 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The unique ID of the parent Assistant.
194 195 196 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 194 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ TaskActionsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
179 180 181 182 183 184 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 179 def context unless @instance_context @instance_context = TaskActionsContext.new(@version, @params['assistant_sid'], @params['task_sid'], ) end @instance_context end |
#data ⇒ Hash
Returns The data.
212 213 214 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 212 def data @properties['data'] end |
#fetch ⇒ TaskActionsInstance
Fetch a TaskActionsInstance
219 220 221 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 219 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
241 242 243 244 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 241 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.TaskActionsInstance #{values}>" end |
#task_sid ⇒ String
Returns The unique ID of the Task.
200 201 202 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 200 def task_sid @properties['task_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 234 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.TaskActionsInstance #{values}>" end |
#update(actions: :unset) ⇒ TaskActionsInstance
Update the TaskActionsInstance
228 229 230 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 228 def update(actions: :unset) context.update(actions: actions, ) end |
#url ⇒ String
Returns The url.
206 207 208 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb', line 206 def url @properties['url'] end |