Class CredentialUpdater

    • 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. For example, `-----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. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`.
        Parameters:
        privateKey - [APN only] The 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 API key for the project that was obtained from the Google Developer console for your GCM Service application credential..
        Parameters:
        apiKey - [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
        Returns:
        this
      • setSecret

        public CredentialUpdater setSecret​(String secret)
        [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging..
        Parameters:
        secret - [FCM only] The Server key of your project from Firebase console
        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