/// <summary> /// update /// </summary> /// <param name="options"> Update ModelBuild parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ModelBuild </returns> public static ModelBuildResource Update(UpdateModelBuildOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateModelBuildOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/understand/Services/" + options.PathServiceSid + "/ModelBuilds/" + options.PathSid + "", client.Region, postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="uniqueName"> The unique_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ModelBuild </returns> public static async System.Threading.Tasks.Task <ModelBuildResource> UpdateAsync(string pathServiceSid, string pathSid, string uniqueName = null, ITwilioRestClient client = null) { var options = new UpdateModelBuildOptions(pathServiceSid, pathSid) { UniqueName = uniqueName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="uniqueName"> The unique_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ModelBuild </returns> public static ModelBuildResource Update(string pathServiceSid, string pathSid, string uniqueName = null, ITwilioRestClient client = null) { var options = new UpdateModelBuildOptions(pathServiceSid, pathSid) { UniqueName = uniqueName }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update ModelBuild parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ModelBuild </returns> public static async System.Threading.Tasks.Task <ModelBuildResource> UpdateAsync(UpdateModelBuildOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }