/*
 * 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.AccountingCodeDto;
import org.openapitools.client.model.AccountingCodeGetResponseDto;
import org.openapitools.client.model.AccountingCodeListResponseDto;
import org.openapitools.client.model.ActionStatus;
import org.openapitools.client.model.PagingAndFiltering;

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

public class AccountingCodeApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETEAccountingCodeAccountingCode1
     * @param accountingCode  accountingCode the string to search  (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 dELETEAccountingCodeAccountingCode1Call(String accountingCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/{accountingCode}"
            .replaceAll("\\{" + "accountingCode" + "\\}", localVarApiClient.escapeString(accountingCode.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 dELETEAccountingCodeAccountingCode1ValidateBeforeCall(String accountingCode, final ApiCallback _callback) throws ApiException {
        
        // verify the required parameter 'accountingCode' is set
        if (accountingCode == null) {
            throw new ApiException("Missing the required parameter 'accountingCode' when calling dELETEAccountingCodeAccountingCode1(Async)");
        }
        

        okhttp3.Call localVarCall = dELETEAccountingCodeAccountingCode1Call(accountingCode, _callback);
        return localVarCall;

    }

    /**
     *  Removes an AccountingCode entity.  
     *  Removes an AccountingCode entity.  
     * @param accountingCode  accountingCode the string to search  (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 dELETEAccountingCodeAccountingCode1(String accountingCode) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEAccountingCodeAccountingCode1WithHttpInfo(accountingCode);
        return localVarResp.getData();
    }

    /**
     *  Removes an AccountingCode entity.  
     *  Removes an AccountingCode entity.  
     * @param accountingCode  accountingCode the string to search  (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> dELETEAccountingCodeAccountingCode1WithHttpInfo(String accountingCode) throws ApiException {
        okhttp3.Call localVarCall = dELETEAccountingCodeAccountingCode1ValidateBeforeCall(accountingCode, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Removes an AccountingCode entity.   (asynchronously)
     *  Removes an AccountingCode entity.  
     * @param accountingCode  accountingCode the string to search  (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 dELETEAccountingCodeAccountingCode1Async(String accountingCode, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETEAccountingCodeAccountingCode1ValidateBeforeCall(accountingCode, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETAccountingCodeList1
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETAccountingCodeList1Call(Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/list";

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        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 gETAccountingCodeList1ValidateBeforeCall(Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETAccountingCodeList1Call(offset, limit, sortBy, sortOrder, _callback);
        return localVarCall;

    }

    /**
     *  List AccountingCode matching the given criteria.  
     *  List AccountingCode matching the given criteria.  
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return AccountingCodeListResponseDto
     * @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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public AccountingCodeListResponseDto gETAccountingCodeList1(Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        ApiResponse<AccountingCodeListResponseDto> localVarResp = gETAccountingCodeList1WithHttpInfo(offset, limit, sortBy, sortOrder);
        return localVarResp.getData();
    }

    /**
     *  List AccountingCode matching the given criteria.  
     *  List AccountingCode matching the given criteria.  
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @return ApiResponse&lt;AccountingCodeListResponseDto&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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<AccountingCodeListResponseDto> gETAccountingCodeList1WithHttpInfo(Integer offset, Integer limit, String sortBy, String sortOrder) throws ApiException {
        okhttp3.Call localVarCall = gETAccountingCodeList1ValidateBeforeCall(offset, limit, sortBy, sortOrder, null);
        Type localVarReturnType = new TypeToken<AccountingCodeListResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List AccountingCode matching the given criteria.   (asynchronously)
     *  List AccountingCode matching the given criteria.  
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETAccountingCodeList1Async(Integer offset, Integer limit, String sortBy, String sortOrder, final ApiCallback<AccountingCodeListResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETAccountingCodeList1ValidateBeforeCall(offset, limit, sortBy, sortOrder, _callback);
        Type localVarReturnType = new TypeToken<AccountingCodeListResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETAccountingCodeSearch1
     * @param accountingCode  accountingCode the string to search  (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 gETAccountingCodeSearch1Call(String accountingCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/billing/accountingCode";

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

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

        okhttp3.Call localVarCall = gETAccountingCodeSearch1Call(accountingCode, _callback);
        return localVarCall;

    }

    /**
     *  Finds an AccountingCode.  
     *  Finds an AccountingCode.  
     * @param accountingCode  accountingCode the string to search  (optional)
     * @return AccountingCodeGetResponseDto
     * @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 AccountingCodeGetResponseDto gETAccountingCodeSearch1(String accountingCode) throws ApiException {
        ApiResponse<AccountingCodeGetResponseDto> localVarResp = gETAccountingCodeSearch1WithHttpInfo(accountingCode);
        return localVarResp.getData();
    }

    /**
     *  Finds an AccountingCode.  
     *  Finds an AccountingCode.  
     * @param accountingCode  accountingCode the string to search  (optional)
     * @return ApiResponse&lt;AccountingCodeGetResponseDto&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<AccountingCodeGetResponseDto> gETAccountingCodeSearch1WithHttpInfo(String accountingCode) throws ApiException {
        okhttp3.Call localVarCall = gETAccountingCodeSearch1ValidateBeforeCall(accountingCode, null);
        Type localVarReturnType = new TypeToken<AccountingCodeGetResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Finds an AccountingCode.   (asynchronously)
     *  Finds an AccountingCode.  
     * @param accountingCode  accountingCode the string to search  (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 gETAccountingCodeSearch1Async(String accountingCode, final ApiCallback<AccountingCodeGetResponseDto> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion43Call(_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 gETIBaseVersion43() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion43WithHttpInfo();
        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> gETIBaseVersion43WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion43ValidateBeforeCall(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 gETIBaseVersion43Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion43ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTAccountingCodeCodeDisable1
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeDisable1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/{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 pOSTAccountingCodeCodeDisable1ValidateBeforeCall(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 pOSTAccountingCodeCodeDisable1(Async)");
        }
        

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

    }

    /**
     *  Disable a Accounting code with a given code  
     *  Disable a Accounting code with a given code  
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeDisable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTAccountingCodeCodeDisable1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Disable a Accounting code with a given code  
     *  Disable a Accounting code with a given code  
     * @param code  code Accounting code 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> pOSTAccountingCodeCodeDisable1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = pOSTAccountingCodeCodeDisable1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Disable a Accounting code with a given code   (asynchronously)
     *  Disable a Accounting code with a given code  
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeDisable1Async(String code, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTAccountingCodeCodeDisable1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTAccountingCodeCodeEnable1
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeEnable1Call(String code, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/{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 pOSTAccountingCodeCodeEnable1ValidateBeforeCall(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 pOSTAccountingCodeCodeEnable1(Async)");
        }
        

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

    }

    /**
     *  Enable a Accounting code with a given code  
     *  Enable a Accounting code with a given code  
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeEnable1(String code) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTAccountingCodeCodeEnable1WithHttpInfo(code);
        return localVarResp.getData();
    }

    /**
     *  Enable a Accounting code with a given code  
     *  Enable a Accounting code with a given code  
     * @param code  code Accounting code 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> pOSTAccountingCodeCodeEnable1WithHttpInfo(String code) throws ApiException {
        okhttp3.Call localVarCall = pOSTAccountingCodeCodeEnable1ValidateBeforeCall(code, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Enable a Accounting code with a given code   (asynchronously)
     *  Enable a Accounting code with a given code  
     * @param code  code Accounting code 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 pOSTAccountingCodeCodeEnable1Async(String code, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTAccountingCodeCodeEnable1ValidateBeforeCall(code, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTAccountingCodeCreate1
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreate1Call(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = accountingCodeDto;

        // create path and map variables
        String localVarPath = "/billing/accountingCode";

        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 pOSTAccountingCodeCreate1ValidateBeforeCall(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTAccountingCodeCreate1Call(accountingCodeDto, _callback);
        return localVarCall;

    }

    /**
     *  Creates a new AccountingCode.  
     *  Creates a new AccountingCode.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreate1(AccountingCodeDto accountingCodeDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTAccountingCodeCreate1WithHttpInfo(accountingCodeDto);
        return localVarResp.getData();
    }

    /**
     *  Creates a new AccountingCode.  
     *  Creates a new AccountingCode.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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> pOSTAccountingCodeCreate1WithHttpInfo(AccountingCodeDto accountingCodeDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTAccountingCodeCreate1ValidateBeforeCall(accountingCodeDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Creates a new AccountingCode.   (asynchronously)
     *  Creates a new AccountingCode.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreate1Async(AccountingCodeDto accountingCodeDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTAccountingCodeCreate1ValidateBeforeCall(accountingCodeDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTAccountingCodeCreateOrUpdate1
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreateOrUpdate1Call(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = accountingCodeDto;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/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 pOSTAccountingCodeCreateOrUpdate1ValidateBeforeCall(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTAccountingCodeCreateOrUpdate1Call(accountingCodeDto, _callback);
        return localVarCall;

    }

    /**
     *  Create or update an AccountingCode. Checks if the code already exists.  
     *  Create or update an AccountingCode. Checks if the code already exists.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreateOrUpdate1(AccountingCodeDto accountingCodeDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTAccountingCodeCreateOrUpdate1WithHttpInfo(accountingCodeDto);
        return localVarResp.getData();
    }

    /**
     *  Create or update an AccountingCode. Checks if the code already exists.  
     *  Create or update an AccountingCode. Checks if the code already exists.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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> pOSTAccountingCodeCreateOrUpdate1WithHttpInfo(AccountingCodeDto accountingCodeDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTAccountingCodeCreateOrUpdate1ValidateBeforeCall(accountingCodeDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create or update an AccountingCode. Checks if the code already exists.   (asynchronously)
     *  Create or update an AccountingCode. Checks if the code already exists.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pOSTAccountingCodeCreateOrUpdate1Async(AccountingCodeDto accountingCodeDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTAccountingCodeCreateOrUpdate1ValidateBeforeCall(accountingCodeDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTAccountingCodeList1
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTAccountingCodeList1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

        // create path and map variables
        String localVarPath = "/billing/accountingCode/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 pOSTAccountingCodeList1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  List AccountingCode matching the given criteria.  
     *  List AccountingCode matching the given criteria.  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (optional)
     * @return AccountingCodeListResponseDto
     * @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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public AccountingCodeListResponseDto pOSTAccountingCodeList1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<AccountingCodeListResponseDto> localVarResp = pOSTAccountingCodeList1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  List AccountingCode matching the given criteria.  
     *  List AccountingCode matching the given criteria.  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (optional)
     * @return ApiResponse&lt;AccountingCodeListResponseDto&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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<AccountingCodeListResponseDto> pOSTAccountingCodeList1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTAccountingCodeList1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<AccountingCodeListResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List AccountingCode matching the given criteria.   (asynchronously)
     *  List AccountingCode matching the given criteria.  
     * @param pagingAndFiltering  pagingAndFiltering Pagination and filtering criteria  (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 AccountingCode  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTAccountingCodeList1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<AccountingCodeListResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTAccountingCodeList1ValidateBeforeCall(pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<AccountingCodeListResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTAccountingCodeUpdate1
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pUTAccountingCodeUpdate1Call(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = accountingCodeDto;

        // create path and map variables
        String localVarPath = "/billing/accountingCode";

        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 pUTAccountingCodeUpdate1ValidateBeforeCall(AccountingCodeDto accountingCodeDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTAccountingCodeUpdate1Call(accountingCodeDto, _callback);
        return localVarCall;

    }

    /**
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.  
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pUTAccountingCodeUpdate1(AccountingCodeDto accountingCodeDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTAccountingCodeUpdate1WithHttpInfo(accountingCodeDto);
        return localVarResp.getData();
    }

    /**
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.  
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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> pUTAccountingCodeUpdate1WithHttpInfo(AccountingCodeDto accountingCodeDto) throws ApiException {
        okhttp3.Call localVarCall = pUTAccountingCodeUpdate1ValidateBeforeCall(accountingCodeDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.   (asynchronously)
     *  Updates AccountingCode. An existing AccountingCode is search using the code field.  
     * @param accountingCodeDto  postData object representation of AccountingCode  (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 pUTAccountingCodeUpdate1Async(AccountingCodeDto accountingCodeDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user12Call(_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 user12() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user12WithHttpInfo();
        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> user12WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user12ValidateBeforeCall(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 user12Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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