/// <summary> /// Update a specific Service resource. /// </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)); }
private static Request BuildUpdateRequest(UpdateServiceOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Serverless, "/v1/Services/" + options.PathSid + "", postParams: options.GetParams() )); }
/// <summary> /// Update a specific Service resource. /// </summary> /// <param name="pathSid"> The SID of the Service resource to update </param> /// <param name="includeCredentials"> Whether to inject Account credentials into a function invocation context </param> /// <param name="friendlyName"> A string to describe the Service 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, bool?includeCredentials = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateServiceOptions(pathSid) { IncludeCredentials = includeCredentials, FriendlyName = friendlyName }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update a specific Service resource. /// </summary> /// <param name="pathSid"> The SID of the Service resource to update </param> /// <param name="includeCredentials"> Whether to inject Account credentials into a function invocation context </param> /// <param name="friendlyName"> A string to describe the Service 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, bool?includeCredentials = null, string friendlyName = null, ITwilioRestClient client = null) { var options = new UpdateServiceOptions(pathSid) { IncludeCredentials = includeCredentials, FriendlyName = friendlyName }; return(Update(options, client)); }
/// <summary> /// Update a specific Service resource. /// </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)); }