/// <summary>
        /// Rename an IpAccessControlList
        /// </summary>
        ///
        /// <param name="options"> Update IpAccessControlList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IpAccessControlList </returns>
        public static IpAccessControlListResource Update(UpdateIpAccessControlListOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
        /// <summary>
        /// Rename an IpAccessControlList
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of IpAccessControlList </returns>
        public static async System.Threading.Tasks.Task <IpAccessControlListResource> UpdateAsync(string pathSid, string friendlyName, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateIpAccessControlListOptions(pathSid, friendlyName)
            {
                PathAccountSid = pathAccountSid
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Rename an IpAccessControlList
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IpAccessControlList </returns>
        public static IpAccessControlListResource Update(string pathSid, string friendlyName, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateIpAccessControlListOptions(pathSid, friendlyName)
            {
                PathAccountSid = pathAccountSid
            };

            return(Update(options, client));
        }
예제 #4
0
 private static Request BuildUpdateRequest(UpdateIpAccessControlListOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/IpAccessControlLists/" + options.PathSid + ".json",
                postParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Rename an IpAccessControlList
        /// </summary>
        ///
        /// <param name="options"> Update IpAccessControlList parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of IpAccessControlList </returns>
        public static async System.Threading.Tasks.Task <IpAccessControlListResource> UpdateAsync(UpdateIpAccessControlListOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }