Class Webhook

  • All Implemented Interfaces:
    Serializable

    public class Webhook
    extends Resource
    PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
    See Also:
    Serialized Form
    • Method Detail

      • fetcher

        public static WebhookFetcher fetcher​(String pathAssistantSid,
                                             String pathSid)
        Create a WebhookFetcher to execute fetch.
        Parameters:
        pathAssistantSid - The SID of the Assistant that is the parent of the resource to fetch
        pathSid - The unique string that identifies the resource to fetch
        Returns:
        WebhookFetcher capable of executing the fetch
      • reader

        public static WebhookReader reader​(String pathAssistantSid)
        Create a WebhookReader to execute read.
        Parameters:
        pathAssistantSid - The SID of the Assistant that is the parent of the resources to read
        Returns:
        WebhookReader capable of executing the read
      • creator

        public static WebhookCreator creator​(String pathAssistantSid,
                                             String uniqueName,
                                             String events,
                                             URI webhookUrl)
        Create a WebhookCreator to execute create.
        Parameters:
        pathAssistantSid - The SID of the Assistant that is the parent of the new resource
        uniqueName - An application-defined string that uniquely identifies the resource
        events - The list of space-separated events that this Webhook will subscribe to.
        webhookUrl - The URL associated with this Webhook.
        Returns:
        WebhookCreator capable of executing the create
      • updater

        public static WebhookUpdater updater​(String pathAssistantSid,
                                             String pathSid)
        Create a WebhookUpdater to execute update.
        Parameters:
        pathAssistantSid - The SID of the Assistant that is the parent of the resource to update
        pathSid - The unique string that identifies the resource
        Returns:
        WebhookUpdater capable of executing the update
      • deleter

        public static WebhookDeleter deleter​(String pathAssistantSid,
                                             String pathSid)
        Create a WebhookDeleter to execute delete.
        Parameters:
        pathAssistantSid - The SID of the Assistant that is the parent of the resources to delete
        pathSid - The unique string that identifies the resource to delete
        Returns:
        WebhookDeleter capable of executing the delete
      • fromJson

        public static Webhook fromJson​(String json,
                                       com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON String into a Webhook object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON String
        objectMapper - Jackson ObjectMapper
        Returns:
        Webhook object represented by the provided JSON
      • fromJson

        public static Webhook fromJson​(InputStream json,
                                       com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON InputStream into a Webhook object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON InputStream
        objectMapper - Jackson ObjectMapper
        Returns:
        Webhook object represented by the provided JSON
      • getUrl

        public final URI getUrl()
        Returns The The absolute URL of the Webhook resource.
        Returns:
        The absolute URL of the Webhook resource
      • getAccountSid

        public final String getAccountSid()
        Returns The The SID of the Account that created the resource.
        Returns:
        The SID of the Account that created the resource
      • getDateCreated

        public final org.joda.time.DateTime getDateCreated()
        Returns The The RFC 2822 date and time in GMT when the resource was created.
        Returns:
        The RFC 2822 date and time in GMT when the resource was created
      • getDateUpdated

        public final org.joda.time.DateTime getDateUpdated()
        Returns The The RFC 2822 date and time in GMT when the resource was last updated.
        Returns:
        The RFC 2822 date and time in GMT when the resource was last updated
      • getAssistantSid

        public final String getAssistantSid()
        Returns The The SID of the Assistant that is the parent of the resource.
        Returns:
        The SID of the Assistant that is the parent of the resource
      • getSid

        public final String getSid()
        Returns The The unique string that identifies the resource.
        Returns:
        The unique string that identifies the resource
      • getUniqueName

        public final String getUniqueName()
        Returns The An application-defined string that uniquely identifies the resource.
        Returns:
        An application-defined string that uniquely identifies the resource
      • getEvents

        public final String getEvents()
        Returns The The list of space-separated events that this Webhook is subscribed to..
        Returns:
        The list of space-separated events that this Webhook is subscribed to.
      • getWebhookUrl

        public final URI getWebhookUrl()
        Returns The The URL associated with this Webhook..
        Returns:
        The URL associated with this Webhook.
      • getWebhookMethod

        public final String getWebhookMethod()
        Returns The The method used when calling the webhook's URL..
        Returns:
        The method used when calling the webhook's URL.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object