java/src/main/java/com/konfigthis/dojah/client/api/FinancialApi.java
<reponame>dojah-inc/dojah-sdks<filename>java/src/main/java/com/konfigthis/dojah/client/api/FinancialApi.java/*
 * 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.CollectStatusFromPdfResponse;
import com.konfigthis.dojah.client.model.CollectTransactionsRequest;
import com.konfigthis.dojah.client.model.CollectTransactionsRequestTransactionsInner;
import com.konfigthis.dojah.client.model.CollectTransactionsResponse;
import java.io.File;
import com.konfigthis.dojah.client.model.FinancialGetBasicBvnResponse;
import com.konfigthis.dojah.client.model.FinancialGetFullBvnResponse;
import com.konfigthis.dojah.client.model.GetAccountAnalysisResponse;
import com.konfigthis.dojah.client.model.GetAccountResponse;
import com.konfigthis.dojah.client.model.GetAccountSubscriptionsResponse;
import com.konfigthis.dojah.client.model.GetAccountTransactionsResponse;
import com.konfigthis.dojah.client.model.GetEarningStructureResponse;
import com.konfigthis.dojah.client.model.GetSpendingPatternResponse;

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 FinancialApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public FinancialApi(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 collectStatusFromPdfCall(File statement, Integer bankCode, 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 = "/api/v1/financial/transactions/pdf";

        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 (statement != null) {
            localVarFormParams.put("statement", statement);
        }

        if (bankCode != null) {
            localVarFormParams.put("bank_code", bankCode);
        }

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

        final String[] localVarContentTypes = {
            "multipart/form-data"
        };
        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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call collectStatusFromPdfValidateBeforeCall(File statement, Integer bankCode, final ApiCallback _callback) throws ApiException {
        return collectStatusFromPdfCall(statement, bankCode, _callback);

    }


    private ApiResponse<CollectStatusFromPdfResponse> collectStatusFromPdfWithHttpInfo(File statement, Integer bankCode) throws ApiException {
        okhttp3.Call localVarCall = collectStatusFromPdfValidateBeforeCall(statement, bankCode, null);
        Type localVarReturnType = new TypeToken<CollectStatusFromPdfResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call collectStatusFromPdfAsync(File statement, Integer bankCode, final ApiCallback<CollectStatusFromPdfResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = collectStatusFromPdfValidateBeforeCall(statement, bankCode, _callback);
        Type localVarReturnType = new TypeToken<CollectStatusFromPdfResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class CollectStatusFromPdfRequestBuilder {
        private File statement;
        private Integer bankCode;

        private CollectStatusFromPdfRequestBuilder() {
        }

        /**
         * Set statement
         * @param statement  (optional)
         * @return CollectStatusFromPdfRequestBuilder
         */
        public CollectStatusFromPdfRequestBuilder statement(File statement) {
            this.statement = statement;
            return this;
        }
        
        /**
         * Set bankCode
         * @param bankCode  (optional)
         * @return CollectStatusFromPdfRequestBuilder
         */
        public CollectStatusFromPdfRequestBuilder bankCode(Integer bankCode) {
            this.bankCode = bankCode;
            return this;
        }
        
        /**
         * Build call for collectStatusFromPdf
         * @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 collectStatusFromPdfCall(statement, bankCode, _callback);
        }


        /**
         * Execute collectStatusFromPdf request
         * @return CollectStatusFromPdfResponse
         * @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 CollectStatusFromPdfResponse execute() throws ApiException {
            ApiResponse<CollectStatusFromPdfResponse> localVarResp = collectStatusFromPdfWithHttpInfo(statement, bankCode);
            return localVarResp.getData();
        }

        /**
         * Execute collectStatusFromPdf request with HTTP info returned
         * @return ApiResponse&lt;CollectStatusFromPdfResponse&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<CollectStatusFromPdfResponse> executeWithHttpInfo() throws ApiException {
            return collectStatusFromPdfWithHttpInfo(statement, bankCode);
        }

        /**
         * Execute collectStatusFromPdf 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<CollectStatusFromPdfResponse> _callback) throws ApiException {
            return collectStatusFromPdfAsync(statement, bankCode, _callback);
        }
    }

    /**
     * Collect Status via PDF Statement
     * 
     * @return CollectStatusFromPdfRequestBuilder
     * @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 CollectStatusFromPdfRequestBuilder collectStatusFromPdf() throws IllegalArgumentException {
        return new CollectStatusFromPdfRequestBuilder();
    }
    private okhttp3.Call collectTransactionsCall(CollectTransactionsRequest collectTransactionsRequest, 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 = collectTransactionsRequest;

        // create path and map variables
        String localVarPath = "/v1/financial/transactions";

        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>();

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

        final String[] localVarContentTypes = {
            "application/json"
        };
        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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call collectTransactionsValidateBeforeCall(CollectTransactionsRequest collectTransactionsRequest, final ApiCallback _callback) throws ApiException {
        return collectTransactionsCall(collectTransactionsRequest, _callback);

    }


    private ApiResponse<CollectTransactionsResponse> collectTransactionsWithHttpInfo(CollectTransactionsRequest collectTransactionsRequest) throws ApiException {
        okhttp3.Call localVarCall = collectTransactionsValidateBeforeCall(collectTransactionsRequest, null);
        Type localVarReturnType = new TypeToken<CollectTransactionsResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call collectTransactionsAsync(CollectTransactionsRequest collectTransactionsRequest, final ApiCallback<CollectTransactionsResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = collectTransactionsValidateBeforeCall(collectTransactionsRequest, _callback);
        Type localVarReturnType = new TypeToken<CollectTransactionsResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class CollectTransactionsRequestBuilder {
        private List<CollectTransactionsRequestTransactionsInner> transactions;
        private String appId;

        private CollectTransactionsRequestBuilder() {
        }

        /**
         * Set transactions
         * @param transactions  (optional)
         * @return CollectTransactionsRequestBuilder
         */
        public CollectTransactionsRequestBuilder transactions(List<CollectTransactionsRequestTransactionsInner> transactions) {
            this.transactions = transactions;
            return this;
        }
        
        /**
         * Set appId
         * @param appId  (optional)
         * @return CollectTransactionsRequestBuilder
         */
        public CollectTransactionsRequestBuilder appId(String appId) {
            this.appId = appId;
            return this;
        }
        
        /**
         * Build call for collectTransactions
         * @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 {
            CollectTransactionsRequest collectTransactionsRequest = buildBodyParams();
            return collectTransactionsCall(collectTransactionsRequest, _callback);
        }

        private CollectTransactionsRequest buildBodyParams() {
            CollectTransactionsRequest collectTransactionsRequest = new CollectTransactionsRequest();
            collectTransactionsRequest.transactions(this.transactions);
            collectTransactionsRequest.appId(this.appId);
            return collectTransactionsRequest;
        }

        /**
         * Execute collectTransactions request
         * @return CollectTransactionsResponse
         * @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 CollectTransactionsResponse execute() throws ApiException {
            CollectTransactionsRequest collectTransactionsRequest = buildBodyParams();
            ApiResponse<CollectTransactionsResponse> localVarResp = collectTransactionsWithHttpInfo(collectTransactionsRequest);
            return localVarResp.getData();
        }

        /**
         * Execute collectTransactions request with HTTP info returned
         * @return ApiResponse&lt;CollectTransactionsResponse&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<CollectTransactionsResponse> executeWithHttpInfo() throws ApiException {
            CollectTransactionsRequest collectTransactionsRequest = buildBodyParams();
            return collectTransactionsWithHttpInfo(collectTransactionsRequest);
        }

        /**
         * Execute collectTransactions 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<CollectTransactionsResponse> _callback) throws ApiException {
            CollectTransactionsRequest collectTransactionsRequest = buildBodyParams();
            return collectTransactionsAsync(collectTransactionsRequest, _callback);
        }
    }

    /**
     * Collect Transactions
     * 
     * @return CollectTransactionsRequestBuilder
     * @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 CollectTransactionsRequestBuilder collectTransactions() throws IllegalArgumentException {
        return new CollectTransactionsRequestBuilder();
    }
    private okhttp3.Call getAccountCall(String accountId, 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 = "/api/v1/financial/account_information";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getAccountValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getAccountCall(accountId, _callback);

    }


    private ApiResponse<GetAccountResponse> getAccountWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getAccountValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<GetAccountResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getAccountAsync(String accountId, final ApiCallback<GetAccountResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getAccountValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<GetAccountResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetAccountRequestBuilder {
        private String accountId;

        private GetAccountRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetAccountRequestBuilder
         */
        public GetAccountRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getAccount
         * @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 getAccountCall(accountId, _callback);
        }


        /**
         * Execute getAccount request
         * @return GetAccountResponse
         * @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 GetAccountResponse execute() throws ApiException {
            ApiResponse<GetAccountResponse> localVarResp = getAccountWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getAccount request with HTTP info returned
         * @return ApiResponse&lt;GetAccountResponse&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<GetAccountResponse> executeWithHttpInfo() throws ApiException {
            return getAccountWithHttpInfo(accountId);
        }

        /**
         * Execute getAccount 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<GetAccountResponse> _callback) throws ApiException {
            return getAccountAsync(accountId, _callback);
        }
    }

    /**
     * Get Account Information
     * /services/@app_id/account/@account_id
     * @return GetAccountRequestBuilder
     * @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 GetAccountRequestBuilder getAccount() throws IllegalArgumentException {
        return new GetAccountRequestBuilder();
    }
    private okhttp3.Call getAccountAnalysisCall(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 = "/api/v1/financial/analysis";

        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>();

        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 getAccountAnalysisValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        return getAccountAnalysisCall(_callback);

    }


    private ApiResponse<GetAccountAnalysisResponse> getAccountAnalysisWithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = getAccountAnalysisValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<GetAccountAnalysisResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getAccountAnalysisAsync(final ApiCallback<GetAccountAnalysisResponse> _callback) throws ApiException {

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

    public class GetAccountAnalysisRequestBuilder {

        private GetAccountAnalysisRequestBuilder() {
        }

        /**
         * Build call for getAccountAnalysis
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * Access-Control-Allow-Origin -  <br>  * uuid -  <br>  * x-moesif-transaction-id -  <br>  * service -  <br>  * product -  <br>  * ETag -  <br>  * Vary -  <br>  * CF-Cache-Status -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getAccountAnalysisCall(_callback);
        }


        /**
         * Execute getAccountAnalysis request
         * @return GetAccountAnalysisResponse
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * Access-Control-Allow-Origin -  <br>  * uuid -  <br>  * x-moesif-transaction-id -  <br>  * service -  <br>  * product -  <br>  * ETag -  <br>  * Vary -  <br>  * CF-Cache-Status -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public GetAccountAnalysisResponse execute() throws ApiException {
            ApiResponse<GetAccountAnalysisResponse> localVarResp = getAccountAnalysisWithHttpInfo();
            return localVarResp.getData();
        }

        /**
         * Execute getAccountAnalysis request with HTTP info returned
         * @return ApiResponse&lt;GetAccountAnalysisResponse&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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * Access-Control-Allow-Origin -  <br>  * uuid -  <br>  * x-moesif-transaction-id -  <br>  * service -  <br>  * product -  <br>  * ETag -  <br>  * Vary -  <br>  * CF-Cache-Status -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public ApiResponse<GetAccountAnalysisResponse> executeWithHttpInfo() throws ApiException {
            return getAccountAnalysisWithHttpInfo();
        }

        /**
         * Execute getAccountAnalysis 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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * Access-Control-Allow-Origin -  <br>  * uuid -  <br>  * x-moesif-transaction-id -  <br>  * service -  <br>  * product -  <br>  * ETag -  <br>  * Vary -  <br>  * CF-Cache-Status -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<GetAccountAnalysisResponse> _callback) throws ApiException {
            return getAccountAnalysisAsync(_callback);
        }
    }

    /**
     * Get Account Analysis
     * 
     * @return GetAccountAnalysisRequestBuilder
     * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * Access-Control-Allow-Origin -  <br>  * uuid -  <br>  * x-moesif-transaction-id -  <br>  * service -  <br>  * product -  <br>  * ETag -  <br>  * Vary -  <br>  * CF-Cache-Status -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
     </table>
     */
    public GetAccountAnalysisRequestBuilder getAccountAnalysis() throws IllegalArgumentException {
        return new GetAccountAnalysisRequestBuilder();
    }
    private okhttp3.Call getAccountSubscriptionsCall(String accountId, 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/financial/account_subscription";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getAccountSubscriptionsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getAccountSubscriptionsCall(accountId, _callback);

    }


    private ApiResponse<GetAccountSubscriptionsResponse> getAccountSubscriptionsWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getAccountSubscriptionsValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<GetAccountSubscriptionsResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getAccountSubscriptionsAsync(String accountId, final ApiCallback<GetAccountSubscriptionsResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getAccountSubscriptionsValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<GetAccountSubscriptionsResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetAccountSubscriptionsRequestBuilder {
        private String accountId;

        private GetAccountSubscriptionsRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetAccountSubscriptionsRequestBuilder
         */
        public GetAccountSubscriptionsRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getAccountSubscriptions
         * @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 getAccountSubscriptionsCall(accountId, _callback);
        }


        /**
         * Execute getAccountSubscriptions request
         * @return GetAccountSubscriptionsResponse
         * @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 GetAccountSubscriptionsResponse execute() throws ApiException {
            ApiResponse<GetAccountSubscriptionsResponse> localVarResp = getAccountSubscriptionsWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getAccountSubscriptions request with HTTP info returned
         * @return ApiResponse&lt;GetAccountSubscriptionsResponse&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<GetAccountSubscriptionsResponse> executeWithHttpInfo() throws ApiException {
            return getAccountSubscriptionsWithHttpInfo(accountId);
        }

        /**
         * Execute getAccountSubscriptions 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<GetAccountSubscriptionsResponse> _callback) throws ApiException {
            return getAccountSubscriptionsAsync(accountId, _callback);
        }
    }

    /**
     * Get Account Subscriptions
     * 
     * @return GetAccountSubscriptionsRequestBuilder
     * @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 GetAccountSubscriptionsRequestBuilder getAccountSubscriptions() throws IllegalArgumentException {
        return new GetAccountSubscriptionsRequestBuilder();
    }
    private okhttp3.Call getAccountTransactionsCall(String accountId, Integer length, 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 = "/api/v1/financial/account_transactions";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

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

        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 getAccountTransactionsValidateBeforeCall(String accountId, Integer length, final ApiCallback _callback) throws ApiException {
        return getAccountTransactionsCall(accountId, length, _callback);

    }


    private ApiResponse<GetAccountTransactionsResponse> getAccountTransactionsWithHttpInfo(String accountId, Integer length) throws ApiException {
        okhttp3.Call localVarCall = getAccountTransactionsValidateBeforeCall(accountId, length, null);
        Type localVarReturnType = new TypeToken<GetAccountTransactionsResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getAccountTransactionsAsync(String accountId, Integer length, final ApiCallback<GetAccountTransactionsResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getAccountTransactionsValidateBeforeCall(accountId, length, _callback);
        Type localVarReturnType = new TypeToken<GetAccountTransactionsResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetAccountTransactionsRequestBuilder {
        private String accountId;
        private Integer length;

        private GetAccountTransactionsRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetAccountTransactionsRequestBuilder
         */
        public GetAccountTransactionsRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Set length
         * @param length  (optional)
         * @return GetAccountTransactionsRequestBuilder
         */
        public GetAccountTransactionsRequestBuilder length(Integer length) {
            this.length = length;
            return this;
        }
        
        /**
         * Build call for getAccountTransactions
         * @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 getAccountTransactionsCall(accountId, length, _callback);
        }


        /**
         * Execute getAccountTransactions request
         * @return GetAccountTransactionsResponse
         * @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 GetAccountTransactionsResponse execute() throws ApiException {
            ApiResponse<GetAccountTransactionsResponse> localVarResp = getAccountTransactionsWithHttpInfo(accountId, length);
            return localVarResp.getData();
        }

        /**
         * Execute getAccountTransactions request with HTTP info returned
         * @return ApiResponse&lt;GetAccountTransactionsResponse&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<GetAccountTransactionsResponse> executeWithHttpInfo() throws ApiException {
            return getAccountTransactionsWithHttpInfo(accountId, length);
        }

        /**
         * Execute getAccountTransactions 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<GetAccountTransactionsResponse> _callback) throws ApiException {
            return getAccountTransactionsAsync(accountId, length, _callback);
        }
    }

    /**
     * Get Account Transactions
     * 
     * @return GetAccountTransactionsRequestBuilder
     * @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 GetAccountTransactionsRequestBuilder getAccountTransactions() throws IllegalArgumentException {
        return new GetAccountTransactionsRequestBuilder();
    }
    private okhttp3.Call getBasicBvnCall(String accountId, 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/financial/bvn_information/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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getBasicBvnValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getBasicBvnCall(accountId, _callback);

    }


    private ApiResponse<FinancialGetBasicBvnResponse> getBasicBvnWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getBasicBvnValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<FinancialGetBasicBvnResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getBasicBvnAsync(String accountId, final ApiCallback<FinancialGetBasicBvnResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getBasicBvnValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<FinancialGetBasicBvnResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetBasicBvnRequestBuilder {
        private String accountId;

        private GetBasicBvnRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetBasicBvnRequestBuilder
         */
        public GetBasicBvnRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getBasicBvn
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getBasicBvnCall(accountId, _callback);
        }


        /**
         * Execute getBasicBvn request
         * @return FinancialGetBasicBvnResponse
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public FinancialGetBasicBvnResponse execute() throws ApiException {
            ApiResponse<FinancialGetBasicBvnResponse> localVarResp = getBasicBvnWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getBasicBvn request with HTTP info returned
         * @return ApiResponse&lt;FinancialGetBasicBvnResponse&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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public ApiResponse<FinancialGetBasicBvnResponse> executeWithHttpInfo() throws ApiException {
            return getBasicBvnWithHttpInfo(accountId);
        }

        /**
         * Execute getBasicBvn 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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<FinancialGetBasicBvnResponse> _callback) throws ApiException {
            return getBasicBvnAsync(accountId, _callback);
        }
    }

    /**
     * Get BVN Information Basic
     * 
     * @return GetBasicBvnRequestBuilder
     * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
     </table>
     */
    public GetBasicBvnRequestBuilder getBasicBvn() throws IllegalArgumentException {
        return new GetBasicBvnRequestBuilder();
    }
    private okhttp3.Call getEarningStructureCall(String accountId, 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/financial/earning_structure";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getEarningStructureValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getEarningStructureCall(accountId, _callback);

    }


    private ApiResponse<GetEarningStructureResponse> getEarningStructureWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getEarningStructureValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<GetEarningStructureResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getEarningStructureAsync(String accountId, final ApiCallback<GetEarningStructureResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getEarningStructureValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<GetEarningStructureResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetEarningStructureRequestBuilder {
        private String accountId;

        private GetEarningStructureRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetEarningStructureRequestBuilder
         */
        public GetEarningStructureRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getEarningStructure
         * @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 getEarningStructureCall(accountId, _callback);
        }


        /**
         * Execute getEarningStructure request
         * @return GetEarningStructureResponse
         * @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 GetEarningStructureResponse execute() throws ApiException {
            ApiResponse<GetEarningStructureResponse> localVarResp = getEarningStructureWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getEarningStructure request with HTTP info returned
         * @return ApiResponse&lt;GetEarningStructureResponse&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<GetEarningStructureResponse> executeWithHttpInfo() throws ApiException {
            return getEarningStructureWithHttpInfo(accountId);
        }

        /**
         * Execute getEarningStructure 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<GetEarningStructureResponse> _callback) throws ApiException {
            return getEarningStructureAsync(accountId, _callback);
        }
    }

    /**
     * Get Earning Structure
     * 
     * @return GetEarningStructureRequestBuilder
     * @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 GetEarningStructureRequestBuilder getEarningStructure() throws IllegalArgumentException {
        return new GetEarningStructureRequestBuilder();
    }
    private okhttp3.Call getFullBvnCall(String accountId, 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/financial/bvn_information/full";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getFullBvnValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getFullBvnCall(accountId, _callback);

    }


    private ApiResponse<FinancialGetFullBvnResponse> getFullBvnWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getFullBvnValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<FinancialGetFullBvnResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getFullBvnAsync(String accountId, final ApiCallback<FinancialGetFullBvnResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getFullBvnValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<FinancialGetFullBvnResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetFullBvnRequestBuilder {
        private String accountId;

        private GetFullBvnRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetFullBvnRequestBuilder
         */
        public GetFullBvnRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getFullBvn
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
            return getFullBvnCall(accountId, _callback);
        }


        /**
         * Execute getFullBvn request
         * @return FinancialGetFullBvnResponse
         * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public FinancialGetFullBvnResponse execute() throws ApiException {
            ApiResponse<FinancialGetFullBvnResponse> localVarResp = getFullBvnWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getFullBvn request with HTTP info returned
         * @return ApiResponse&lt;FinancialGetFullBvnResponse&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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public ApiResponse<FinancialGetFullBvnResponse> executeWithHttpInfo() throws ApiException {
            return getFullBvnWithHttpInfo(accountId);
        }

        /**
         * Execute getFullBvn 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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
         </table>
         */
        public okhttp3.Call executeAsync(final ApiCallback<FinancialGetFullBvnResponse> _callback) throws ApiException {
            return getFullBvnAsync(accountId, _callback);
        }
    }

    /**
     * Get BVN Information Full
     * 
     * @return GetFullBvnRequestBuilder
     * @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>  * Date -  <br>  * Transfer-Encoding -  <br>  * Connection -  <br>  * X-Powered-By -  <br>  * Access-Control-Allow-Origin -  <br>  * ETag -  <br>  * CF-Cache-Status -  <br>  * cf-request-id -  <br>  * Expect-CT -  <br>  * Report-To -  <br>  * NEL -  <br>  * Server -  <br>  * CF-RAY -  <br>  * Content-Encoding -  <br>  * alt-svc -  <br>  </td></tr>
     </table>
     */
    public GetFullBvnRequestBuilder getFullBvn() throws IllegalArgumentException {
        return new GetFullBvnRequestBuilder();
    }
    private okhttp3.Call getSpendingPatternCall(String accountId, 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/financial/spending_pattern";

        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 (accountId != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("account_id", accountId));
        }

        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 getSpendingPatternValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException {
        return getSpendingPatternCall(accountId, _callback);

    }


    private ApiResponse<GetSpendingPatternResponse> getSpendingPatternWithHttpInfo(String accountId) throws ApiException {
        okhttp3.Call localVarCall = getSpendingPatternValidateBeforeCall(accountId, null);
        Type localVarReturnType = new TypeToken<GetSpendingPatternResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call getSpendingPatternAsync(String accountId, final ApiCallback<GetSpendingPatternResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = getSpendingPatternValidateBeforeCall(accountId, _callback);
        Type localVarReturnType = new TypeToken<GetSpendingPatternResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class GetSpendingPatternRequestBuilder {
        private String accountId;

        private GetSpendingPatternRequestBuilder() {
        }

        /**
         * Set accountId
         * @param accountId  (optional)
         * @return GetSpendingPatternRequestBuilder
         */
        public GetSpendingPatternRequestBuilder accountId(String accountId) {
            this.accountId = accountId;
            return this;
        }
        
        /**
         * Build call for getSpendingPattern
         * @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 getSpendingPatternCall(accountId, _callback);
        }


        /**
         * Execute getSpendingPattern request
         * @return GetSpendingPatternResponse
         * @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 GetSpendingPatternResponse execute() throws ApiException {
            ApiResponse<GetSpendingPatternResponse> localVarResp = getSpendingPatternWithHttpInfo(accountId);
            return localVarResp.getData();
        }

        /**
         * Execute getSpendingPattern request with HTTP info returned
         * @return ApiResponse&lt;GetSpendingPatternResponse&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<GetSpendingPatternResponse> executeWithHttpInfo() throws ApiException {
            return getSpendingPatternWithHttpInfo(accountId);
        }

        /**
         * Execute getSpendingPattern 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<GetSpendingPatternResponse> _callback) throws ApiException {
            return getSpendingPatternAsync(accountId, _callback);
        }
    }

    /**
     * Get Spending Pattern
     * 
     * @return GetSpendingPatternRequestBuilder
     * @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 GetSpendingPatternRequestBuilder getSpendingPattern() throws IllegalArgumentException {
        return new GetSpendingPatternRequestBuilder();
    }
}
