/// <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)); }
/// <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)); }
/// <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)); }
private static Request BuildUpdateRequest(UpdateRatePlanOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Wireless, "/v1/RatePlans/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <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)); }