public class CredentialUpdater extends Updater<Credential>
Constructor and Description |
---|
CredentialUpdater(String pathSid)
Construct a new CredentialUpdater.
|
Modifier and Type | Method and Description |
---|---|
CredentialUpdater |
setApiKey(String apiKey)
[GCM only] The API key for the project that was obtained from the Google
Developer console for your GCM Service application credential..
|
CredentialUpdater |
setCertificate(String certificate)
[APN only] The URL encoded representation of the certificate.
|
CredentialUpdater |
setFriendlyName(String friendlyName)
A descriptive string that you create to describe the new resource.
|
CredentialUpdater |
setPrivateKey(String privateKey)
[APN only] The URL encoded representation of the private key.
|
CredentialUpdater |
setSandbox(Boolean sandbox)
[APN only] Whether to send the credential to sandbox APNs.
|
CredentialUpdater |
setSecret(String secret)
[FCM only] The **Server key** of your project from the Firebase console,
found under Settings / Cloud messaging..
|
CredentialUpdater |
setType(Credential.PushType type)
The type of push-notification service the credential is for.
|
Credential |
update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.
|
update, updateAsync, updateAsync
public CredentialUpdater(String pathSid)
pathSid
- A 34 character string that uniquely identifies this resource.public CredentialUpdater setType(Credential.PushType type)
type
- The type of push-notification service the credential is for.public CredentialUpdater setFriendlyName(String friendlyName)
friendlyName
- A string to describe the resourcepublic CredentialUpdater setCertificate(String certificate)
certificate
- [APN only] The URL encoded representation of the
certificate.public CredentialUpdater setPrivateKey(String privateKey)
privateKey
- [APN only] The URL encoded representation of the private
key.public CredentialUpdater setSandbox(Boolean sandbox)
sandbox
- [APN only] Whether to send the credential to sandbox APNs.public CredentialUpdater setApiKey(String apiKey)
apiKey
- [GCM only] The API key for the project that was obtained from
the Google Developer console for your GCM Service application
credential.public CredentialUpdater setSecret(String secret)
secret
- [FCM only] The Server key of your project from Firebase
console.public Credential update(TwilioRestClient client)
update
in class Updater<Credential>
client
- TwilioRestClient with which to make the requestCopyright © 2019 Twilio, Inc. All Rights Reserved.