Class Webhook
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.ipmessaging.v2.service.channel.Webhook
-
- All Implemented Interfaces:
Serializable
public class Webhook extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Webhook.Method
static class
Webhook.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebhookCreator
creator(String pathServiceSid, String pathChannelSid, Webhook.Type type)
Create a WebhookCreator to execute create.static WebhookDeleter
deleter(String pathServiceSid, String pathChannelSid, String pathSid)
Create a WebhookDeleter to execute delete.boolean
equals(Object o)
static WebhookFetcher
fetcher(String pathServiceSid, String pathChannelSid, 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
getChannelSid()
Returns The The SID of the Channel the ChannelWebhook resource belongs to.Map<String,Object>
getConfiguration()
Returns The The JSON string that describes the configuration object for the channel webhook.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
getServiceSid()
Returns The The SID of the Service that the resource is associated with.String
getSid()
Returns The The unique string that identifies the resource.String
getType()
Returns The The type of webhook.URI
getUrl()
Returns The The absolute URL of the resource.int
hashCode()
static WebhookReader
reader(String pathServiceSid, String pathChannelSid)
Create a WebhookReader to execute read.String
toString()
static WebhookUpdater
updater(String pathServiceSid, String pathChannelSid, String pathSid)
Create a WebhookUpdater to execute update.
-
-
-
Method Detail
-
reader
public static WebhookReader reader(String pathServiceSid, String pathChannelSid)
Create a WebhookReader to execute read.- Parameters:
pathServiceSid
- The SID of the Service to read the resources frompathChannelSid
- The SID of the Channel the resources to read belong to- Returns:
- WebhookReader capable of executing the read
-
fetcher
public static WebhookFetcher fetcher(String pathServiceSid, String pathChannelSid, String pathSid)
Create a WebhookFetcher to execute fetch.- Parameters:
pathServiceSid
- The SID of the Service to fetch the resource frompathChannelSid
- The SID of the Channel the resource to fetch belongs topathSid
- The unique string that identifies the resource- Returns:
- WebhookFetcher capable of executing the fetch
-
creator
public static WebhookCreator creator(String pathServiceSid, String pathChannelSid, Webhook.Type type)
Create a WebhookCreator to execute create.- Parameters:
pathServiceSid
- The SID of the Service to create the resource underpathChannelSid
- The SID of the Channel the new resource belongs totype
- The type of webhook- Returns:
- WebhookCreator capable of executing the create
-
updater
public static WebhookUpdater updater(String pathServiceSid, String pathChannelSid, String pathSid)
Create a WebhookUpdater to execute update.- Parameters:
pathServiceSid
- The SID of the Service to update the resource frompathChannelSid
- The SID of the Channel the resource to update belongs topathSid
- The unique string that identifies the resource- Returns:
- WebhookUpdater capable of executing the update
-
deleter
public static WebhookDeleter deleter(String pathServiceSid, String pathChannelSid, String pathSid)
Create a WebhookDeleter to execute delete.- Parameters:
pathServiceSid
- The SID of the Service to delete the resource frompathChannelSid
- The SID of the channel the resource to delete belongs topathSid
- The unique string that identifies the 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 The unique string that identifies the resource.- Returns:
- The unique string that identifies the 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
-
getServiceSid
public final String getServiceSid()
Returns The The SID of the Service that the resource is associated with.- Returns:
- The SID of the Service that the resource is associated with
-
getChannelSid
public final String getChannelSid()
Returns The The SID of the Channel the ChannelWebhook resource belongs to.- Returns:
- The SID of the Channel the ChannelWebhook resource belongs to
-
getType
public final String getType()
Returns The The type of webhook.- Returns:
- The type of webhook
-
getUrl
public final URI getUrl()
Returns The The absolute URL of the resource.- Returns:
- The absolute URL of the resource
-
getConfiguration
public final Map<String,Object> getConfiguration()
Returns The The JSON string that describes the configuration object for the channel webhook.- Returns:
- The JSON string that describes the configuration object for the channel webhook
-
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
-
-