Class Webhook.Request

  • Enclosing class:
    Webhook

    public static final class Webhook.Request
    extends Object
    • Method Detail

      • toJson

        public String toJson()
      • url

        public Webhook.Request url​(String url)
        The url to listen to notifications (must be HTTPS)
        Parameters:
        url - The url to listen to notifications (must be HTTPS)
        Returns:
        The Webhook request object.
      • enabled

        public Webhook.Request enabled​(Boolean enabled)
        Determines if the webhook should be active. If omitted, will be set to true by default
        Parameters:
        enabled - Determines if the webhook should be active. If omitted, will be set to true by default
        Returns:
        The Webhook request object.
      • events

        public Webhook.Request events​(List<String> events)
        The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
        Parameters:
        events - The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
        Returns:
        The Webhook request object.
      • events

        public Webhook.Request events​(String... events)
        The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
        Parameters:
        events - The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
        Returns:
        The Webhook request object
      • environment

        public Webhook.Request environment​(List<String> environment)
        The environment to be used
        Parameters:
        environment - The environment to be used
        Returns:
        The Webhook request object.
      • environment

        public Webhook.Request environment​(String... environment)
        The environment to be used
        Parameters:
        environment - The environment to be used
        Returns:
        The Webhook request object
      • getUrl

        public String getUrl()
        The url to listen to notifications (must be HTTPS)
        Returns:
        The url to listen to notifications (must be HTTPS)
      • getEnabled

        public Boolean getEnabled()
        Determines if the webhook should be active. If omitted, will be set to true by default
        Returns:
        Determines if the webhook should be active. If omitted, will be set to true by default
      • getEvents

        public String[] getEvents()
        The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
        Returns:
        The events that should be published to the webhook. If omitted, all events will be subscribed by default. You can read about the supported events
      • getEnvironment

        public String[] getEnvironment()
        The environment to be used
        Returns:
        The environment to be used