Class AbstractExternalPayPalApiProvider

  • Direct Known Subclasses:
    ExternalPayPalApiProvider

    public abstract class AbstractExternalPayPalApiProvider
    extends Object
    Author:
    Dima Myroniuk (dmyroniuk)
    • Constructor Detail

      • AbstractExternalPayPalApiProvider

        public AbstractExternalPayPalApiProvider​(org.springframework.web.reactive.function.client.WebClient webClient,
                                                 com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • executeRequest

        protected <T> T executeRequest​(Supplier<T> request)
        Executes a request with default Web Client error handling.
        Type Parameters:
        T - the return type of the request operation
        Parameters:
        request - the request to execute
        Returns:
        the value generated by the supplier
      • uriVars

        protected Map<String,​Object> uriVars​(Object... keysAndValues)
        Convenience method to generate a map of variables.
        Parameters:
        keysAndValues - the keys and values (in pairs, alternating) to transform into a map
        Returns:
        the keys and values as a map
      • getWebClient

        protected org.springframework.web.reactive.function.client.WebClient getWebClient()
      • getObjectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()