/// <summary> /// update /// </summary> /// <param name="options"> Update Defaults parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Defaults </returns> public static DefaultsResource Update(UpdateDefaultsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateDefaultsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Autopilot, "/v1/Assistants/" + options.PathAssistantSid + "/Defaults", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The assistant_sid </param> /// <param name="defaults"> The defaults </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Defaults </returns> public static async System.Threading.Tasks.Task <DefaultsResource> UpdateAsync(string pathAssistantSid, object defaults = null, ITwilioRestClient client = null) { var options = new UpdateDefaultsOptions(pathAssistantSid) { Defaults = defaults }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathAssistantSid"> The assistant_sid </param> /// <param name="defaults"> The defaults </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Defaults </returns> public static DefaultsResource Update(string pathAssistantSid, object defaults = null, ITwilioRestClient client = null) { var options = new UpdateDefaultsOptions(pathAssistantSid) { Defaults = defaults }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update Defaults parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Defaults </returns> public static async System.Threading.Tasks.Task <DefaultsResource> UpdateAsync(UpdateDefaultsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }