/*
 * 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.CdrListDto;
import org.openapitools.client.model.CdrReservationResponseDto;
import org.openapitools.client.model.ChargeCDRResponseDto;
import org.openapitools.client.model.PrepaidReservationDto;

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

public class MediationApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

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

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

        okhttp3.Call localVarCall = gETIBaseVersion39Call(_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 gETIBaseVersion39() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion39WithHttpInfo();
        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> gETIBaseVersion39WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion39ValidateBeforeCall(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 gETIBaseVersion39Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion39ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationCancelReservation1
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationCancelReservation1Call(PrepaidReservationDto prepaidReservationDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = prepaidReservationDto;

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

        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 pOSTMediationCancelReservation1ValidateBeforeCall(PrepaidReservationDto prepaidReservationDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMediationCancelReservation1Call(prepaidReservationDto, _callback);
        return localVarCall;

    }

    /**
     *  Cancels the reservation  
     *  Cancels the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationCancelReservation1(PrepaidReservationDto prepaidReservationDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMediationCancelReservation1WithHttpInfo(prepaidReservationDto);
        return localVarResp.getData();
    }

    /**
     *  Cancels the reservation  
     *  Cancels the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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> pOSTMediationCancelReservation1WithHttpInfo(PrepaidReservationDto prepaidReservationDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationCancelReservation1ValidateBeforeCall(prepaidReservationDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Cancels the reservation   (asynchronously)
     *  Cancels the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationCancelReservation1Async(PrepaidReservationDto prepaidReservationDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMediationCancelReservation1ValidateBeforeCall(prepaidReservationDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationChargeCdr1
     * @param isVirtual  isVirtual Boolean for the virtual option  (optional)
     * @param rateTriggeredEdr  rateTriggeredEdr Boolean for rate Triggered Edr  (optional)
     * @param returnWalletOperations  returnWalletOperations return Wallet Operations option  (optional)
     * @param maxDepth  maxDepth Interger of the max Depth  (optional)
     * @param body  cdr String of CDR  (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 pOSTMediationChargeCdr1Call(Boolean isVirtual, Boolean rateTriggeredEdr, Boolean returnWalletOperations, Integer maxDepth, String body, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = body;

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

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

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

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

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

        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 pOSTMediationChargeCdr1ValidateBeforeCall(Boolean isVirtual, Boolean rateTriggeredEdr, Boolean returnWalletOperations, Integer maxDepth, String body, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMediationChargeCdr1Call(isVirtual, rateTriggeredEdr, returnWalletOperations, maxDepth, body, _callback);
        return localVarCall;

    }

    /**
     *  Same as registerCdrList, but at the same process rate the EDR created  
     *  Same as registerCdrList, but at the same process rate the EDR created  
     * @param isVirtual  isVirtual Boolean for the virtual option  (optional)
     * @param rateTriggeredEdr  rateTriggeredEdr Boolean for rate Triggered Edr  (optional)
     * @param returnWalletOperations  returnWalletOperations return Wallet Operations option  (optional)
     * @param maxDepth  maxDepth Interger of the max Depth  (optional)
     * @param body  cdr String of CDR  (optional)
     * @return ChargeCDRResponseDto
     * @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 ChargeCDRResponseDto pOSTMediationChargeCdr1(Boolean isVirtual, Boolean rateTriggeredEdr, Boolean returnWalletOperations, Integer maxDepth, String body) throws ApiException {
        ApiResponse<ChargeCDRResponseDto> localVarResp = pOSTMediationChargeCdr1WithHttpInfo(isVirtual, rateTriggeredEdr, returnWalletOperations, maxDepth, body);
        return localVarResp.getData();
    }

    /**
     *  Same as registerCdrList, but at the same process rate the EDR created  
     *  Same as registerCdrList, but at the same process rate the EDR created  
     * @param isVirtual  isVirtual Boolean for the virtual option  (optional)
     * @param rateTriggeredEdr  rateTriggeredEdr Boolean for rate Triggered Edr  (optional)
     * @param returnWalletOperations  returnWalletOperations return Wallet Operations option  (optional)
     * @param maxDepth  maxDepth Interger of the max Depth  (optional)
     * @param body  cdr String of CDR  (optional)
     * @return ApiResponse&lt;ChargeCDRResponseDto&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<ChargeCDRResponseDto> pOSTMediationChargeCdr1WithHttpInfo(Boolean isVirtual, Boolean rateTriggeredEdr, Boolean returnWalletOperations, Integer maxDepth, String body) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationChargeCdr1ValidateBeforeCall(isVirtual, rateTriggeredEdr, returnWalletOperations, maxDepth, body, null);
        Type localVarReturnType = new TypeToken<ChargeCDRResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Same as registerCdrList, but at the same process rate the EDR created   (asynchronously)
     *  Same as registerCdrList, but at the same process rate the EDR created  
     * @param isVirtual  isVirtual Boolean for the virtual option  (optional)
     * @param rateTriggeredEdr  rateTriggeredEdr Boolean for rate Triggered Edr  (optional)
     * @param returnWalletOperations  returnWalletOperations return Wallet Operations option  (optional)
     * @param maxDepth  maxDepth Interger of the max Depth  (optional)
     * @param body  cdr String of CDR  (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 pOSTMediationChargeCdr1Async(Boolean isVirtual, Boolean rateTriggeredEdr, Boolean returnWalletOperations, Integer maxDepth, String body, final ApiCallback<ChargeCDRResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMediationChargeCdr1ValidateBeforeCall(isVirtual, rateTriggeredEdr, returnWalletOperations, maxDepth, body, _callback);
        Type localVarReturnType = new TypeToken<ChargeCDRResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationConfirmReservation1
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationConfirmReservation1Call(PrepaidReservationDto prepaidReservationDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = prepaidReservationDto;

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

        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 pOSTMediationConfirmReservation1ValidateBeforeCall(PrepaidReservationDto prepaidReservationDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMediationConfirmReservation1Call(prepaidReservationDto, _callback);
        return localVarCall;

    }

    /**
     *  Confirms the reservation  
     *  Confirms the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationConfirmReservation1(PrepaidReservationDto prepaidReservationDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMediationConfirmReservation1WithHttpInfo(prepaidReservationDto);
        return localVarResp.getData();
    }

    /**
     *  Confirms the reservation  
     *  Confirms the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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> pOSTMediationConfirmReservation1WithHttpInfo(PrepaidReservationDto prepaidReservationDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationConfirmReservation1ValidateBeforeCall(prepaidReservationDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Confirms the reservation   (asynchronously)
     *  Confirms the reservation  
     * @param prepaidReservationDto  reservation Prepaid reservation&#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 pOSTMediationConfirmReservation1Async(PrepaidReservationDto prepaidReservationDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMediationConfirmReservation1ValidateBeforeCall(prepaidReservationDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationNotifyOfRejectedCdrs1
     * @param cdrListDto  cdrList A list of rejected CDR lines (can be as json format string instead of csv line)  (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 pOSTMediationNotifyOfRejectedCdrs1Call(CdrListDto cdrListDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = cdrListDto;

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

        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 pOSTMediationNotifyOfRejectedCdrs1ValidateBeforeCall(CdrListDto cdrListDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMediationNotifyOfRejectedCdrs1Call(cdrListDto, _callback);
        return localVarCall;

    }

    /**
     *  Notify of rejected CDRs  
     *  Notify of rejected CDRs  
     * @param cdrListDto  cdrList A list of rejected CDR lines (can be as json format string instead of csv line)  (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 pOSTMediationNotifyOfRejectedCdrs1(CdrListDto cdrListDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMediationNotifyOfRejectedCdrs1WithHttpInfo(cdrListDto);
        return localVarResp.getData();
    }

    /**
     *  Notify of rejected CDRs  
     *  Notify of rejected CDRs  
     * @param cdrListDto  cdrList A list of rejected CDR lines (can be as json format string instead of csv line)  (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> pOSTMediationNotifyOfRejectedCdrs1WithHttpInfo(CdrListDto cdrListDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationNotifyOfRejectedCdrs1ValidateBeforeCall(cdrListDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Notify of rejected CDRs   (asynchronously)
     *  Notify of rejected CDRs  
     * @param cdrListDto  cdrList A list of rejected CDR lines (can be as json format string instead of csv line)  (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 pOSTMediationNotifyOfRejectedCdrs1Async(CdrListDto cdrListDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMediationNotifyOfRejectedCdrs1ValidateBeforeCall(cdrListDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationRegisterCdrList1
     * @param cdrListDto  postData String of CDR  (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 pOSTMediationRegisterCdrList1Call(CdrListDto cdrListDto, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = cdrListDto;

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

        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 pOSTMediationRegisterCdrList1ValidateBeforeCall(CdrListDto cdrListDto, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = pOSTMediationRegisterCdrList1Call(cdrListDto, _callback);
        return localVarCall;

    }

    /**
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job  
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job  
     * @param cdrListDto  postData String of CDR  (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 pOSTMediationRegisterCdrList1(CdrListDto cdrListDto) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTMediationRegisterCdrList1WithHttpInfo(cdrListDto);
        return localVarResp.getData();
    }

    /**
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job  
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job  
     * @param cdrListDto  postData String of CDR  (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> pOSTMediationRegisterCdrList1WithHttpInfo(CdrListDto cdrListDto) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationRegisterCdrList1ValidateBeforeCall(cdrListDto, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job   (asynchronously)
     *  Accepts a list of CDR line. This CDR is parsed and created as EDR. CDR is same format use in mediation job  
     * @param cdrListDto  postData String of CDR  (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 pOSTMediationRegisterCdrList1Async(CdrListDto cdrListDto, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTMediationRegisterCdrList1ValidateBeforeCall(cdrListDto, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTMediationReserveCdr1
     * @param body  cdr String of CDR  (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>  Available quantity and reservationID is ed  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTMediationReserveCdr1Call(String body, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = body;

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

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

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

    }

    /**
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation. A reservation has expiration limit save in the provider entity (PREPAID_RESRV_DELAY_MS)  
     * @param body  cdr String of CDR  (optional)
     * @return CdrReservationResponseDto
     * @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>  Available quantity and reservationID is ed  </td><td>  -  </td></tr>
     </table>
     */
    public CdrReservationResponseDto pOSTMediationReserveCdr1(String body) throws ApiException {
        ApiResponse<CdrReservationResponseDto> localVarResp = pOSTMediationReserveCdr1WithHttpInfo(body);
        return localVarResp.getData();
    }

    /**
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation. A reservation has expiration limit save in the provider entity (PREPAID_RESRV_DELAY_MS)  
     * @param body  cdr String of CDR  (optional)
     * @return ApiResponse&lt;CdrReservationResponseDto&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>  Available quantity and reservationID is ed  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<CdrReservationResponseDto> pOSTMediationReserveCdr1WithHttpInfo(String body) throws ApiException {
        okhttp3.Call localVarCall = pOSTMediationReserveCdr1ValidateBeforeCall(body, null);
        Type localVarReturnType = new TypeToken<CdrReservationResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation (asynchronously)
     *  Allows the user to reserve a CDR, this will create a new reservation entity attached to a wallet operation. A reservation has expiration limit save in the provider entity (PREPAID_RESRV_DELAY_MS)  
     * @param body  cdr String of CDR  (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>  Available quantity and reservationID is ed  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTMediationReserveCdr1Async(String body, final ApiCallback<CdrReservationResponseDto> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user14Call(_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 user14() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user14WithHttpInfo();
        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> user14WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user14ValidateBeforeCall(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 user14Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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