"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.BillingSettingsApi = void 0;
const runtime = __importStar(require("../runtime"));
const models_1 = require("../models");
/**
 *
 */
class BillingSettingsApi extends runtime.BaseAPI {
    /**
     * Delete billing settings for a vendor.
     * Delete Billing Settings
     */
    async billingSettingsDeleteRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        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: `/billing_settings/`,
            method: 'DELETE',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.VoidApiResponse(response);
    }
    /**
     * Delete billing settings for a vendor.
     * Delete Billing Settings
     */
    async billingSettingsDelete(initOverrides) {
        await this.billingSettingsDeleteRaw(initOverrides);
    }
    /**
     * Get billing settings for a vendor.
     * Get Billing Settings
     */
    async billingSettingsGetRaw(initOverrides) {
        const queryParameters = {};
        const headerParameters = {};
        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: `/billing_settings/`,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BillingSettingsFromJSON)(jsonValue));
    }
    /**
     * Get billing settings for a vendor.
     * Get Billing Settings
     */
    async billingSettingsGet(initOverrides) {
        const response = await this.billingSettingsGetRaw(initOverrides);
        return await response.value();
    }
    /**
     * Create billing settings for a vendor.
     * Create Billing Settings
     */
    async billingSettingsPostRaw(requestParameters, initOverrides) {
        if (requestParameters.createBillingSettingsInputArgs === null || requestParameters.createBillingSettingsInputArgs === undefined) {
            throw new runtime.RequiredError('createBillingSettingsInputArgs', 'Required parameter requestParameters.createBillingSettingsInputArgs was null or undefined when calling billingSettingsPost.');
        }
        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: `/billing_settings/`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: (0, models_1.CreateBillingSettingsInputArgsToJSON)(requestParameters.createBillingSettingsInputArgs),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BillingSettingsFromJSON)(jsonValue));
    }
    /**
     * Create billing settings for a vendor.
     * Create Billing Settings
     */
    async billingSettingsPost(requestParameters, initOverrides) {
        const response = await this.billingSettingsPostRaw(requestParameters, initOverrides);
        return await response.value();
    }
    /**
     * Update billing settings for a vendor.
     * Update Billing Settings
     */
    async billingSettingsPutRaw(requestParameters, initOverrides) {
        if (requestParameters.updateBillingSettingsInputArgs === null || requestParameters.updateBillingSettingsInputArgs === undefined) {
            throw new runtime.RequiredError('updateBillingSettingsInputArgs', 'Required parameter requestParameters.updateBillingSettingsInputArgs was null or undefined when calling billingSettingsPut.');
        }
        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: `/billing_settings/`,
            method: 'PUT',
            headers: headerParameters,
            query: queryParameters,
            body: (0, models_1.UpdateBillingSettingsInputArgsToJSON)(requestParameters.updateBillingSettingsInputArgs),
        }, initOverrides);
        return new runtime.JSONApiResponse(response, (jsonValue) => (0, models_1.BillingSettingsFromJSON)(jsonValue));
    }
    /**
     * Update billing settings for a vendor.
     * Update Billing Settings
     */
    async billingSettingsPut(requestParameters, initOverrides) {
        const response = await this.billingSettingsPutRaw(requestParameters, initOverrides);
        return await response.value();
    }
}
exports.BillingSettingsApi = BillingSettingsApi;
//# sourceMappingURL=data:application/json;base64, 