new WebhookInstance(version, payload, serviceSid, channelSid, sid)
Initialize the WebhookContext
Parameters:
Name | Type | Description |
---|---|---|
version |
V2 | Version of the resource |
payload |
WebhookPayload | The instance payload |
serviceSid |
sid | The service_sid |
channelSid |
sid | The channel_sid |
sid |
sid | The sid |
Properties:
Name | Type | Description |
---|---|---|
sid |
string | The sid |
accountSid |
string | The account_sid |
serviceSid |
string | The service_sid |
channelSid |
string | The channel_sid |
type |
string | The type |
url |
string | The url |
configuration |
object | The configuration |
dateCreated |
Date | The date_created |
dateUpdated |
Date | The date_updated |
Methods
fetch(callbackopt) → {Promise}
fetch a WebhookInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed WebhookInstance
- Type
- Promise
remove(callbackopt) → {Promise}
remove a WebhookInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed WebhookInstance
- Type
- Promise
toJSON()
Provide a user-friendly representation
Returns:
Object
update(optsopt, callbackopt) → {Promise}
update a WebhookInstance
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||||||||||||||||||
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed WebhookInstance
- Type
- Promise