Class HyperwalletApiClient


  • public class HyperwalletApiClient
    extends Object
    The Hyperwallet API Client
    • Constructor Detail

      • HyperwalletApiClient

        public HyperwalletApiClient​(String username,
                                    String password,
                                    String version,
                                    HyperwalletEncryption hyperwalletEncryption,
                                    int connectionTimeout,
                                    int readTimeout)
        Create a instance of the API client
        Parameters:
        username - the API username
        password - the API password
        version - the SDK version
        hyperwalletEncryption - the HyperwalletEncryption
        connectionTimeout - the timeout value that will be used for making new connections to the Hyperwallet API (in milliseconds).
        readTimeout - the timeout value that will be used when reading data from an established connection to the Hyperwallet API (in milliseconds).
    • Method Detail

      • get

        public <T> T get​(String url,
                         Class<T> type)
        Perform a GET call to the Hyperwallet API server
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        type - The response class type
        Returns:
        an instance of response class type
      • get

        public <T> T get​(String url,
                         com.fasterxml.jackson.core.type.TypeReference<T> type)
        Perform a GET call to the Hyperwallet API server
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        type - The response TypeReference type
        Returns:
        an instance of TypeReference
      • put

        public <T> T put​(String url,
                         Multipart uploadData,
                         Class<T> type)
        Perform a PUT call to the Hyperwallet API server to upload Multipart
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        uploadData - The Multipart
        type - The response class type
        Returns:
        an instance of response class type
      • put

        public <T> T put​(String url,
                         Object bodyObject,
                         Class<T> type)
        Perform a PUT call to the Hyperwallet API server to upload Object
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        bodyObject - The Object body
        type - The response class type
        Returns:
        an instance of response class type
      • post

        public <T> T post​(String url,
                          Object bodyObject,
                          Class<T> type)
        Perform a POST call to the Hyperwallet API server to upload Object
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        bodyObject - The Object body
        type - The response class type
        Returns:
        an instance of response class type
      • post

        public <T> T post​(String url,
                          Object bodyObject,
                          Class<T> type,
                          HashMap<String,​String> header)
        Perform a POST call to the Hyperwallet API server to upload Object
        Type Parameters:
        T - Response class type
        Parameters:
        url - The api endpoint to call
        bodyObject - The Object body
        type - The response class type
        header - HTTP header properties
        Returns:
        an instance of response class type
      • usesProxy

        public Boolean usesProxy()
        Checks if current API Client instance uses a proxy
        Returns:
        Boolean if client has a proxy config
      • setProxy

        public void setProxy​(String url,
                             Integer port)
        Create Proxy setting for API Client instance
        Parameters:
        url - url of Proxy
        port - port of Proxy
      • getProxy

        public Proxy getProxy()
        Returns Proxy setting for Authentication
        Returns:
        Proxy current Proxy config of client
      • setProxy

        public void setProxy​(Proxy proxy)
        Create Proxy setting for API Client instance
        Parameters:
        proxy - value of Proxy
      • getProxyUsername

        public String getProxyUsername()
        Returns Proxy Username for Authentication
        Returns:
        current ProxyUsername
      • setProxyUsername

        public void setProxyUsername​(String proxyUsername)
        Create Proxy Username for Authentication
        Parameters:
        proxyUsername - username of Proxy
      • getProxyPassword

        public String getProxyPassword()
        Returns Proxy Password for Authentication
        Returns:
        current ProxyUsername
      • setProxyPassword

        public void setProxyPassword​(String proxyPassword)
        Create Proxy Password setting for Authentication
        Parameters:
        proxyPassword - username of Proxy