/// <summary> /// update /// </summary> /// <param name="pathServiceSid"> The SID of the Service with the Channel that has the Webhook resource to update /// </param> /// <param name="pathChannelSid"> The SID of the Channel the resource to update belongs to </param> /// <param name="pathSid"> The SID of the resource </param> /// <param name="configurationUrl"> The URL of the webhook to call </param> /// <param name="configurationMethod"> The HTTP method used to call `configuration.url` </param> /// <param name="configurationFilters"> The events that cause us to call the Channel Webhook </param> /// <param name="configurationTriggers"> A string that will cause us to call the webhook when it is found in a message /// body </param> /// <param name="configurationFlowSid"> The SID of the Studio Flow to call when an event occurs </param> /// <param name="configurationRetryCount"> The number of times to retry the webhook if the first attempt fails </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Webhook </returns> public static async System.Threading.Tasks.Task <WebhookResource> UpdateAsync(string pathServiceSid, string pathChannelSid, string pathSid, string configurationUrl = null, WebhookResource.MethodEnum configurationMethod = null, List <string> configurationFilters = null, List <string> configurationTriggers = null, string configurationFlowSid = null, int?configurationRetryCount = null, ITwilioRestClient client = null) { var options = new UpdateWebhookOptions(pathServiceSid, pathChannelSid, pathSid) { ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount }; return(await UpdateAsync(options, client)); }
/// <summary> /// update /// </summary> /// <param name="options"> Update Webhook parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Webhook </returns> public static async System.Threading.Tasks.Task <WebhookResource> UpdateAsync(UpdateWebhookOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }