/// <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.Autopilot, "/v1/Assistants/" + options.PathAssistantSid + "/Tasks/" + options.PathTaskSid + "/Samples/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the Task associated with the /// resource to update </param> /// <param name="pathTaskSid"> The SID of the Task associated with the Sample resource to update </param> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="language"> The ISO language-country string that specifies the language used for the sample </param> /// <param name="taggedText"> The text example of how end users might express the task </param> /// <param name="sourceChannel"> The communication channel from which the sample was captured </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 SID of the Assistant that is the parent of the Task associated with the /// resource to update </param> /// <param name="pathTaskSid"> The SID of the Task associated with the Sample resource to update </param> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="language"> The ISO language-country string that specifies the language used for the sample </param> /// <param name="taggedText"> The text example of how end users might express the task </param> /// <param name="sourceChannel"> The communication channel from which the sample was captured </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)); }