Package com.twilio.rest.notify.v1
Class CredentialUpdater
- java.lang.Object
-
- com.twilio.base.Updater<Credential>
-
- com.twilio.rest.notify.v1.CredentialUpdater
-
public class CredentialUpdater extends Updater<Credential>
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
-
Constructor Summary
Constructors Constructor Description CredentialUpdater(String pathSid)
Construct a new CredentialUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialUpdater
setApiKey(String apiKey)
[GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging..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 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 Firebase console under Settings / Cloud messaging..Credential
update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.-
Methods inherited from class com.twilio.base.Updater
update, updateAsync, updateAsync
-
-
-
-
Constructor Detail
-
CredentialUpdater
public CredentialUpdater(String pathSid)
Construct a new CredentialUpdater.- Parameters:
pathSid
- The unique string that identifies the resource
-
-
Method Detail
-
setFriendlyName
public CredentialUpdater setFriendlyName(String friendlyName)
A descriptive string that you create to describe the resource. It can be up to 64 characters long..- Parameters:
friendlyName
- A string to describe the resource- Returns:
- this
-
setCertificate
public CredentialUpdater setCertificate(String certificate)
[APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`.- Parameters:
certificate
- [APN only] The URL-encoded representation of the certificate- Returns:
- this
-
setPrivateKey
public CredentialUpdater setPrivateKey(String privateKey)
[APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`.- Parameters:
privateKey
- [APN only] URL-encoded representation of the private key- Returns:
- this
-
setSandbox
public CredentialUpdater setSandbox(Boolean sandbox)
[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production..- Parameters:
sandbox
- [APN only] Whether to send the credential to sandbox APNs- Returns:
- this
-
setApiKey
public CredentialUpdater setApiKey(String apiKey)
[GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging..- Parameters:
apiKey
- [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging- Returns:
- this
-
setSecret
public CredentialUpdater setSecret(String secret)
[FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging..- Parameters:
secret
- [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging- Returns:
- this
-
update
public Credential update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.- Specified by:
update
in classUpdater<Credential>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Updated Credential
-
-