/*
 * 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.GetInvoiceSubCategoryCountryResponse;
import org.openapitools.client.model.InvoiceSubCategoryCountryDto;

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

public class InvoiceSubCategoryCountryApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param country  buyerCountryCode Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1Call(String invoiceSubCategoryCode, String country, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

        okhttp3.Call localVarCall = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1Call(invoiceSubCategoryCode, country, _callback);
        return localVarCall;

    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null. 
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null. 
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param country  buyerCountryCode Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1(String invoiceSubCategoryCode, String country) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1WithHttpInfo(invoiceSubCategoryCode, country);
        return localVarResp.getData();
    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null. 
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null. 
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param country  buyerCountryCode Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1WithHttpInfo(String invoiceSubCategoryCode, String country) throws ApiException {
        okhttp3.Call localVarCall = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1ValidateBeforeCall(invoiceSubCategoryCode, country, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null.  (asynchronously)
     *  Remove all the InvoiceSubCategoryCountries with a given code and country and the sellerCountry is null. 
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param country  buyerCountryCode Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1Async(String invoiceSubCategoryCode, String country, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeCountry1ValidateBeforeCall(invoiceSubCategoryCode, country, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (required)
     * @param country  country Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1Call(String invoiceSubCategoryCode, String sellersCountry, String country, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

        okhttp3.Call localVarCall = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1Call(invoiceSubCategoryCode, sellersCountry, country, _callback);
        return localVarCall;

    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.  
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (required)
     * @param country  country Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1(String invoiceSubCategoryCode, String sellersCountry, String country) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1WithHttpInfo(invoiceSubCategoryCode, sellersCountry, country);
        return localVarResp.getData();
    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.  
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (required)
     * @param country  country Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1WithHttpInfo(String invoiceSubCategoryCode, String sellersCountry, String country) throws ApiException {
        okhttp3.Call localVarCall = dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1ValidateBeforeCall(invoiceSubCategoryCode, sellersCountry, country, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.   (asynchronously)
     *  Remove all the InvoiceSubCategoryCountries with a given code and country.  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (required)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (required)
     * @param country  country Buyer&#39;s country  (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>  action status  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call dELETEInvoiceSubCategoryCountryInvoiceSubCategoryCodeSellersCountryCountry1Async(String invoiceSubCategoryCode, String sellersCountry, String country, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = gETIBaseVersion9Call(_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 gETIBaseVersion9() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion9WithHttpInfo();
        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> gETIBaseVersion9WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion9ValidateBeforeCall(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 gETIBaseVersion9Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion9ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETInvoiceSubCategoryCountrySearch1
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (optional)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (optional)
     * @param country  country Buyer&#39;s country  (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 sub category if exists for given codes.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSubCategoryCountrySearch1Call(String invoiceSubCategoryCode, String sellersCountry, String country, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

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

        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 gETInvoiceSubCategoryCountrySearch1ValidateBeforeCall(String invoiceSubCategoryCode, String sellersCountry, String country, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETInvoiceSubCategoryCountrySearch1Call(invoiceSubCategoryCode, sellersCountry, country, _callback);
        return localVarCall;

    }

    /**
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).  
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (optional)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (optional)
     * @param country  country Buyer&#39;s country  (optional)
     * @return GetInvoiceSubCategoryCountryResponse
     * @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 sub category if exists for given codes.  </td><td>  -  </td></tr>
     </table>
     */
    public GetInvoiceSubCategoryCountryResponse gETInvoiceSubCategoryCountrySearch1(String invoiceSubCategoryCode, String sellersCountry, String country) throws ApiException {
        ApiResponse<GetInvoiceSubCategoryCountryResponse> localVarResp = gETInvoiceSubCategoryCountrySearch1WithHttpInfo(invoiceSubCategoryCode, sellersCountry, country);
        return localVarResp.getData();
    }

    /**
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).  
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (optional)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (optional)
     * @param country  country Buyer&#39;s country  (optional)
     * @return ApiResponse&lt;GetInvoiceSubCategoryCountryResponse&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 sub category if exists for given codes.  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<GetInvoiceSubCategoryCountryResponse> gETInvoiceSubCategoryCountrySearch1WithHttpInfo(String invoiceSubCategoryCode, String sellersCountry, String country) throws ApiException {
        okhttp3.Call localVarCall = gETInvoiceSubCategoryCountrySearch1ValidateBeforeCall(invoiceSubCategoryCode, sellersCountry, country, null);
        Type localVarReturnType = new TypeToken<GetInvoiceSubCategoryCountryResponse>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).   (asynchronously)
     *  Search invoice sub category country with a given code and country with the highest priority (1-lowest).  
     * @param invoiceSubCategoryCode  invoiceSubCategoryCode invoice sub category code  (optional)
     * @param sellersCountry  sellersCountry Seller&#39;s country  (optional)
     * @param country  country Buyer&#39;s country  (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 sub category if exists for given codes.  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETInvoiceSubCategoryCountrySearch1Async(String invoiceSubCategoryCode, String sellersCountry, String country, final ApiCallback<GetInvoiceSubCategoryCountryResponse> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETInvoiceSubCategoryCountrySearch1ValidateBeforeCall(invoiceSubCategoryCode, sellersCountry, country, _callback);
        Type localVarReturnType = new TypeToken<GetInvoiceSubCategoryCountryResponse>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTInvoiceSubCategoryCountryCreate1
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pOSTInvoiceSubCategoryCountryCreate1Call(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSubCategoryCountryDto;

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

        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 pOSTInvoiceSubCategoryCountryCreate1ValidateBeforeCall(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreate1Call(invoiceSubCategoryCountryDto, _callback);
        return localVarCall;

    }

    /**
     *  Create invoice sub category country.  
     *  Create invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pOSTInvoiceSubCategoryCountryCreate1(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTInvoiceSubCategoryCountryCreate1WithHttpInfo(invoiceSubCategoryCountryDto);
        return localVarResp.getData();
    }

    /**
     *  Create invoice sub category country.  
     *  Create invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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> pOSTInvoiceSubCategoryCountryCreate1WithHttpInfo(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreate1ValidateBeforeCall(invoiceSubCategoryCountryDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create invoice sub category country.   (asynchronously)
     *  Create invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pOSTInvoiceSubCategoryCountryCreate1Async(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreate1ValidateBeforeCall(invoiceSubCategoryCountryDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTInvoiceSubCategoryCountryCreateOrUpdate1
     * @param invoiceSubCategoryCountryDto  postData invoice sub category to be created or 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 pOSTInvoiceSubCategoryCountryCreateOrUpdate1Call(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSubCategoryCountryDto;

        // create path and map variables
        String localVarPath = "/invoiceSubCategoryCountry/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 pOSTInvoiceSubCategoryCountryCreateOrUpdate1ValidateBeforeCall(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreateOrUpdate1Call(invoiceSubCategoryCountryDto, _callback);
        return localVarCall;

    }

    /**
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.  
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category to be created or 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 pOSTInvoiceSubCategoryCountryCreateOrUpdate1(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTInvoiceSubCategoryCountryCreateOrUpdate1WithHttpInfo(invoiceSubCategoryCountryDto);
        return localVarResp.getData();
    }

    /**
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.  
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category to be created or 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> pOSTInvoiceSubCategoryCountryCreateOrUpdate1WithHttpInfo(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreateOrUpdate1ValidateBeforeCall(invoiceSubCategoryCountryDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.   (asynchronously)
     *  Create or update Invoice SubCategory Country based on invoice sub-category and country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category to be created or 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 pOSTInvoiceSubCategoryCountryCreateOrUpdate1Async(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTInvoiceSubCategoryCountryCreateOrUpdate1ValidateBeforeCall(invoiceSubCategoryCountryDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pUTInvoiceSubCategoryCountryUpdate1
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pUTInvoiceSubCategoryCountryUpdate1Call(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = invoiceSubCategoryCountryDto;

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

        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 pUTInvoiceSubCategoryCountryUpdate1ValidateBeforeCall(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pUTInvoiceSubCategoryCountryUpdate1Call(invoiceSubCategoryCountryDto, _callback);
        return localVarCall;

    }

    /**
     *  Update invoice sub category country.  
     *  Update invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pUTInvoiceSubCategoryCountryUpdate1(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pUTInvoiceSubCategoryCountryUpdate1WithHttpInfo(invoiceSubCategoryCountryDto);
        return localVarResp.getData();
    }

    /**
     *  Update invoice sub category country.  
     *  Update invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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> pUTInvoiceSubCategoryCountryUpdate1WithHttpInfo(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto) throws ApiException {
        okhttp3.Call localVarCall = pUTInvoiceSubCategoryCountryUpdate1ValidateBeforeCall(invoiceSubCategoryCountryDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Update invoice sub category country.   (asynchronously)
     *  Update invoice sub category country.  
     * @param invoiceSubCategoryCountryDto  postData invoice sub category 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 pUTInvoiceSubCategoryCountryUpdate1Async(InvoiceSubCategoryCountryDto invoiceSubCategoryCountryDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user62Call(_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 user62() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user62WithHttpInfo();
        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> user62WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user62ValidateBeforeCall(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 user62Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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