/*
 * 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.GetInvoiceSequenceResponse;
import org.openapitools.client.model.GetInvoiceSequencesResponse;
import org.openapitools.client.model.InvoiceSequenceDto;

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

public class InvoiceSequenceApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for gETIBaseVersion8
     * @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 gETIBaseVersion8Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

        okhttp3.Call localVarCall = gETIBaseVersion8Call(_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 gETIBaseVersion8() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion8WithHttpInfo();
        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> gETIBaseVersion8WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion8ValidateBeforeCall(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 gETIBaseVersion8Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion8ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETInvoiceSequenceList1
     * @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>  A list of invoiceSequence  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSequenceList1Call(final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/invoiceSequence/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 = {
            
        };
        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 gETInvoiceSequenceList1ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  List of invoiceSequence.  
     *  List of invoiceSequence.  
     * @return GetInvoiceSequencesResponse
     * @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>  A list of invoiceSequence  </td><td>  -  </td></tr>
     </table>
     */
    public GetInvoiceSequencesResponse gETInvoiceSequenceList1() throws ApiException {
        ApiResponse<GetInvoiceSequencesResponse> localVarResp = gETInvoiceSequenceList1WithHttpInfo();
        return localVarResp.getData();
    }

    /**
     *  List of invoiceSequence.  
     *  List of invoiceSequence.  
     * @return ApiResponse&lt;GetInvoiceSequencesResponse&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>  A list of invoiceSequence  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetInvoiceSequencesResponse> gETInvoiceSequenceList1WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETInvoiceSequenceList1ValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<GetInvoiceSequencesResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  List of invoiceSequence.   (asynchronously)
     *  List of invoiceSequence.  
     * @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>  A list of invoiceSequence  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSequenceList1Async(final ApiCallback<GetInvoiceSequencesResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETInvoiceSequenceList1ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<GetInvoiceSequencesResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETInvoiceSequenceSearch1
     * @param invoiceSequenceCode  invoiceSequenceCode invoice type&#39;s 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>  invoice sequence  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSequenceSearch1Call(String invoiceSequenceCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/invoiceSequence";

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

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

        okhttp3.Call localVarCall = gETInvoiceSequenceSearch1Call(invoiceSequenceCode, _callback);
        return localVarCall;

    }

    /**
     *  Search invoiceSequence with a given code.  
     *  Search invoiceSequence with a given code.  
     * @param invoiceSequenceCode  invoiceSequenceCode invoice type&#39;s code  (optional)
     * @return GetInvoiceSequenceResponse
     * @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>  invoice sequence  </td><td>  -  </td></tr>
     </table>
     */
    public GetInvoiceSequenceResponse gETInvoiceSequenceSearch1(String invoiceSequenceCode) throws ApiException {
        ApiResponse<GetInvoiceSequenceResponse> localVarResp = gETInvoiceSequenceSearch1WithHttpInfo(invoiceSequenceCode);
        return localVarResp.getData();
    }

    /**
     *  Search invoiceSequence with a given code.  
     *  Search invoiceSequence with a given code.  
     * @param invoiceSequenceCode  invoiceSequenceCode invoice type&#39;s code  (optional)
     * @return ApiResponse&lt;GetInvoiceSequenceResponse&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>  invoice sequence  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetInvoiceSequenceResponse> gETInvoiceSequenceSearch1WithHttpInfo(String invoiceSequenceCode) throws ApiException {
        okhttp3.Call localVarCall = gETInvoiceSequenceSearch1ValidateBeforeCall(invoiceSequenceCode, null);
        Type localVarReturnType = new TypeToken<GetInvoiceSequenceResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search invoiceSequence with a given code.   (asynchronously)
     *  Search invoiceSequence with a given code.  
     * @param invoiceSequenceCode  invoiceSequenceCode invoice type&#39;s 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>  invoice sequence  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSequenceSearch1Async(String invoiceSequenceCode, final ApiCallback<GetInvoiceSequenceResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETInvoiceSequenceSearch1ValidateBeforeCall(invoiceSequenceCode, _callback);
        Type localVarReturnType = new TypeToken<GetInvoiceSequenceResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTInvoiceSequenceCreate1
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be created  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTInvoiceSequenceCreate1Call(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSequenceDto;

        // create path and map variables
        String localVarPath = "/invoiceSequence";

        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 pOSTInvoiceSequenceCreate1ValidateBeforeCall(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreate1Call(invoiceSequenceDto, _callback);
        return localVarCall;

    }

    /**
     *  Create invoiceSequence.  
     *  Create invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be created  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTInvoiceSequenceCreate1(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTInvoiceSequenceCreate1WithHttpInfo(invoiceSequenceDto);
        return localVarResp.getData();
    }

    /**
     *  Create invoiceSequence.  
     *  Create invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be created  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTInvoiceSequenceCreate1WithHttpInfo(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreate1ValidateBeforeCall(invoiceSequenceDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create invoiceSequence.   (asynchronously)
     *  Create invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be created  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTInvoiceSequenceCreate1Async(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreate1ValidateBeforeCall(invoiceSequenceDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTInvoiceSequenceCreateOrUpdate1
     * @param invoiceSequenceDto  invoiceSequenceDto The invoiceSequence&#39;s 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 pOSTInvoiceSequenceCreateOrUpdate1Call(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSequenceDto;

        // create path and map variables
        String localVarPath = "/invoiceSequence/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 pOSTInvoiceSequenceCreateOrUpdate1ValidateBeforeCall(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreateOrUpdate1Call(invoiceSequenceDto, _callback);
        return localVarCall;

    }

    /**
     *  Create new or update an existing invoiceSequence with a given code.  
     *  Create new or update an existing invoiceSequence with a given code.  
     * @param invoiceSequenceDto  invoiceSequenceDto The invoiceSequence&#39;s 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 pOSTInvoiceSequenceCreateOrUpdate1(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTInvoiceSequenceCreateOrUpdate1WithHttpInfo(invoiceSequenceDto);
        return localVarResp.getData();
    }

    /**
     *  Create new or update an existing invoiceSequence with a given code.  
     *  Create new or update an existing invoiceSequence with a given code.  
     * @param invoiceSequenceDto  invoiceSequenceDto The invoiceSequence&#39;s 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> pOSTInvoiceSequenceCreateOrUpdate1WithHttpInfo(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreateOrUpdate1ValidateBeforeCall(invoiceSequenceDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create new or update an existing invoiceSequence with a given code.   (asynchronously)
     *  Create new or update an existing invoiceSequence with a given code.  
     * @param invoiceSequenceDto  invoiceSequenceDto The invoiceSequence&#39;s 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 pOSTInvoiceSequenceCreateOrUpdate1Async(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTInvoiceSequenceCreateOrUpdate1ValidateBeforeCall(invoiceSequenceDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTInvoiceSequenceUpdate1
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be updated  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTInvoiceSequenceUpdate1Call(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSequenceDto;

        // create path and map variables
        String localVarPath = "/invoiceSequence";

        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 pUTInvoiceSequenceUpdate1ValidateBeforeCall(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTInvoiceSequenceUpdate1Call(invoiceSequenceDto, _callback);
        return localVarCall;

    }

    /**
     *  Update invoiceSequence.  
     *  Update invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be updated  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pUTInvoiceSequenceUpdate1(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTInvoiceSequenceUpdate1WithHttpInfo(invoiceSequenceDto);
        return localVarResp.getData();
    }

    /**
     *  Update invoiceSequence.  
     *  Update invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be updated  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pUTInvoiceSequenceUpdate1WithHttpInfo(InvoiceSequenceDto invoiceSequenceDto) throws ApiException {
        okhttp3.Call localVarCall = pUTInvoiceSequenceUpdate1ValidateBeforeCall(invoiceSequenceDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update invoiceSequence.   (asynchronously)
     *  Update invoiceSequence.  
     * @param invoiceSequenceDto  invoiceSequenceDto invoice Sequence to be updated  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pUTInvoiceSequenceUpdate1Async(InvoiceSequenceDto invoiceSequenceDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user61Call(_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 user61() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user61WithHttpInfo();
        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> user61WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user61ValidateBeforeCall(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 user61Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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