Class ApiCredential


  • public class ApiCredential
    extends Object
    ApiCredential
    • Constructor Detail

      • ApiCredential

        public ApiCredential()
    • Method Detail

      • getActive

        public Boolean getActive()
        Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration.
        Returns:
        active
      • setActive

        public void setActive​(Boolean active)
      • addAllowedIpAddressesItem

        public ApiCredential addAllowedIpAddressesItem​(String allowedIpAddressesItem)
      • getAllowedIpAddresses

        public List<String> getAllowedIpAddresses()
        List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error.
        Returns:
        allowedIpAddresses
      • setAllowedIpAddresses

        public void setAllowedIpAddresses​(List<String> allowedIpAddresses)
      • getAllowedOrigins

        public List<AllowedOrigin> getAllowedOrigins()
        List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.
        Returns:
        allowedOrigins
      • setAllowedOrigins

        public void setAllowedOrigins​(List<AllowedOrigin> allowedOrigins)
      • getClientKey

        public String getClientKey()
        Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations.
        Returns:
        clientKey
      • setClientKey

        public void setClientKey​(String clientKey)
      • getDescription

        public String getDescription()
        Description of the API credential.
        Returns:
        description
      • setDescription

        public void setDescription​(String description)
      • getId

        public String getId()
        Unique identifier of the API credential.
        Returns:
        id
      • setId

        public void setId​(String id)
      • getRoles

        public List<String> getRoles()
        List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential.
        Returns:
        roles
      • setRoles

        public void setRoles​(List<String> roles)
      • getUsername

        public String getUsername()
        The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**.
        Returns:
        username
      • setUsername

        public void setUsername​(String username)
      • hashCode

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

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to ApiCredential
      • fromJson

        public static ApiCredential fromJson​(String jsonString)
                                      throws IOException
        Create an instance of ApiCredential given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ApiCredential
        Throws:
        IOException - if the JSON string is invalid with respect to ApiCredential
      • toJson

        public String toJson()
        Convert an instance of ApiCredential to an JSON string
        Returns:
        JSON string