/// <summary> /// update /// </summary> /// <param name="options"> Update Sample parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Sample </returns> public static SampleResource Update(UpdateSampleOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update Sample parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Sample </returns> public static async System.Threading.Tasks.Task <SampleResource> UpdateAsync(UpdateSampleOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateSampleOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/understand/Assistants/" + options.PathAssistantSid + "/Tasks/" + options.PathTaskSid + "/Samples/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant. </param> /// <param name="pathTaskSid"> The unique ID of the Task associated with this Sample. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="language"> An ISO language-country string of the sample. </param> /// <param name="taggedText"> The text example of how end-users may express this task. The sample may contain Field tag /// blocks. </param> /// <param name="sourceChannel"> 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 </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Sample </returns> public static async System.Threading.Tasks.Task <SampleResource> UpdateAsync(string pathAssistantSid, string pathTaskSid, string pathSid, string language = null, string taggedText = null, string sourceChannel = null, ITwilioRestClient client = null) { var options = new UpdateSampleOptions(pathAssistantSid, pathTaskSid, pathSid) { Language = language, TaggedText = taggedText, SourceChannel = sourceChannel }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant. </param> /// <param name="pathTaskSid"> The unique ID of the Task associated with this Sample. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="language"> An ISO language-country string of the sample. </param> /// <param name="taggedText"> The text example of how end-users may express this task. The sample may contain Field tag /// blocks. </param> /// <param name="sourceChannel"> 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 </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Sample </returns> public static SampleResource Update(string pathAssistantSid, string pathTaskSid, string pathSid, string language = null, string taggedText = null, string sourceChannel = null, ITwilioRestClient client = null) { var options = new UpdateSampleOptions(pathAssistantSid, pathTaskSid, pathSid) { Language = language, TaggedText = taggedText, SourceChannel = sourceChannel }; return(Update(options, client)); }