new MessageContext(version, serviceSid, channelSid, sid)
Initialize the MessageContext
Parameters:
Name | Type | Description |
---|---|---|
version |
V2 | Version of the resource |
serviceSid |
sid | The SID of the Service to fetch the resource from |
channelSid |
sid_like | The SID of the Channel the message to fetch belongs to |
sid |
sid | The SID of the Message resource to fetch |
Methods
fetch(callbackopt) → {Promise}
fetch a MessageInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed MessageInstance
- Type
- Promise
remove(optsopt, callbackopt) → {Promise}
remove a MessageInstance
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed MessageInstance
- Type
- Promise
toJSON()
Provide a user-friendly representation
Returns:
Object
update(optsopt, callbackopt) → {Promise}
update a MessageInstance
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||||||||||||||||||||||
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed MessageInstance
- Type
- Promise