/// <summary> /// Update an existing conversation-scoped webhook /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param> /// <param name="pathConversationSid"> The unique ID of the Conversation for this webhook. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="configurationUrl"> The absolute url the webhook request should be sent to. </param> /// <param name="configurationMethod"> The HTTP method to be used when sending a webhook request. </param> /// <param name="configurationFilters"> The list of events, firing webhook event for this Conversation. </param> /// <param name="configurationTriggers"> The list of keywords, firing webhook event for this Conversation. </param> /// <param name="configurationFlowSid"> The studio flow SID, where the webhook should be sent to. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Webhook </returns> public static WebhookResource Update(string pathChatServiceSid, string pathConversationSid, string pathSid, string configurationUrl = null, WebhookResource.MethodEnum configurationMethod = null, List <string> configurationFilters = null, List <string> configurationTriggers = null, string configurationFlowSid = null, ITwilioRestClient client = null) { var options = new UpdateWebhookOptions(pathChatServiceSid, pathConversationSid, pathSid) { ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid }; return(Update(options, client)); }
/// <summary> /// Update an existing conversation-scoped webhook /// </summary> /// <param name="pathChatServiceSid"> The SID of the Conversation Service that the resource is associated with. </param> /// <param name="pathConversationSid"> The unique ID of the Conversation for this webhook. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="configurationUrl"> The absolute url the webhook request should be sent to. </param> /// <param name="configurationMethod"> The HTTP method to be used when sending a webhook request. </param> /// <param name="configurationFilters"> The list of events, firing webhook event for this Conversation. </param> /// <param name="configurationTriggers"> The list of keywords, firing webhook event for this Conversation. </param> /// <param name="configurationFlowSid"> The studio flow SID, where the webhook should be sent to. </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 pathChatServiceSid, string pathConversationSid, string pathSid, string configurationUrl = null, WebhookResource.MethodEnum configurationMethod = null, List <string> configurationFilters = null, List <string> configurationTriggers = null, string configurationFlowSid = null, ITwilioRestClient client = null) { var options = new UpdateWebhookOptions(pathChatServiceSid, pathConversationSid, pathSid) { ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update an existing conversation-scoped webhook /// </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)); }