"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Octane API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RevenueRecognitionApi = void 0;
const runtime = __importStar(require("../runtime"));
const models_1 = require("../models");
/**
 *
 */
class RevenueRecognitionApi extends runtime.BaseAPI {
    /**
     * Compute monthly recognized revenue
     * Compute monthly recognized revenue
     */
    async recognizedRevenuePostRaw(requestParameters, initOverrides) {
        if (requestParameters.revenueRecognitionInput === null || requestParameters.revenueRecognitionInput === undefined) {
            throw new runtime.RequiredError('revenueRecognitionInput', 'Required parameter requestParameters.revenueRecognitionInput was null or undefined when calling recognizedRevenuePost.');
        }
        const queryParameters = {};
        const headerParameters = {};
        headerParameters['Content-Type'] = 'application/json';
        if (this.configuration && this.configuration.accessToken) {
            const token = this.configuration.accessToken;
            const tokenString = await token("BearerApiKeyAuth", []);
            if (tokenString) {
                headerParameters["Authorization"] = `Bearer ${tokenString}`;
            }
        }
        const response = await this.request({
            path: `/recognized_revenue/`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, models_1.RevenueRecognitionInputToJSON)(requestParameters.revenueRecognitionInput),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.RevenueRecognitionEntryFromJSON));
    }
    /**
     * Compute monthly recognized revenue
     * Compute monthly recognized revenue
     */
    async recognizedRevenuePost(requestParameters, initOverrides) {
        const response = await this.recognizedRevenuePostRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
exports.RevenueRecognitionApi = RevenueRecognitionApi;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmV2ZW51ZVJlY29nbml0aW9uQXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvZGVnZW4vYXBpcy9SZXZlbnVlUmVjb2duaXRpb25BcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9CQUFvQjtBQUNwQixvQkFBb0I7QUFDcEI7Ozs7Ozs7Ozs7R0FVRzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUdILG9EQUFzQztBQUN0QyxzQ0FPbUI7QUFNbkI7O0dBRUc7QUFDSCxNQUFhLHFCQUFzQixTQUFRLE9BQU8sQ0FBQyxPQUFPO0lBRXREOzs7T0FHRztJQUNILEtBQUssQ0FBQyx3QkFBd0IsQ0FBQyxpQkFBK0MsRUFBRSxhQUEyQjtRQUN2RyxJQUFJLGlCQUFpQixDQUFDLHVCQUF1QixLQUFLLElBQUksSUFBSSxpQkFBaUIsQ0FBQyx1QkFBdUIsS0FBSyxTQUFTLEVBQUU7WUFDL0csTUFBTSxJQUFJLE9BQU8sQ0FBQyxhQUFhLENBQUMseUJBQXlCLEVBQUMsd0hBQXdILENBQUMsQ0FBQztTQUN2TDtRQUVELE1BQU0sZUFBZSxHQUFRLEVBQUUsQ0FBQztRQUVoQyxNQUFNLGdCQUFnQixHQUF3QixFQUF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