Class Webhook


  • public class Webhook
    extends Object
    Webhook
    • Constructor Detail

      • Webhook

        public Webhook()
    • Method Detail

      • getLinks

        public WebhookLinks getLinks()
        Get links
        Returns:
        links
      • setLinks

        public void setLinks​(WebhookLinks links)
        links
        Parameters:
        links -
      • acceptsExpiredCertificate

        public Webhook acceptsExpiredCertificate​(Boolean acceptsExpiredCertificate)
      • getAcceptsExpiredCertificate

        public Boolean getAcceptsExpiredCertificate()
        Indicates if expired SSL certificates are accepted. Default value: **false**.
        Returns:
        acceptsExpiredCertificate
      • setAcceptsExpiredCertificate

        public void setAcceptsExpiredCertificate​(Boolean acceptsExpiredCertificate)
        Indicates if expired SSL certificates are accepted. Default value: **false**.
        Parameters:
        acceptsExpiredCertificate -
      • acceptsSelfSignedCertificate

        public Webhook acceptsSelfSignedCertificate​(Boolean acceptsSelfSignedCertificate)
      • getAcceptsSelfSignedCertificate

        public Boolean getAcceptsSelfSignedCertificate()
        Indicates if self-signed SSL certificates are accepted. Default value: **false**.
        Returns:
        acceptsSelfSignedCertificate
      • setAcceptsSelfSignedCertificate

        public void setAcceptsSelfSignedCertificate​(Boolean acceptsSelfSignedCertificate)
        Indicates if self-signed SSL certificates are accepted. Default value: **false**.
        Parameters:
        acceptsSelfSignedCertificate -
      • acceptsUntrustedRootCertificate

        public Webhook acceptsUntrustedRootCertificate​(Boolean acceptsUntrustedRootCertificate)
      • getAcceptsUntrustedRootCertificate

        public Boolean getAcceptsUntrustedRootCertificate()
        Indicates if untrusted SSL certificates are accepted. Default value: **false**.
        Returns:
        acceptsUntrustedRootCertificate
      • setAcceptsUntrustedRootCertificate

        public void setAcceptsUntrustedRootCertificate​(Boolean acceptsUntrustedRootCertificate)
        Indicates if untrusted SSL certificates are accepted. Default value: **false**.
        Parameters:
        acceptsUntrustedRootCertificate -
      • accountReference

        public Webhook accountReference​(String accountReference)
      • getAccountReference

        public String getAccountReference()
        Reference to the account the webook is set on.
        Returns:
        accountReference
      • setAccountReference

        public void setAccountReference​(String accountReference)
        Reference to the account the webook is set on.
        Parameters:
        accountReference -
      • getActive

        public Boolean getActive()
        Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account.
        Returns:
        active
      • setActive

        public void setActive​(Boolean active)
        Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account.
        Parameters:
        active -
      • getAdditionalSettings

        public AdditionalSettingsResponse getAdditionalSettings()
        Get additionalSettings
        Returns:
        additionalSettings
      • setAdditionalSettings

        public void setAdditionalSettings​(AdditionalSettingsResponse additionalSettings)
        additionalSettings
        Parameters:
        additionalSettings -
      • certificateAlias

        public Webhook certificateAlias​(String certificateAlias)
      • getCertificateAlias

        public String getCertificateAlias()
        The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias.
        Returns:
        certificateAlias
      • setCertificateAlias

        public void setCertificateAlias​(String certificateAlias)
        The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias.
        Parameters:
        certificateAlias -
      • getCommunicationFormat

        public Webhook.CommunicationFormatEnum getCommunicationFormat()
        Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json**
        Returns:
        communicationFormat
      • setCommunicationFormat

        public void setCommunicationFormat​(Webhook.CommunicationFormatEnum communicationFormat)
        Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json**
        Parameters:
        communicationFormat -
      • description

        public Webhook description​(String description)
      • getDescription

        public String getDescription()
        Your description for this webhook configuration.
        Returns:
        description
      • setDescription

        public void setDescription​(String description)
        Your description for this webhook configuration.
        Parameters:
        description -
      • getEncryptionProtocol

        public Webhook.EncryptionProtocolEnum getEncryptionProtocol()
        SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.
        Returns:
        encryptionProtocol
      • setEncryptionProtocol

        public void setEncryptionProtocol​(Webhook.EncryptionProtocolEnum encryptionProtocol)
        SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.
        Parameters:
        encryptionProtocol -
      • getFilterMerchantAccountType

        public Webhook.FilterMerchantAccountTypeEnum getFilterMerchantAccountType()
        Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`.
        Returns:
        filterMerchantAccountType
      • setFilterMerchantAccountType

        public void setFilterMerchantAccountType​(Webhook.FilterMerchantAccountTypeEnum filterMerchantAccountType)
        Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`.
        Parameters:
        filterMerchantAccountType -
      • filterMerchantAccounts

        public Webhook filterMerchantAccounts​(List<String> filterMerchantAccounts)
      • addFilterMerchantAccountsItem

        public Webhook addFilterMerchantAccountsItem​(String filterMerchantAccountsItem)
      • getFilterMerchantAccounts

        public List<String> getFilterMerchantAccounts()
        A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**.
        Returns:
        filterMerchantAccounts
      • setFilterMerchantAccounts

        public void setFilterMerchantAccounts​(List<String> filterMerchantAccounts)
        A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**.
        Parameters:
        filterMerchantAccounts -
      • getHasError

        public Boolean getHasError()
        Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test).
        Returns:
        hasError
      • setHasError

        public void setHasError​(Boolean hasError)
        Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test).
        Parameters:
        hasError -
      • getHasPassword

        public Boolean getHasPassword()
        Indicates if the webhook is password protected.
        Returns:
        hasPassword
      • setHasPassword

        public void setHasPassword​(Boolean hasPassword)
        Indicates if the webhook is password protected.
        Parameters:
        hasPassword -
      • hmacKeyCheckValue

        public Webhook hmacKeyCheckValue​(String hmacKeyCheckValue)
      • getHmacKeyCheckValue

        public String getHmacKeyCheckValue()
        The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook.
        Returns:
        hmacKeyCheckValue
      • setHmacKeyCheckValue

        public void setHmacKeyCheckValue​(String hmacKeyCheckValue)
        The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook.
        Parameters:
        hmacKeyCheckValue -
      • getId

        public String getId()
        Unique identifier for this webhook.
        Returns:
        id
      • setId

        public void setId​(String id)
        Unique identifier for this webhook.
        Parameters:
        id -
      • getNetworkType

        public Webhook.NetworkTypeEnum getNetworkType()
        Network type for Terminal API details webhooks.
        Returns:
        networkType
      • setNetworkType

        public void setNetworkType​(Webhook.NetworkTypeEnum networkType)
        Network type for Terminal API details webhooks.
        Parameters:
        networkType -
      • populateSoapActionHeader

        public Webhook populateSoapActionHeader​(Boolean populateSoapActionHeader)
      • getPopulateSoapActionHeader

        public Boolean getPopulateSoapActionHeader()
        Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.
        Returns:
        populateSoapActionHeader
      • setPopulateSoapActionHeader

        public void setPopulateSoapActionHeader​(Boolean populateSoapActionHeader)
        Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.
        Parameters:
        populateSoapActionHeader -
      • getType

        public String getType()
        The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).
        Returns:
        type
      • setType

        public void setType​(String type)
        The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications).
        Parameters:
        type -
      • getUrl

        public String getUrl()
        Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**.
        Returns:
        url
      • setUrl

        public void setUrl​(String url)
        Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**.
        Parameters:
        url -
      • getUsername

        public String getUsername()
        Username to access the webhook URL.
        Returns:
        username
      • setUsername

        public void setUsername​(String username)
        Username to access the webhook URL.
        Parameters:
        username -
      • equals

        public boolean equals​(Object o)
        Return true if this Webhook object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static Webhook fromJson​(String jsonString)
                                throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Webhook given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Webhook
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Webhook
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Webhook to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException