Class WebhookUpdater

    • Constructor Detail

      • WebhookUpdater

        public WebhookUpdater​(String pathServiceSid,
                              String pathChannelSid,
                              String pathSid)
        Construct a new WebhookUpdater.
        Parameters:
        pathServiceSid - The SID of the Service with the Channel that has the Webhook resource to update
        pathChannelSid - The SID of the Channel the resource to update belongs to
        pathSid - The SID of the resource
    • Method Detail

      • setConfigurationUrl

        public WebhookUpdater setConfigurationUrl​(String configurationUrl)
        The URL of the webhook to call using the `configuration.method`..
        Parameters:
        configurationUrl - The URL of the webhook to call
        Returns:
        this
      • setConfigurationMethod

        public WebhookUpdater setConfigurationMethod​(Webhook.Method configurationMethod)
        The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`..
        Parameters:
        configurationMethod - The HTTP method used to call `configuration.url`
        Returns:
        this
      • setConfigurationFilters

        public WebhookUpdater setConfigurationFilters​(List<String> configurationFilters)
        The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger)..
        Parameters:
        configurationFilters - The events that cause us to call the Channel Webhook
        Returns:
        this
      • setConfigurationFilters

        public WebhookUpdater setConfigurationFilters​(String configurationFilters)
        The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger)..
        Parameters:
        configurationFilters - The events that cause us to call the Channel Webhook
        Returns:
        this
      • setConfigurationTriggers

        public WebhookUpdater setConfigurationTriggers​(List<String> configurationTriggers)
        A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`..
        Parameters:
        configurationTriggers - A string that will cause us to call the webhook when it is found in a message body
        Returns:
        this
      • setConfigurationTriggers

        public WebhookUpdater setConfigurationTriggers​(String configurationTriggers)
        A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`..
        Parameters:
        configurationTriggers - A string that will cause us to call the webhook when it is found in a message body
        Returns:
        this
      • setConfigurationFlowSid

        public WebhookUpdater setConfigurationFlowSid​(String configurationFlowSid)
        The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`..
        Parameters:
        configurationFlowSid - The SID of the Studio Flow to call when an event occurs
        Returns:
        this
      • setConfigurationRetryCount

        public WebhookUpdater setConfigurationRetryCount​(Integer configurationRetryCount)
        The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0..
        Parameters:
        configurationRetryCount - The number of times to retry the webhook if the first attempt fails
        Returns:
        this
      • update

        public Webhook update​(TwilioRestClient client)
        Make the request to the Twilio API to perform the update.
        Specified by:
        update in class Updater<Webhook>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Updated Webhook