/// <summary> /// update /// </summary> /// <param name="options"> Update ConnectionPolicy parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ConnectionPolicy </returns> public static ConnectionPolicyResource Update(UpdateConnectionPolicyOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateConnectionPolicyOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Voice, "/v1/ConnectionPolicies/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ConnectionPolicy </returns> public static async System.Threading.Tasks.Task <ConnectionPolicyResource> UpdateAsync(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateConnectionPolicyOptions(pathSid) { FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of ConnectionPolicy </returns> public static ConnectionPolicyResource Update(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateConnectionPolicyOptions(pathSid) { FriendlyName = friendlyName }; return(Update(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update ConnectionPolicy parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of ConnectionPolicy </returns> public static async System.Threading.Tasks.Task <ConnectionPolicyResource> UpdateAsync(UpdateConnectionPolicyOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }