コード例 #1
0
        /// <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));
        }
コード例 #2
0
        /// <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));
        }
コード例 #3
0
        /// <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));
        }
コード例 #4
0
 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()
                ));
 }
コード例 #5
0
        /// <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));
        }