/// <summary> /// update /// </summary> /// /// <param name="options"> Update IpAddress parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpAddress </returns> public static IpAddressResource Update(UpdateIpAddressOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// update /// </summary> /// /// <param name="pathIpAccessControlListSid"> The ip_access_control_list_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="ipAddress"> The ip_address </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpAddress </returns> public static async System.Threading.Tasks.Task <IpAddressResource> UpdateAsync(string pathIpAccessControlListSid, string pathSid, string pathAccountSid = null, string ipAddress = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateIpAddressOptions(pathIpAccessControlListSid, pathSid) { PathAccountSid = pathAccountSid, IpAddress = ipAddress, FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// /// <param name="pathIpAccessControlListSid"> The ip_access_control_list_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="ipAddress"> The ip_address </param> /// <param name="friendlyName"> The friendly_name </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of IpAddress </returns> public static IpAddressResource Update(string pathIpAccessControlListSid, string pathSid, string pathAccountSid = null, string ipAddress = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateIpAddressOptions(pathIpAccessControlListSid, pathSid) { PathAccountSid = pathAccountSid, IpAddress = ipAddress, FriendlyName = friendlyName }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateIpAddressOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/IpAccessControlLists/" + options.PathIpAccessControlListSid + "/IpAddresses/" + options.PathSid + ".json", postParams: options.GetParams() )); }
/// <summary> /// update /// </summary> /// /// <param name="options"> Update IpAddress parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of IpAddress </returns> public static async System.Threading.Tasks.Task <IpAddressResource> UpdateAsync(UpdateIpAddressOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }