java/src/main/java/com/konfigthis/dojah/client/api/KybApi.java
<reponame>dojah-inc/dojah-sdks<gh_stars>0/*
 * DOJAH APIs
 * Use Dojah to verify, onboard and manage user identity across Africa!
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by Konfig (https://konfigthis.com).
 * Do not edit the class manually.
 */


package com.konfigthis.dojah.client.api;

import com.konfigthis.dojah.client.ApiCallback;
import com.konfigthis.dojah.client.ApiClient;
import com.konfigthis.dojah.client.ApiException;
import com.konfigthis.dojah.client.ApiResponse;
import com.konfigthis.dojah.client.Configuration;
import com.konfigthis.dojah.client.Pair;
import com.konfigthis.dojah.client.ProgressRequestBody;
import com.konfigthis.dojah.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.konfigthis.dojah.client.model.GetAdvancedCacResponse;
import com.konfigthis.dojah.client.model.GetBasicCacResponse;
import com.konfigthis.dojah.client.model.GetCacResponse;
import com.konfigthis.dojah.client.model.GetTinResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;

public class KybApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public KybApi() throws IllegalArgumentException {
        this(Configuration.getDefaultApiClient());
    }

    public KybApi(ApiClient apiClient) throws IllegalArgumentException {
        if (apiClient.getApikeyAuth() == null) {
            throw new IllegalArgumentException("\"Authorization\" is required but no API key was provided. Please set \"Authorization\" with ApiClient#setApikeyAuth(String).");
        }
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call getAdvancedCacCall(Integer rc, String type, String propertyClass, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/kyc/cac/advance";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        if (rc != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("rc", rc));
        }

        if (type != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
        }

        if (propertyClass != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("class", propertyClass));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "apikeyAuth", "appIdAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getAdvancedCacValidateBeforeCall(Integer rc, String type, String propertyClass, final ApiCallback _callback) throws ApiException {
        return getAdvancedCacCall(rc, type, propertyClass, _callback);

    }


    private ApiResponse<GetAdvancedCacResponse> getAdvancedCacWithHttpInfo(Integer rc, String type, String propertyClass) throws ApiException {
        okhttp3.Call localVarCall = getAdvancedCacValidateBeforeCall(rc, type, propertyClass, null);
        Type localVarReturnType = new TypeToken<GetAdvancedCacResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getAdvancedCacAsync(Integer rc, String type, String propertyClass, final ApiCallback<GetAdvancedCacResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getAdvancedCacValidateBeforeCall(rc, type, propertyClass, _callback);
        Type localVarReturnType = new TypeToken<GetAdvancedCacResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetAdvancedCacRequestBuilder {
        private Integer rc;
        private String type;
        private String propertyClass;

        private GetAdvancedCacRequestBuilder() {
        }

        /**
         * Set rc
         * @param rc  (optional)
         * @return GetAdvancedCacRequestBuilder
         */
        public GetAdvancedCacRequestBuilder rc(Integer rc) {
            this.rc = rc;
            return this;
        }
        
        /**
         * Set type
         * @param type  (optional)
         * @return GetAdvancedCacRequestBuilder
         */
        public GetAdvancedCacRequestBuilder type(String type) {
            this.type = type;
            return this;
        }
        
        /**
         * Set propertyClass
         * @param propertyClass  (optional)
         * @return GetAdvancedCacRequestBuilder
         */
        public GetAdvancedCacRequestBuilder propertyClass(String propertyClass) {
            this.propertyClass = propertyClass;
            return this;
        }
        
        /**
         * Build call for getAdvancedCac
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getAdvancedCacCall(rc, type, propertyClass, _callback);
        }


        /**
         * Execute getAdvancedCac request
         * @return GetAdvancedCacResponse
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public GetAdvancedCacResponse execute() throws ApiException {
            ApiResponse<GetAdvancedCacResponse> localVarResp = getAdvancedCacWithHttpInfo(rc, type, propertyClass);
            return localVarResp.getData();
        }

        /**
         * Execute getAdvancedCac request with HTTP info returned
         * @return ApiResponse&lt;GetAdvancedCacResponse&gt;
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public ApiResponse<GetAdvancedCacResponse> executeWithHttpInfo() throws ApiException {
            return getAdvancedCacWithHttpInfo(rc, type, propertyClass);
        }

        /**
         * Execute getAdvancedCac request (asynchronously)
         * @param _callback The callback to be executed when the API call finishes
         * @return The request call
         * @throws ApiException If fail to process the API call, e.g. serializing the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<GetAdvancedCacResponse> _callback) throws ApiException {
            return getAdvancedCacAsync(rc, type, propertyClass, _callback);
        }
    }

    /**
     * KYC - Get CAC Advanced
     * 
     * @return GetAdvancedCacRequestBuilder
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
     </table>
     */
    public GetAdvancedCacRequestBuilder getAdvancedCac() throws IllegalArgumentException {
        return new GetAdvancedCacRequestBuilder();
    }
    private okhttp3.Call getBasicCacCall(Integer rc, String type, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/kyc/cac/basic";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        if (rc != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("rc", rc));
        }

        if (type != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "apikeyAuth", "appIdAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getBasicCacValidateBeforeCall(Integer rc, String type, final ApiCallback _callback) throws ApiException {
        return getBasicCacCall(rc, type, _callback);

    }


    private ApiResponse<GetBasicCacResponse> getBasicCacWithHttpInfo(Integer rc, String type) throws ApiException {
        okhttp3.Call localVarCall = getBasicCacValidateBeforeCall(rc, type, null);
        Type localVarReturnType = new TypeToken<GetBasicCacResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getBasicCacAsync(Integer rc, String type, final ApiCallback<GetBasicCacResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getBasicCacValidateBeforeCall(rc, type, _callback);
        Type localVarReturnType = new TypeToken<GetBasicCacResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetBasicCacRequestBuilder {
        private Integer rc;
        private String type;

        private GetBasicCacRequestBuilder() {
        }

        /**
         * Set rc
         * @param rc  (optional)
         * @return GetBasicCacRequestBuilder
         */
        public GetBasicCacRequestBuilder rc(Integer rc) {
            this.rc = rc;
            return this;
        }
        
        /**
         * Set type
         * @param type  (optional)
         * @return GetBasicCacRequestBuilder
         */
        public GetBasicCacRequestBuilder type(String type) {
            this.type = type;
            return this;
        }
        
        /**
         * Build call for getBasicCac
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getBasicCacCall(rc, type, _callback);
        }


        /**
         * Execute getBasicCac request
         * @return GetBasicCacResponse
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public GetBasicCacResponse execute() throws ApiException {
            ApiResponse<GetBasicCacResponse> localVarResp = getBasicCacWithHttpInfo(rc, type);
            return localVarResp.getData();
        }

        /**
         * Execute getBasicCac request with HTTP info returned
         * @return ApiResponse&lt;GetBasicCacResponse&gt;
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public ApiResponse<GetBasicCacResponse> executeWithHttpInfo() throws ApiException {
            return getBasicCacWithHttpInfo(rc, type);
        }

        /**
         * Execute getBasicCac request (asynchronously)
         * @param _callback The callback to be executed when the API call finishes
         * @return The request call
         * @throws ApiException If fail to process the API call, e.g. serializing the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<GetBasicCacResponse> _callback) throws ApiException {
            return getBasicCacAsync(rc, type, _callback);
        }
    }

    /**
     * KYB - Get CAC 2
     * 
     * @return GetBasicCacRequestBuilder
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Successful response </td><td>  -  </td></tr>
     </table>
     */
    public GetBasicCacRequestBuilder getBasicCac() throws IllegalArgumentException {
        return new GetBasicCacRequestBuilder();
    }
    private okhttp3.Call getCacCall(Integer rcNumber, String companyName, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/kyc/cac";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        if (rcNumber != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("rc_number", rcNumber));
        }

        if (companyName != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("company_name", companyName));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "apikeyAuth", "appIdAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getCacValidateBeforeCall(Integer rcNumber, String companyName, final ApiCallback _callback) throws ApiException {
        return getCacCall(rcNumber, companyName, _callback);

    }


    private ApiResponse<GetCacResponse> getCacWithHttpInfo(Integer rcNumber, String companyName) throws ApiException {
        okhttp3.Call localVarCall = getCacValidateBeforeCall(rcNumber, companyName, null);
        Type localVarReturnType = new TypeToken<GetCacResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getCacAsync(Integer rcNumber, String companyName, final ApiCallback<GetCacResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getCacValidateBeforeCall(rcNumber, companyName, _callback);
        Type localVarReturnType = new TypeToken<GetCacResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetCacRequestBuilder {
        private Integer rcNumber;
        private String companyName;

        private GetCacRequestBuilder() {
        }

        /**
         * Set rcNumber
         * @param rcNumber  (optional)
         * @return GetCacRequestBuilder
         */
        public GetCacRequestBuilder rcNumber(Integer rcNumber) {
            this.rcNumber = rcNumber;
            return this;
        }
        
        /**
         * Set companyName
         * @param companyName  (optional)
         * @return GetCacRequestBuilder
         */
        public GetCacRequestBuilder companyName(String companyName) {
            this.companyName = companyName;
            return this;
        }
        
        /**
         * Build call for getCac
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getCacCall(rcNumber, companyName, _callback);
        }


        /**
         * Execute getCac request
         * @return GetCacResponse
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public GetCacResponse execute() throws ApiException {
            ApiResponse<GetCacResponse> localVarResp = getCacWithHttpInfo(rcNumber, companyName);
            return localVarResp.getData();
        }

        /**
         * Execute getCac request with HTTP info returned
         * @return ApiResponse&lt;GetCacResponse&gt;
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public ApiResponse<GetCacResponse> executeWithHttpInfo() throws ApiException {
            return getCacWithHttpInfo(rcNumber, companyName);
        }

        /**
         * Execute getCac request (asynchronously)
         * @param _callback The callback to be executed when the API call finishes
         * @return The request call
         * @throws ApiException If fail to process the API call, e.g. serializing the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<GetCacResponse> _callback) throws ApiException {
            return getCacAsync(rcNumber, companyName, _callback);
        }
    }

    /**
     * KYC - Get CAC 
     * 
     * @return GetCacRequestBuilder
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
     </table>
     */
    public GetCacRequestBuilder getCac() throws IllegalArgumentException {
        return new GetCacRequestBuilder();
    }
    private okhttp3.Call getTinCall(String tin, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/kyc/tin";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, String> localVarCookieParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();

        if (tin != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("tin", tin));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "apikeyAuth", "appIdAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call getTinValidateBeforeCall(String tin, final ApiCallback _callback) throws ApiException {
        return getTinCall(tin, _callback);

    }


    private ApiResponse<GetTinResponse> getTinWithHttpInfo(String tin) throws ApiException {
        okhttp3.Call localVarCall = getTinValidateBeforeCall(tin, null);
        Type localVarReturnType = new TypeToken<GetTinResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getTinAsync(String tin, final ApiCallback<GetTinResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getTinValidateBeforeCall(tin, _callback);
        Type localVarReturnType = new TypeToken<GetTinResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetTinRequestBuilder {
        private String tin;

        private GetTinRequestBuilder() {
        }

        /**
         * Set tin
         * @param tin  (optional)
         * @return GetTinRequestBuilder
         */
        public GetTinRequestBuilder tin(String tin) {
            this.tin = tin;
            return this;
        }
        
        /**
         * Build call for getTin
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getTinCall(tin, _callback);
        }


        /**
         * Execute getTin request
         * @return GetTinResponse
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public GetTinResponse execute() throws ApiException {
            ApiResponse<GetTinResponse> localVarResp = getTinWithHttpInfo(tin);
            return localVarResp.getData();
        }

        /**
         * Execute getTin request with HTTP info returned
         * @return ApiResponse&lt;GetTinResponse&gt;
         * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public ApiResponse<GetTinResponse> executeWithHttpInfo() throws ApiException {
            return getTinWithHttpInfo(tin);
        }

        /**
         * Execute getTin request (asynchronously)
         * @param _callback The callback to be executed when the API call finishes
         * @return The request call
         * @throws ApiException If fail to process the API call, e.g. serializing the request body object
         * @http.response.details
         <table summary="Response Details" border="1">
            <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
            <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<GetTinResponse> _callback) throws ApiException {
            return getTinAsync(tin, _callback);
        }
    }

    /**
     * KYC - Fetch Tin
     * 
     * @return GetTinRequestBuilder
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> OK </td><td>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * Content-Length -  <br>  * ETag -  <br>  * Date -  <br>  * Connection -  <br>  </td></tr>
     </table>
     */
    public GetTinRequestBuilder getTin() throws IllegalArgumentException {
        return new GetTinRequestBuilder();
    }
}
