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

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

public class RatedTransactionApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

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

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

        okhttp3.Call localVarCall = gETIBaseVersion41Call(_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 gETIBaseVersion41() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = gETIBaseVersion41WithHttpInfo();
        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> gETIBaseVersion41WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = gETIBaseVersion41ValidateBeforeCall(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 gETIBaseVersion41Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETIBaseVersion41ValidateBeforeCall(_callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for gETRatedTransactionList1
     * @param query  query Search criteria. Example : query&#x3D;fromRange end_Date:2017-05-01|toRange end_date:2019-01-01 or query&#x3D;code:abcd  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @param returnUserAccountCode  returnUserAccountCode the return user account code  (optional, default to false)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETRatedTransactionList1Call(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, Boolean returnUserAccountCode, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = null;

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

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

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

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

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

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

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

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

        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 gETRatedTransactionList1ValidateBeforeCall(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, Boolean returnUserAccountCode, final ApiCallback _callback) throws ApiException {
        

        okhttp3.Call localVarCall = gETRatedTransactionList1Call(query, fields, offset, limit, sortBy, sortOrder, returnUserAccountCode, _callback);
        return localVarCall;

    }

    /**
     *  Get a list of rated transactions 
     *  Get a list of rated transactions 
     * @param query  query Search criteria. Example : query&#x3D;fromRange end_Date:2017-05-01|toRange end_date:2019-01-01 or query&#x3D;code:abcd  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @param returnUserAccountCode  returnUserAccountCode the return user account code  (optional, default to false)
     * @return RatedTransactionListResponseDto
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public RatedTransactionListResponseDto gETRatedTransactionList1(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, Boolean returnUserAccountCode) throws ApiException {
        ApiResponse<RatedTransactionListResponseDto> localVarResp = gETRatedTransactionList1WithHttpInfo(query, fields, offset, limit, sortBy, sortOrder, returnUserAccountCode);
        return localVarResp.getData();
    }

    /**
     *  Get a list of rated transactions 
     *  Get a list of rated transactions 
     * @param query  query Search criteria. Example : query&#x3D;fromRange end_Date:2017-05-01|toRange end_date:2019-01-01 or query&#x3D;code:abcd  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @param returnUserAccountCode  returnUserAccountCode the return user account code  (optional, default to false)
     * @return ApiResponse&lt;RatedTransactionListResponseDto&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RatedTransactionListResponseDto> gETRatedTransactionList1WithHttpInfo(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, Boolean returnUserAccountCode) throws ApiException {
        okhttp3.Call localVarCall = gETRatedTransactionList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, returnUserAccountCode, null);
        Type localVarReturnType = new TypeToken<RatedTransactionListResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get a list of rated transactions  (asynchronously)
     *  Get a list of rated transactions 
     * @param query  query Search criteria. Example : query&#x3D;fromRange end_Date:2017-05-01|toRange end_date:2019-01-01 or query&#x3D;code:abcd  (optional)
     * @param fields  fields Data retrieval options/fieldnames separated by a comma  (optional)
     * @param offset  offset Pagination - from record number  (optional)
     * @param limit  limit Pagination - number of records to retrieve  (optional)
     * @param sortBy  sortBy Sorting - field to sort by - a field from a main entity being searched. See Data model for a list of fields.  (optional, default to &quot;code&quot;)
     * @param sortOrder  sortOrder Sorting - sort order.  (optional, default to ASCENDING)
     * @param returnUserAccountCode  returnUserAccountCode the return user account code  (optional, default to false)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call gETRatedTransactionList1Async(String query, String fields, Integer offset, Integer limit, String sortBy, String sortOrder, Boolean returnUserAccountCode, final ApiCallback<RatedTransactionListResponseDto> _callback) throws ApiException {

        okhttp3.Call localVarCall = gETRatedTransactionList1ValidateBeforeCall(query, fields, offset, limit, sortBy, sortOrder, returnUserAccountCode, _callback);
        Type localVarReturnType = new TypeToken<RatedTransactionListResponseDto>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTRatedTransactionCancelRatedTransactions1
     * @param pagingAndFiltering  pagingAndFiltering Search criteria  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  ActionStatus with SUCESS or FAIL status inside  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTRatedTransactionCancelRatedTransactions1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

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

        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 pOSTRatedTransactionCancelRatedTransactions1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED.  
     * @param pagingAndFiltering  pagingAndFiltering Search criteria  (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>  ActionStatus with SUCESS or FAIL status inside  </td><td>  -  </td></tr>
     </table>
     */
    public ActionStatus pOSTRatedTransactionCancelRatedTransactions1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<ActionStatus> localVarResp = pOSTRatedTransactionCancelRatedTransactions1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED.  
     * @param pagingAndFiltering  pagingAndFiltering Search criteria  (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>  ActionStatus with SUCESS or FAIL status inside  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<ActionStatus> pOSTRatedTransactionCancelRatedTransactions1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTRatedTransactionCancelRatedTransactions1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED (asynchronously)
     *  Call service to cancel one or many opened Rated Transactions according to the passed query, cancel an opened Rated Transaction is to set status to CANCELED.  
     * @param pagingAndFiltering  pagingAndFiltering Search criteria  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  ActionStatus with SUCESS or FAIL status inside  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTRatedTransactionCancelRatedTransactions1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<ActionStatus> _callback) throws ApiException {

        okhttp3.Call localVarCall = pOSTRatedTransactionCancelRatedTransactions1ValidateBeforeCall(pagingAndFiltering, _callback);
        Type localVarReturnType = new TypeToken<ActionStatus>(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }
    /**
     * Build call for pOSTRatedTransactionList1
     * @param pagingAndFiltering  pagingAndFiltering Search and paging criteria. Pass userAccountCode as field option to retrieve associated User account&#39;s code.  (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTRatedTransactionList1Call(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        Object localVarPostBody = pagingAndFiltering;

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

        List<Pair> localVarQueryParams = new ArrayList<Pair>();
        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
        final String[] localVarAccepts = {
            "application/json", "application/xml"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
            "application/json", "application/xml"
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        String[] localVarAuthNames = new String[] { "auth" };
        return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call pOSTRatedTransactionList1ValidateBeforeCall(PagingAndFiltering pagingAndFiltering, final ApiCallback _callback) throws ApiException {
        

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

    }

    /**
     *  Get a list of rated transactions 
     *  Get a list of rated transactions 
     * @param pagingAndFiltering  pagingAndFiltering Search and paging criteria. Pass userAccountCode as field option to retrieve associated User account&#39;s code.  (optional)
     * @return RatedTransactionListResponseDto
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public RatedTransactionListResponseDto pOSTRatedTransactionList1(PagingAndFiltering pagingAndFiltering) throws ApiException {
        ApiResponse<RatedTransactionListResponseDto> localVarResp = pOSTRatedTransactionList1WithHttpInfo(pagingAndFiltering);
        return localVarResp.getData();
    }

    /**
     *  Get a list of rated transactions 
     *  Get a list of rated transactions 
     * @param pagingAndFiltering  pagingAndFiltering Search and paging criteria. Pass userAccountCode as field option to retrieve associated User account&#39;s code.  (optional)
     * @return ApiResponse&lt;RatedTransactionListResponseDto&gt;
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public ApiResponse<RatedTransactionListResponseDto> pOSTRatedTransactionList1WithHttpInfo(PagingAndFiltering pagingAndFiltering) throws ApiException {
        okhttp3.Call localVarCall = pOSTRatedTransactionList1ValidateBeforeCall(pagingAndFiltering, null);
        Type localVarReturnType = new TypeToken<RatedTransactionListResponseDto>(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    /**
     *  Get a list of rated transactions  (asynchronously)
     *  Get a list of rated transactions 
     * @param pagingAndFiltering  pagingAndFiltering Search and paging criteria. Pass userAccountCode as field option to retrieve associated User account&#39;s code.  (optional)
     * @param _callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     * @http.response.details
     <table summary="Response Details" border="1">
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 0 </td><td>  A list of Rated transactions  </td><td>  -  </td></tr>
     </table>
     */
    public okhttp3.Call pOSTRatedTransactionList1Async(PagingAndFiltering pagingAndFiltering, final ApiCallback<RatedTransactionListResponseDto> _callback) throws ApiException {

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

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

        okhttp3.Call localVarCall = user7Call(_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 user7() throws ApiException {
        ApiResponse<ActionStatus> localVarResp = user7WithHttpInfo();
        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> user7WithHttpInfo() throws ApiException {
        okhttp3.Call localVarCall = user7ValidateBeforeCall(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 user7Async(final ApiCallback<ActionStatus> _callback) throws ApiException {

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