示例#1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update RatePlan parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RatePlan </returns>
        public static RatePlanResource Update(UpdateRatePlanOptions 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="pathSid"> The sid </param>
        /// <param name="uniqueName"> The unique_name </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 RatePlan </returns>
        public static async System.Threading.Tasks.Task <RatePlanResource> UpdateAsync(string pathSid, string uniqueName = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateRatePlanOptions(pathSid)
            {
                UniqueName = uniqueName, FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }
示例#3
0
 private static Request BuildUpdateRequest(UpdateRatePlanOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/wireless/RatePlans/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
示例#4
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RatePlan </returns>
        public static RatePlanResource Update(string pathSid, string uniqueName = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateRatePlanOptions(pathSid)
            {
                UniqueName = uniqueName, FriendlyName = friendlyName
            };

            return(Update(options, client));
        }
示例#5
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update RatePlan parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RatePlan </returns>
        public static async System.Threading.Tasks.Task <RatePlanResource> UpdateAsync(UpdateRatePlanOptions options,
                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }