new CredentialInstance(version, payload, sid)
Initialize the CredentialContext
Parameters:
Name | Type | Description |
---|---|---|
version |
V1 | Version of the resource |
payload |
CredentialPayload | The instance payload |
sid |
sid | The unique string that identifies the resource |
Properties:
Name | Type | Description |
---|---|---|
sid |
string | The unique string that identifies the resource |
accountSid |
string | The SID of the Account that created the resource |
friendlyName |
string | The string that you assigned to describe the resource |
type |
credential.push_service | The type of push-notification service the credential is for |
sandbox |
string | [APN only] Whether to send the credential to sandbox APNs |
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 |
url |
string | The absolute URL of the Credential resource |
- Source:
Methods
fetch(callbackopt) → {Promise}
fetch a CredentialInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
- Source:
Returns:
Resolves to processed CredentialInstance
- Type
- Promise
remove(callbackopt) → {Promise}
remove a CredentialInstance
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
Callback to handle processed record |
- Source:
Returns:
Resolves to processed CredentialInstance
- Type
- Promise
toJSON()
Provide a user-friendly representation
- Source:
Returns:
Object
update(optsopt, callbackopt) → {Promise}
update a CredentialInstance
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||||||||||||||||||
callback |
function |
<optional> |
Callback to handle processed record |
- Source:
Returns:
Resolves to processed CredentialInstance
- Type
- Promise