Class 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 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 class Updater<Credential>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Updated Credential