Class Webhook
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.autopilot.v1.assistant.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebhookCreator
creator(String pathAssistantSid, String uniqueName, String events, URI webhookUrl)
Create a WebhookCreator to execute create.static WebhookDeleter
deleter(String pathAssistantSid, String pathSid)
Create a WebhookDeleter to execute delete.boolean
equals(Object o)
static WebhookFetcher
fetcher(String pathAssistantSid, String pathSid)
Create a WebhookFetcher to execute fetch.static Webhook
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Webhook object using the provided ObjectMapper.static Webhook
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Webhook object using the provided ObjectMapper.String
getAccountSid()
Returns The The SID of the Account that created the resource.String
getAssistantSid()
Returns The The SID of the Assistant that is the parent of the resource.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.String
getEvents()
Returns The The list of space-separated events that this Webhook is subscribed to..String
getSid()
Returns The The unique string that identifies the resource.String
getUniqueName()
Returns The An application-defined string that uniquely identifies the resource.URI
getUrl()
Returns The The absolute URL of the Webhook resource.String
getWebhookMethod()
Returns The The method used when calling the webhook's URL..URI
getWebhookUrl()
Returns The The URL associated with this Webhook..int
hashCode()
static WebhookReader
reader(String pathAssistantSid)
Create a WebhookReader to execute read.String
toString()
static WebhookUpdater
updater(String pathAssistantSid, String pathSid)
Create a WebhookUpdater to execute update.
-
-
-
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 fetchpathSid
- 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 resourceuniqueName
- An application-defined string that uniquely identifies the resourceevents
- 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 updatepathSid
- 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 deletepathSid
- 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 StringobjectMapper
- 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 InputStreamobjectMapper
- 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.
-
-