/*
 * Swagger of Opencellsoft Api
 * @#Introduction
 *
 * The version of the OpenAPI document: 7.3.1-SNAPSHOT
 * Contact: contact@opencellsoft.fr
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.api;

import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import org.openapitools.client.model.ActionStatus;
import org.openapitools.client.model.PagingAndFiltering;
import org.openapitools.client.model.ReportExtractDto;
import org.openapitools.client.model.ReportExtractExecutionResultResponseDto;
import org.openapitools.client.model.ReportExtractExecutionResultsResponseDto;
import org.openapitools.client.model.ReportExtractResponseDto;
import org.openapitools.client.model.ReportExtractsResponseDto;
import org.openapitools.client.model.RunReportExtractDto;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ReportExtractApi {
    private ApiClient localVarApiClient;

    public ReportExtractApi() {
        this(Configuration.getDefaultApiClient());
    }

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETEReportExtractDelete1
     * @param body  reportExtractCode code of the ReportExtract  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEReportExtractDelete1Call(String body, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = body;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call dELETEReportExtractDelete1ValidateBeforeCall(String body, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = dELETEReportExtractDelete1Call(body, _callback);
        return localVarCall;

    }

    /**
     *  Delete a Report Extract with a given code.  
     *  Delete a Report Extract with a given code.  
     * @param body  reportExtractCode code of the ReportExtract  (optional)
     * @return ActionStatus
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEReportExtractDelete1(String body) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEReportExtractDelete1WithHttpInfo(body);
        return localVarResp.getData();
    }

    /**
     *  Delete a Report Extract with a given code.  
     *  Delete a Report Extract with a given code.  
     * @param body  reportExtractCode code of the ReportExtract  (optional)
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETEReportExtractDelete1WithHttpInfo(String body) throws ApiException {
        okhttp3.Call localVarCall = dELETEReportExtractDelete1ValidateBeforeCall(body, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Delete a Report Extract with a given code.   (asynchronously)
     *  Delete a Report Extract with a given code.  
     * @param body  reportExtractCode code of the ReportExtract  (optional)
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEReportExtractDelete1Async(String body, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETEReportExtractDelete1ValidateBeforeCall(body, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETIBaseVersion76
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETIBaseVersion76Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/version";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETIBaseVersion76ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETIBaseVersion76Call(_callback);
        return localVarCall;

    }

    /**
     *  Get version of application  
     *  Get version of application  
     * @return ActionStatus
     * @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> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus gETIBaseVersion76() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion76WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     *  Get version of application  
     *  Get version of application  
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> gETIBaseVersion76WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion76ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get version of application   (asynchronously)
     *  Get version of application  
     * @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> 0 </td><td>  Action status with version number as a message  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETIBaseVersion76Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion76ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETReportExtractExecutionHistory1
     * @param code  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  list of report extract execution detail  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractExecutionHistory1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/executionHistory";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (code != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("code", code));
        }

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETReportExtractExecutionHistory1ValidateBeforeCall(String code, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETReportExtractExecutionHistory1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Finds and returns a list of ReportExtract history for a given code.  
     *  Finds and returns a list of ReportExtract history for a given code.  
     * @param code  (optional)
     * @return ReportExtractExecutionResultsResponseDto
     * @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> 0 </td><td>  list of report extract execution detail  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractExecutionResultsResponseDto gETReportExtractExecutionHistory1(String code) throws ApiException {
        ApiResponse<ReportExtractExecutionResultsResponseDto> localVarResp = gETReportExtractExecutionHistory1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Finds and returns a list of ReportExtract history for a given code.  
     *  Finds and returns a list of ReportExtract history for a given code.  
     * @param code  (optional)
     * @return ApiResponse&lt;ReportExtractExecutionResultsResponseDto&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> 0 </td><td>  list of report extract execution detail  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractExecutionResultsResponseDto> gETReportExtractExecutionHistory1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = gETReportExtractExecutionHistory1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Finds and returns a list of ReportExtract history for a given code.   (asynchronously)
     *  Finds and returns a list of ReportExtract history for a given code.  
     * @param code  (optional)
     * @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> 0 </td><td>  list of report extract execution detail  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractExecutionHistory1Async(String code, final ApiCallback<ReportExtractExecutionResultsResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETReportExtractExecutionHistory1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETReportExtractExecutionHistoryList1
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;id&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractExecutionHistoryList1Call(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/executionHistory/list";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (query != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query));
        }

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

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

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

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

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

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETReportExtractExecutionHistoryList1ValidateBeforeCall(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETReportExtractExecutionHistoryList1Call(query, fields, offset, limit, sortBy, sortOrder, _callback);
        return localVarCall;

    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.  
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;id&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @return ReportExtractExecutionResultsResponseDto
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractExecutionResultsResponseDto gETReportExtractExecutionHistoryList1(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        ApiResponse<ReportExtractExecutionResultsResponseDto> localVarResp = gETReportExtractExecutionHistoryList1WithHttpInfo(query, fields, offset, limit, sortBy, sortOrder);
        return localVarResp.getData();
    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.  
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;id&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @return ApiResponse&lt;ReportExtractExecutionResultsResponseDto&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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractExecutionResultsResponseDto> gETReportExtractExecutionHistoryList1WithHttpInfo(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        okhttp3.Call localVarCall = gETReportExtractExecutionHistoryList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, null);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.   (asynchronously)
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;id&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractExecutionHistoryList1Async(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback<ReportExtractExecutionResultsResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETReportExtractExecutionHistoryList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETReportExtractList1
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;code&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  list of ReportExtract  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractList1Call(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/list";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (query != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query));
        }

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

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

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

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

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

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETReportExtractList1ValidateBeforeCall(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETReportExtractList1Call(query, fields, offset, limit, sortBy, sortOrder, _callback);
        return localVarCall;

    }

    /**
     *  Returns a paginated list of ReportExtract.  
     *  Returns a paginated list of ReportExtract.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;code&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @return ReportExtractsResponseDto
     * @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> 0 </td><td>  list of ReportExtract  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractsResponseDto gETReportExtractList1(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        ApiResponse<ReportExtractsResponseDto> localVarResp = gETReportExtractList1WithHttpInfo(query, fields, offset, limit, sortBy, sortOrder);
        return localVarResp.getData();
    }

    /**
     *  Returns a paginated list of ReportExtract.  
     *  Returns a paginated list of ReportExtract.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;code&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @return ApiResponse&lt;ReportExtractsResponseDto&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> 0 </td><td>  list of ReportExtract  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractsResponseDto> gETReportExtractList1WithHttpInfo(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        okhttp3.Call localVarCall = gETReportExtractList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, null);
        Type localVarReturnType = new TypeToken<ReportExtractsResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Returns a paginated list of ReportExtract.   (asynchronously)
     *  Returns a paginated list of ReportExtract.  
     * @param query  (optional)
     * @param fields  (optional)
     * @param offset  (optional)
     * @param limit  (optional)
     * @param sortBy  (optional, default to &quot;code&quot;)
     * @param sortOrder  (optional, default to DESCENDING)
     * @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> 0 </td><td>  list of ReportExtract  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractList1Async(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback<ReportExtractsResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETReportExtractList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractsResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETReportExtractSearch1
     * @param reportExtractCode  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  matched report extract  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractSearch1Call(String reportExtractCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        if (reportExtractCode != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("reportExtractCode", reportExtractCode));
        }

        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETReportExtractSearch1ValidateBeforeCall(String reportExtractCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETReportExtractSearch1Call(reportExtractCode, _callback);
        return localVarCall;

    }

    /**
     *  Search for a report extract with a given code. 
     *  Search for a report extract with a given code. 
     * @param reportExtractCode  (optional)
     * @return ReportExtractResponseDto
     * @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> 0 </td><td>  matched report extract  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractResponseDto gETReportExtractSearch1(String reportExtractCode) throws ApiException {
        ApiResponse<ReportExtractResponseDto> localVarResp = gETReportExtractSearch1WithHttpInfo(reportExtractCode);
        return localVarResp.getData();
    }

    /**
     *  Search for a report extract with a given code. 
     *  Search for a report extract with a given code. 
     * @param reportExtractCode  (optional)
     * @return ApiResponse&lt;ReportExtractResponseDto&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> 0 </td><td>  matched report extract  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractResponseDto> gETReportExtractSearch1WithHttpInfo(String reportExtractCode) throws ApiException {
        okhttp3.Call localVarCall = gETReportExtractSearch1ValidateBeforeCall(reportExtractCode, null);
        Type localVarReturnType = new TypeToken<ReportExtractResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search for a report extract with a given code.  (asynchronously)
     *  Search for a report extract with a given code. 
     * @param reportExtractCode  (optional)
     * @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> 0 </td><td>  matched report extract  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETReportExtractSearch1Async(String reportExtractCode, final ApiCallback<ReportExtractResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETReportExtractSearch1ValidateBeforeCall(reportExtractCode, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractCodeDisable1
     * @param code  (required)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCodeDisable1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/{code}/disable"
            .replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractCodeDisable1ValidateBeforeCall(String code, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'code' is set
        if (code == null) {
            throw new ApiException("Missing the required parameter 'code' when calling pOSTReportExtractCodeDisable1(Async)");
        }
        

        okhttp3.Call localVarCall = pOSTReportExtractCodeDisable1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Disable a Report extract with a given code  
     *  Disable a Report extract with a given code  
     * @param code  (required)
     * @return ActionStatus
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTReportExtractCodeDisable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTReportExtractCodeDisable1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Disable a Report extract with a given code  
     *  Disable a Report extract with a given code  
     * @param code  (required)
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTReportExtractCodeDisable1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractCodeDisable1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Disable a Report extract with a given code   (asynchronously)
     *  Disable a Report extract with a given code  
     * @param code  (required)
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCodeDisable1Async(String code, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractCodeDisable1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractCodeEnable1
     * @param code  (required)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCodeEnable1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/{code}/enable"
            .replaceAll("\\{" + "code" + "\\}", localVarApiClient.escapeString(code.toString()));

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractCodeEnable1ValidateBeforeCall(String code, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'code' is set
        if (code == null) {
            throw new ApiException("Missing the required parameter 'code' when calling pOSTReportExtractCodeEnable1(Async)");
        }
        

        okhttp3.Call localVarCall = pOSTReportExtractCodeEnable1Call(code, _callback);
        return localVarCall;

    }

    /**
     *  Enable a Report extract with a given code  
     *  Enable a Report extract with a given code  
     * @param code  (required)
     * @return ActionStatus
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTReportExtractCodeEnable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTReportExtractCodeEnable1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Enable a Report extract with a given code  
     *  Enable a Report extract with a given code  
     * @param code  (required)
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTReportExtractCodeEnable1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractCodeEnable1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Enable a Report extract with a given code   (asynchronously)
     *  Enable a Report extract with a given code  
     * @param code  (required)
     * @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> 0 </td><td>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCodeEnable1Async(String code, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractCodeEnable1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractCreate1
     * @param reportExtractDto  postData ReportExtract DTO representation    (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  status of the call    </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCreate1Call(ReportExtractDto reportExtractDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = reportExtractDto;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractCreate1ValidateBeforeCall(ReportExtractDto reportExtractDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTReportExtractCreate1Call(reportExtractDto, _callback);
        return localVarCall;

    }

    /**
     *    Creates a report extract with the given data.      
     *    Creates a report extract with the given data.      
     * @param reportExtractDto  postData ReportExtract DTO representation    (optional)
     * @return ActionStatus
     * @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> 0 </td><td>  status of the call    </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTReportExtractCreate1(ReportExtractDto reportExtractDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTReportExtractCreate1WithHttpInfo(reportExtractDto);
        return localVarResp.getData();
    }

    /**
     *    Creates a report extract with the given data.      
     *    Creates a report extract with the given data.      
     * @param reportExtractDto  postData ReportExtract DTO representation    (optional)
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  status of the call    </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTReportExtractCreate1WithHttpInfo(ReportExtractDto reportExtractDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractCreate1ValidateBeforeCall(reportExtractDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *    Creates a report extract with the given data.       (asynchronously)
     *    Creates a report extract with the given data.      
     * @param reportExtractDto  postData ReportExtract DTO representation    (optional)
     * @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> 0 </td><td>  status of the call    </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCreate1Async(ReportExtractDto reportExtractDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractCreate1ValidateBeforeCall(reportExtractDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractCreateOrUpdate1
     * @param reportExtractDto  postData ReportExtract DTO representation  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCreateOrUpdate1Call(ReportExtractDto reportExtractDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = reportExtractDto;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/createOrUpdate";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractCreateOrUpdate1ValidateBeforeCall(ReportExtractDto reportExtractDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTReportExtractCreateOrUpdate1Call(reportExtractDto, _callback);
        return localVarCall;

    }

    /**
     *  Create / update a report extract with the given data. 
     *  Create / update a report extract with the given data. 
     * @param reportExtractDto  postData ReportExtract DTO representation  (optional)
     * @return ActionStatus
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTReportExtractCreateOrUpdate1(ReportExtractDto reportExtractDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTReportExtractCreateOrUpdate1WithHttpInfo(reportExtractDto);
        return localVarResp.getData();
    }

    /**
     *  Create / update a report extract with the given data. 
     *  Create / update a report extract with the given data. 
     * @param reportExtractDto  postData ReportExtract DTO representation  (optional)
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTReportExtractCreateOrUpdate1WithHttpInfo(ReportExtractDto reportExtractDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractCreateOrUpdate1ValidateBeforeCall(reportExtractDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create / update a report extract with the given data.  (asynchronously)
     *  Create / update a report extract with the given data. 
     * @param reportExtractDto  postData ReportExtract DTO representation  (optional)
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractCreateOrUpdate1Async(ReportExtractDto reportExtractDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractCreateOrUpdate1ValidateBeforeCall(reportExtractDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractExecutionHistoryList1
     * @param pagingAndFiltering  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractExecutionHistoryList1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/executionHistory/list";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractExecutionHistoryList1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTReportExtractExecutionHistoryList1Call(pagingAndFiltering, _callback);
        return localVarCall;

    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.  
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param pagingAndFiltering  (optional)
     * @return ReportExtractExecutionResultsResponseDto
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractExecutionResultsResponseDto pOSTReportExtractExecutionHistoryList1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<ReportExtractExecutionResultsResponseDto> localVarResp = pOSTReportExtractExecutionHistoryList1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.  
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param pagingAndFiltering  (optional)
     * @return ApiResponse&lt;ReportExtractExecutionResultsResponseDto&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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractExecutionResultsResponseDto> pOSTReportExtractExecutionHistoryList1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractExecutionHistoryList1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Returns a list of filtered and paginated report extract execution history.   (asynchronously)
     *  Returns a list of filtered and paginated report extract execution history.  
     * @param pagingAndFiltering  (optional)
     * @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> 0 </td><td>  list of ReportExtract run history  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractExecutionHistoryList1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<ReportExtractExecutionResultsResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractExecutionHistoryList1ValidateBeforeCall(pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultsResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTReportExtractRun1
     * @param runReportExtractDto  (optional)
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractRun1Call(RunReportExtractDto runReportExtractDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = runReportExtractDto;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/run";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTReportExtractRun1ValidateBeforeCall(RunReportExtractDto runReportExtractDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTReportExtractRun1Call(runReportExtractDto, _callback);
        return localVarCall;

    }

    /**
     *  Runs a report extract with the given parameter. 
     *  Runs a report extract with the given parameter. 
     * @param runReportExtractDto  (optional)
     * @return ReportExtractExecutionResultResponseDto
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ReportExtractExecutionResultResponseDto pOSTReportExtractRun1(RunReportExtractDto runReportExtractDto) throws ApiException {
        ApiResponse<ReportExtractExecutionResultResponseDto> localVarResp = pOSTReportExtractRun1WithHttpInfo(runReportExtractDto);
        return localVarResp.getData();
    }

    /**
     *  Runs a report extract with the given parameter. 
     *  Runs a report extract with the given parameter. 
     * @param runReportExtractDto  (optional)
     * @return ApiResponse&lt;ReportExtractExecutionResultResponseDto&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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ReportExtractExecutionResultResponseDto> pOSTReportExtractRun1WithHttpInfo(RunReportExtractDto runReportExtractDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTReportExtractRun1ValidateBeforeCall(runReportExtractDto, null);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Runs a report extract with the given parameter.  (asynchronously)
     *  Runs a report extract with the given parameter. 
     * @param runReportExtractDto  (optional)
     * @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> 0 </td><td>  status of the call  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTReportExtractRun1Async(RunReportExtractDto runReportExtractDto, final ApiCallback<ReportExtractExecutionResultResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTReportExtractRun1ValidateBeforeCall(runReportExtractDto, _callback);
        Type localVarReturnType = new TypeToken<ReportExtractExecutionResultResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for user49
     * @param _callback Callback for upload/download progress
     * @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> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call user49Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/finance/reportExtracts/user";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

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

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

    @SuppressWarnings("rawtypes")
    private okhttp3.Call user49ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = user49Call(_callback);
        return localVarCall;

    }

    /**
     * 
     * 
     * @return ActionStatus
     * @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> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus user49() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user49WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     * 
     * 
     * @return ApiResponse&lt;ActionStatus&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> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> user49WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user49ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  (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> 0 </td><td> default response </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call user49Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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