/// <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/Services/" + options.PathServiceSid + "/Intents/" + options.PathIntentSid + "/Samples/" + options.PathSid + "", client.Region, postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathIntentSid"> The intent_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="language"> The language </param> /// <param name="taggedText"> The tagged_text </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 pathServiceSid, string pathIntentSid, string pathSid, string language = null, string taggedText = null, ITwilioRestClient client = null) { var options = new UpdateSampleOptions(pathServiceSid, pathIntentSid, pathSid) { Language = language, TaggedText = taggedText }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathIntentSid"> The intent_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="language"> The language </param> /// <param name="taggedText"> The tagged_text </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Sample </returns> public static SampleResource Update(string pathServiceSid, string pathIntentSid, string pathSid, string language = null, string taggedText = null, ITwilioRestClient client = null) { var options = new UpdateSampleOptions(pathServiceSid, pathIntentSid, pathSid) { Language = language, TaggedText = taggedText }; return(Update(options, client)); }