/// <summary> /// Update a specific Service. /// </summary> /// <param name="options"> Update Service parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Service </returns> public static ServiceResource Update(UpdateServiceOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Update a specific Service. /// </summary> /// <param name="pathSid"> A string that uniquely identifies this Service. </param> /// <param name="friendlyName"> A human readable description of this resource. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Service </returns> public static ServiceResource Update(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateServiceOptions(pathSid) { FriendlyName = friendlyName }; return(Update(options, client)); }
private static Request BuildUpdateRequest(UpdateServiceOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Preview, "/Authy/Services/" + options.PathSid + "", client.Region, postParams: options.GetParams() )); }
/// <summary> /// Update a specific Service. /// </summary> /// <param name="pathSid"> A string that uniquely identifies this Service. </param> /// <param name="friendlyName"> A human readable description of this resource. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Service </returns> public static async System.Threading.Tasks.Task <ServiceResource> UpdateAsync(string pathSid, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateServiceOptions(pathSid) { FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update a specific Service. /// </summary> /// <param name="options"> Update Service parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Service </returns> public static async System.Threading.Tasks.Task <ServiceResource> UpdateAsync(UpdateServiceOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }