/*
 * 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.BillingAccountDto;
import org.openapitools.client.model.BillingAccountsResponseDto;
import org.openapitools.client.model.GetBillingAccountResponseDto;
import org.openapitools.client.model.GetCountersInstancesResponseDto;
import org.threeten.bp.OffsetDateTime;

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

public class BillingAccountApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETEBillingAccountBillingAccountCode1
     * @param billingAccountCode  billingAccountCode Billing account 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 dELETEBillingAccountBillingAccountCode1Call(String billingAccountCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount/{billingAccountCode}"
            .replaceAll("\\{" + "billingAccountCode" + "\\}", localVarApiClient.escapeString(billingAccountCode.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

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

        okhttp3.Call localVarCall = dELETEBillingAccountBillingAccountCode1Call(billingAccountCode, _callback);
        return localVarCall;

    }

    /**
     *  Remove a billing account with a Billing Account Code. 
     *  Remove a billing account with a Billing Account Code. 
     * @param billingAccountCode  billingAccountCode Billing account 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 dELETEBillingAccountBillingAccountCode1(String billingAccountCode) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEBillingAccountBillingAccountCode1WithHttpInfo(billingAccountCode);
        return localVarResp.getData();
    }

    /**
     *  Remove a billing account with a Billing Account Code. 
     *  Remove a billing account with a Billing Account Code. 
     * @param billingAccountCode  billingAccountCode Billing account 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> dELETEBillingAccountBillingAccountCode1WithHttpInfo(String billingAccountCode) throws ApiException {
        okhttp3.Call localVarCall = dELETEBillingAccountBillingAccountCode1ValidateBeforeCall(billingAccountCode, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove a billing account with a Billing Account Code.  (asynchronously)
     *  Remove a billing account with a Billing Account Code. 
     * @param billingAccountCode  billingAccountCode Billing account 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 dELETEBillingAccountBillingAccountCode1Async(String billingAccountCode, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETEBillingAccountBillingAccountCode1ValidateBeforeCall(billingAccountCode, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETBillingAccountFilterCountersByPeriod1
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param date  date Date  (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 counter instances.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountFilterCountersByPeriod1Call(String billingAccountCode, OffsetDateTime date, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount/filterCountersByPeriod";

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

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

        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 gETBillingAccountFilterCountersByPeriod1ValidateBeforeCall(String billingAccountCode, OffsetDateTime date, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETBillingAccountFilterCountersByPeriod1Call(billingAccountCode, date, _callback);
        return localVarCall;

    }

    /**
     *  filter counters by period date. 
     *  filter counters by period date. 
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param date  date Date  (optional)
     * @return GetCountersInstancesResponseDto
     * @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 counter instances.  </td><td>  -  </td></tr>
     </table>
     */
    public GetCountersInstancesResponseDto gETBillingAccountFilterCountersByPeriod1(String billingAccountCode, OffsetDateTime date) throws ApiException {
        ApiResponse<GetCountersInstancesResponseDto> localVarResp = gETBillingAccountFilterCountersByPeriod1WithHttpInfo(billingAccountCode, date);
        return localVarResp.getData();
    }

    /**
     *  filter counters by period date. 
     *  filter counters by period date. 
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param date  date Date  (optional)
     * @return ApiResponse&lt;GetCountersInstancesResponseDto&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 counter instances.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetCountersInstancesResponseDto> gETBillingAccountFilterCountersByPeriod1WithHttpInfo(String billingAccountCode, OffsetDateTime date) throws ApiException {
        okhttp3.Call localVarCall = gETBillingAccountFilterCountersByPeriod1ValidateBeforeCall(billingAccountCode, date, null);
        Type localVarReturnType = new TypeToken<GetCountersInstancesResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  filter counters by period date.  (asynchronously)
     *  filter counters by period date. 
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param date  date Date  (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 counter instances.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountFilterCountersByPeriod1Async(String billingAccountCode, OffsetDateTime date, final ApiCallback<GetCountersInstancesResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETBillingAccountFilterCountersByPeriod1ValidateBeforeCall(billingAccountCode, date, _callback);
        Type localVarReturnType = new TypeToken<GetCountersInstancesResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETBillingAccountList1
     * @param customerAccountCode  customerAccountCode Customer account 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 billing account  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountList1Call(String customerAccountCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount/list";

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

        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 gETBillingAccountList1ValidateBeforeCall(String customerAccountCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETBillingAccountList1Call(customerAccountCode, _callback);
        return localVarCall;

    }

    /**
     *  List BillingAccount filter by customerAccountCode.  
     *  List BillingAccount filter by customerAccountCode.  
     * @param customerAccountCode  customerAccountCode Customer account code  (optional)
     * @return BillingAccountsResponseDto
     * @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 billing account  </td><td>  -  </td></tr>
     </table>
     */
    public BillingAccountsResponseDto gETBillingAccountList1(String customerAccountCode) throws ApiException {
        ApiResponse<BillingAccountsResponseDto> localVarResp = gETBillingAccountList1WithHttpInfo(customerAccountCode);
        return localVarResp.getData();
    }

    /**
     *  List BillingAccount filter by customerAccountCode.  
     *  List BillingAccount filter by customerAccountCode.  
     * @param customerAccountCode  customerAccountCode Customer account code  (optional)
     * @return ApiResponse&lt;BillingAccountsResponseDto&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 billing account  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<BillingAccountsResponseDto> gETBillingAccountList1WithHttpInfo(String customerAccountCode) throws ApiException {
        okhttp3.Call localVarCall = gETBillingAccountList1ValidateBeforeCall(customerAccountCode, null);
        Type localVarReturnType = new TypeToken<BillingAccountsResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List BillingAccount filter by customerAccountCode.   (asynchronously)
     *  List BillingAccount filter by customerAccountCode.  
     * @param customerAccountCode  customerAccountCode Customer account 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 billing account  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountList1Async(String customerAccountCode, final ApiCallback<BillingAccountsResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETBillingAccountList1ValidateBeforeCall(customerAccountCode, _callback);
        Type localVarReturnType = new TypeToken<BillingAccountsResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETBillingAccountSearch1
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param inheritCF  inheritCF Should inherited custom fields be retrieved. Defaults to INHERIT_NO_MERGE.  (optional, default to INHERIT_NO_MERGE)
     * @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>  Billing account  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountSearch1Call(String billingAccountCode, String inheritCF, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount";

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

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

        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 gETBillingAccountSearch1ValidateBeforeCall(String billingAccountCode, String inheritCF, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETBillingAccountSearch1Call(billingAccountCode, inheritCF, _callback);
        return localVarCall;

    }

    /**
     *  Search for a billing account with a given code.  
     *  Search for a billing account with a given code.  
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param inheritCF  inheritCF Should inherited custom fields be retrieved. Defaults to INHERIT_NO_MERGE.  (optional, default to INHERIT_NO_MERGE)
     * @return GetBillingAccountResponseDto
     * @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>  Billing account  </td><td>  -  </td></tr>
     </table>
     */
    public GetBillingAccountResponseDto gETBillingAccountSearch1(String billingAccountCode, String inheritCF) throws ApiException {
        ApiResponse<GetBillingAccountResponseDto> localVarResp = gETBillingAccountSearch1WithHttpInfo(billingAccountCode, inheritCF);
        return localVarResp.getData();
    }

    /**
     *  Search for a billing account with a given code.  
     *  Search for a billing account with a given code.  
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param inheritCF  inheritCF Should inherited custom fields be retrieved. Defaults to INHERIT_NO_MERGE.  (optional, default to INHERIT_NO_MERGE)
     * @return ApiResponse&lt;GetBillingAccountResponseDto&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>  Billing account  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetBillingAccountResponseDto> gETBillingAccountSearch1WithHttpInfo(String billingAccountCode, String inheritCF) throws ApiException {
        okhttp3.Call localVarCall = gETBillingAccountSearch1ValidateBeforeCall(billingAccountCode, inheritCF, null);
        Type localVarReturnType = new TypeToken<GetBillingAccountResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search for a billing account with a given code.   (asynchronously)
     *  Search for a billing account with a given code.  
     * @param billingAccountCode  billingAccountCode Billing account code  (optional)
     * @param inheritCF  inheritCF Should inherited custom fields be retrieved. Defaults to INHERIT_NO_MERGE.  (optional, default to INHERIT_NO_MERGE)
     * @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>  Billing account  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETBillingAccountSearch1Async(String billingAccountCode, String inheritCF, final ApiCallback<GetBillingAccountResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETBillingAccountSearch1ValidateBeforeCall(billingAccountCode, inheritCF, _callback);
        Type localVarReturnType = new TypeToken<GetBillingAccountResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETIBaseVersion27
     * @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 gETIBaseVersion27Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount/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 gETIBaseVersion27ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETIBaseVersion27Call(_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 gETIBaseVersion27() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion27WithHttpInfo();
        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> gETIBaseVersion27WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion27ValidateBeforeCall(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 gETIBaseVersion27Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion27ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTBillingAccountCreate1
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTBillingAccountCreate1Call(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = billingAccountDto;

        // create path and map variables
        String localVarPath = "/account/billingAccount";

        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 pOSTBillingAccountCreate1ValidateBeforeCall(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTBillingAccountCreate1Call(billingAccountDto, _callback);
        return localVarCall;

    }

    /**
     *  Create a new billing account.  
     *  Create a new billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTBillingAccountCreate1(BillingAccountDto billingAccountDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTBillingAccountCreate1WithHttpInfo(billingAccountDto);
        return localVarResp.getData();
    }

    /**
     *  Create a new billing account.  
     *  Create a new billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTBillingAccountCreate1WithHttpInfo(BillingAccountDto billingAccountDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTBillingAccountCreate1ValidateBeforeCall(billingAccountDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create a new billing account.   (asynchronously)
     *  Create a new billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTBillingAccountCreate1Async(BillingAccountDto billingAccountDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTBillingAccountCreate1ValidateBeforeCall(billingAccountDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTBillingAccountCreateOrUpdate1
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTBillingAccountCreateOrUpdate1Call(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = billingAccountDto;

        // create path and map variables
        String localVarPath = "/account/billingAccount/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 pOSTBillingAccountCreateOrUpdate1ValidateBeforeCall(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTBillingAccountCreateOrUpdate1Call(billingAccountDto, _callback);
        return localVarCall;

    }

    /**
     *  Create or update Billing Account based on code.  
     *  Create or update Billing Account based on code.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTBillingAccountCreateOrUpdate1(BillingAccountDto billingAccountDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTBillingAccountCreateOrUpdate1WithHttpInfo(billingAccountDto);
        return localVarResp.getData();
    }

    /**
     *  Create or update Billing Account based on code.  
     *  Create or update Billing Account based on code.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTBillingAccountCreateOrUpdate1WithHttpInfo(BillingAccountDto billingAccountDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTBillingAccountCreateOrUpdate1ValidateBeforeCall(billingAccountDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create or update Billing Account based on code.   (asynchronously)
     *  Create or update Billing Account based on code.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTBillingAccountCreateOrUpdate1Async(BillingAccountDto billingAccountDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTBillingAccountCreateOrUpdate1ValidateBeforeCall(billingAccountDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTBillingAccountUpdate1
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTBillingAccountUpdate1Call(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = billingAccountDto;

        // create path and map variables
        String localVarPath = "/account/billingAccount";

        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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pUTBillingAccountUpdate1ValidateBeforeCall(BillingAccountDto billingAccountDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTBillingAccountUpdate1Call(billingAccountDto, _callback);
        return localVarCall;

    }

    /**
     *  Update existing billing account.  
     *  Update existing billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTBillingAccountUpdate1(BillingAccountDto billingAccountDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTBillingAccountUpdate1WithHttpInfo(billingAccountDto);
        return localVarResp.getData();
    }

    /**
     *  Update existing billing account.  
     *  Update existing billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTBillingAccountUpdate1WithHttpInfo(BillingAccountDto billingAccountDto) throws ApiException {
        okhttp3.Call localVarCall = pUTBillingAccountUpdate1ValidateBeforeCall(billingAccountDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update existing billing account.   (asynchronously)
     *  Update existing billing account.  
     * @param billingAccountDto  postData Billing account data  (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>  Request processing status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTBillingAccountUpdate1Async(BillingAccountDto billingAccountDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pUTBillingAccountUpdate1ValidateBeforeCall(billingAccountDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for user2
     * @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 user2Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/account/billingAccount/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 user2ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = user2Call(_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 user2() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user2WithHttpInfo();
        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> user2WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user2ValidateBeforeCall(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 user2Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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