Package com.adyen

Class Service

    • Constructor Detail

      • Service

        protected Service​(Client client)
        Constructs a new Service.
        Parameters:
        client - The client used to make API calls.
    • Method Detail

      • getClient

        public Client getClient()
        Gets the client used by this service.
        Returns:
        The client.
      • setClient

        public void setClient​(Client client)
        Sets the client to be used by this service.
        Parameters:
        client - The client.
      • isApiKeyRequired

        public boolean isApiKeyRequired()
        Returns true if the service requires an API key.
        Returns:
        A boolean indicating if an API key is required.
      • setApiKeyRequired

        public void setApiKeyRequired​(boolean apiKeyRequired)
        Sets if the service requires an API key.
        Parameters:
        apiKeyRequired - A boolean indicating if an API key is required.
      • createBaseURL

        protected String createBaseURL​(String url)
        Creates the base URL for a specific API endpoint. It dynamically constructs the URL based on the client's configured Environment.
        Parameters:
        url - The base URL template.
        Returns:
        The fully constructed base URL for the target environment.
        Throws:
        IllegalArgumentException - if the live URL prefix is required but not configured.