Class Webhook
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.messaging.v1.session.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Webhook.Method
static class
Webhook.Target
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebhookCreator
creator(String pathSessionSid, Webhook.Target target)
Create a WebhookCreator to execute create.static WebhookDeleter
deleter(String pathSessionSid, String pathSid)
Create a WebhookDeleter to execute delete.boolean
equals(Object o)
static WebhookFetcher
fetcher(String pathSessionSid, 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 unique id of the Account responsible for this session..Map<String,Object>
getConfiguration()
Returns The The configuration of this webhook..org.joda.time.DateTime
getDateCreated()
Returns The The date that this resource was created..org.joda.time.DateTime
getDateUpdated()
Returns The The date that this resource was last updated..String
getSessionSid()
Returns The The unique id of the Session for this webhook..String
getSid()
Returns The A 34 character string that uniquely identifies this resource..String
getTarget()
Returns The The target of this webhook..URI
getUrl()
Returns The An absolute URL for this webhook..int
hashCode()
static WebhookReader
reader(String pathSessionSid)
Create a WebhookReader to execute read.String
toString()
static WebhookUpdater
updater(String pathSessionSid, String pathSid)
Create a WebhookUpdater to execute update.
-
-
-
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 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
-
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.
-
-