Class: SampleContext

Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext(version, assistantSid, taskSid, sid)

new SampleContext(version, assistantSid, taskSid, sid)

Initialize the SampleContext 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.
Parameters:
Name Type Description
version Understand Version of the resource
assistantSid sid_like The unique ID of the Assistant.
taskSid sid_like The unique ID of the Task associated with this Sample.
sid sid A 34 character string that uniquely identifies this resource.
Source:

Methods

fetch(callbackopt) → {Promise}

fetch a SampleInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed SampleInstance
Type
Promise

remove(callbackopt) → {Promise}

remove a SampleInstance
Parameters:
Name Type Attributes Description
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed SampleInstance
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object

update(optsopt, callbackopt) → {Promise}

update a SampleInstance
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
language string <optional>
An ISO language-country string of the sample.
taggedText string <optional>
The text example of how end-users may express this task. The sample may contain Field tag blocks.
sourceChannel string <optional>
The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed SampleInstance
Type
Promise