Class: Twilio::REST::Autopilot::V1::AssistantContext::TaskContext::TaskActionsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Autopilot::V1::AssistantContext::TaskContext::TaskActionsInstance
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/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 SID of the Account that created the resource.
-
#assistant_sid ⇒ String
The SID of the Assistant that is the parent of the Task associated with the resource.
-
#context ⇒ TaskActionsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ Hash
The JSON string that specifies the actions that instruct the Assistant on how to perform the task.
-
#fetch ⇒ TaskActionsInstance
Fetch the 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 SID of the Task associated with the resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(actions: :unset) ⇒ TaskActionsInstance
Update the TaskActionsInstance.
-
#url ⇒ String
The absolute URL of the TaskActions resource.
Constructor Details
#initialize(version, payload, assistant_sid: nil, task_sid: nil) ⇒ TaskActionsInstance
Initialize the TaskActionsInstance
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 161 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 SID of the Account that created the resource.
191 192 193 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 191 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The SID of the Assistant that is the parent of the Task associated with the resource.
197 198 199 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 197 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
182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 182 def context unless @instance_context @instance_context = TaskActionsContext.new(@version, @params['assistant_sid'], @params['task_sid'], ) end @instance_context end |
#data ⇒ Hash
Returns The JSON string that specifies the actions that instruct the Assistant on how to perform the task.
215 216 217 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 215 def data @properties['data'] end |
#fetch ⇒ TaskActionsInstance
Fetch the TaskActionsInstance
222 223 224 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 222 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
245 246 247 248 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 245 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.TaskActionsInstance #{values}>" end |
#task_sid ⇒ String
Returns The SID of the Task associated with the resource.
203 204 205 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 203 def task_sid @properties['task_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
238 239 240 241 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 238 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.TaskActionsInstance #{values}>" end |
#update(actions: :unset) ⇒ TaskActionsInstance
Update the TaskActionsInstance
232 233 234 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 232 def update(actions: :unset) context.update(actions: actions, ) end |
#url ⇒ String
Returns The absolute URL of the TaskActions resource.
209 210 211 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb', line 209 def url @properties['url'] end |