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

      • reader

        public static WebhookReader reader​(String pathSessionSid)
        Create a WebhookReader to execute read.
        Parameters:
        pathSessionSid - The unique id of the Session for this webhook.
        Returns:
        WebhookReader capable of executing the read
      • fetcher

        public static WebhookFetcher fetcher​(String pathSessionSid,
                                             String pathSid)
        Create a WebhookFetcher to execute fetch.
        Parameters:
        pathSessionSid - The unique id of the Session for this webhook.
        pathSid - A 34 character string that uniquely identifies this resource.
        Returns:
        WebhookFetcher capable of executing the fetch
      • creator

        public static WebhookCreator creator​(String pathSessionSid,
                                             Webhook.Target target)
        Create a WebhookCreator to execute create.
        Parameters:
        pathSessionSid - The unique id of the Session for this webhook.
        target - The target of this webhook.
        Returns:
        WebhookCreator capable of executing the create
      • updater

        public static WebhookUpdater updater​(String pathSessionSid,
                                             String pathSid)
        Create a WebhookUpdater to execute update.
        Parameters:
        pathSessionSid - The unique id of the Session for this webhook.
        pathSid - A 34 character string that uniquely identifies this resource.
        Returns:
        WebhookUpdater capable of executing the update
      • deleter

        public static WebhookDeleter deleter​(String pathSessionSid,
                                             String pathSid)
        Create a WebhookDeleter to execute delete.
        Parameters:
        pathSessionSid - The unique id of the Session for this webhook.
        pathSid - A 34 character string that uniquely identifies this resource.
        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
      • getSid

        public final String getSid()
        Returns The A 34 character string that uniquely identifies this resource..
        Returns:
        A 34 character string that uniquely identifies this resource.
      • getAccountSid

        public final String getAccountSid()
        Returns The The unique id of the Account responsible for this session..
        Returns:
        The unique id of the Account responsible for this session.
      • getSessionSid

        public final String getSessionSid()
        Returns The The unique id of the Session for this webhook..
        Returns:
        The unique id of the Session for this webhook.
      • getTarget

        public final String getTarget()
        Returns The The target of this webhook..
        Returns:
        The target of this webhook.
      • getUrl

        public final URI getUrl()
        Returns The An absolute URL for this webhook..
        Returns:
        An absolute URL for this webhook.
      • getConfiguration

        public final Map<String,​Object> getConfiguration()
        Returns The The configuration of this webhook..
        Returns:
        The configuration of this webhook.
      • getDateCreated

        public final org.joda.time.DateTime getDateCreated()
        Returns The The date that this resource was created..
        Returns:
        The date that this resource was created.
      • getDateUpdated

        public final org.joda.time.DateTime getDateUpdated()
        Returns The The date that this resource was last updated..
        Returns:
        The date that this resource was last updated.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object