new WorkerChannelInstance(version, payload, workspaceSid, workerSid, sid)
Initialize the WorkerChannelContext
Parameters:
Name | Type | Description |
---|---|---|
version |
V1 | Version of the resource |
payload |
WorkerChannelPayload | The instance payload |
workspaceSid |
sid | The SID of the Workspace that contains the WorkerChannel |
workerSid |
sid | The SID of the Worker that contains the WorkerChannel |
sid |
sid_like | The SID of the to fetch |
Properties:
Name | Type | Description |
---|---|---|
accountSid |
string | The SID of the Account that created the resource |
assignedTasks |
number | The total number of Tasks assigned to Worker for the TaskChannel type |
available |
boolean | Whether the Worker should receive Tasks of the TaskChannel type |
availableCapacityPercentage |
number | The current available capacity between 0 to 100 for the TaskChannel |
configuredCapacity |
number | The current configured capacity for the WorkerChannel |
dateCreated |
Date | The RFC 2822 date and time in GMT when the resource was created |
dateUpdated |
Date | The RFC 2822 date and time in GMT when the resource was last updated |
sid |
string | The unique string that identifies the resource |
taskChannelSid |
string | The SID of the TaskChannel |
taskChannelUniqueName |
string | The unique name of the TaskChannel, such as 'voice' or 'sms' |
workerSid |
string | The SID of the Worker that contains the WorkerChannel |
workspaceSid |
string | The SID of the Workspace that contains the WorkerChannel |
url |
string | The absolute URL of the WorkerChannel resource |
Methods
fetch(callbackopt) → {Promise}
fetch a WorkerChannelInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed WorkerChannelInstance
- Type
- Promise
toJSON()
Provide a user-friendly representation
Returns:
Object
update(optsopt, callbackopt) → {Promise}
update a WorkerChannelInstance
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||
callback |
function |
<optional> |
Callback to handle processed record |
Returns:
Resolves to processed WorkerChannelInstance
- Type
- Promise