"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.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerPortalActiveSubscriptionToJSON = exports.CustomerPortalActiveSubscriptionFromJSONTyped = exports.CustomerPortalActiveSubscriptionFromJSON = void 0;
const runtime_1 = require("../runtime");
const BillingCycleDate_1 = require("./BillingCycleDate");
const Subscription_1 = require("./Subscription");
function CustomerPortalActiveSubscriptionFromJSON(json) {
    return CustomerPortalActiveSubscriptionFromJSONTyped(json, false);
}
exports.CustomerPortalActiveSubscriptionFromJSON = CustomerPortalActiveSubscriptionFromJSON;
function CustomerPortalActiveSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'billingCycle': (0, BillingCycleDate_1.BillingCycleDateFromJSON)(json['billing_cycle']),
        'invoicingDate': !(0, runtime_1.exists)(json, 'invoicing_date') ? undefined : (new Date(json['invoicing_date'])),
        'discountedFixedPrice': !(0, runtime_1.exists)(json, 'discounted_fixed_price') ? undefined : json['discounted_fixed_price'],
        'totalFixedPrice': !(0, runtime_1.exists)(json, 'total_fixed_price') ? undefined : json['total_fixed_price'],
        'subscription': !(0, runtime_1.exists)(json, 'subscription') ? undefined : (0, Subscription_1.SubscriptionFromJSON)(json['subscription']),
    };
}
exports.CustomerPortalActiveSubscriptionFromJSONTyped = CustomerPortalActiveSubscriptionFromJSONTyped;
function CustomerPortalActiveSubscriptionToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'billing_cycle': (0, BillingCycleDate_1.BillingCycleDateToJSON)(value.billingCycle),
        'invoicing_date': value.invoicingDate === undefined ? undefined : (value.invoicingDate.toISOString()),
        'discounted_fixed_price': value.discountedFixedPrice,
        'total_fixed_price': value.totalFixedPrice,
        'subscription': (0, Subscription_1.SubscriptionToJSON)(value.subscription),
    };
}
exports.CustomerPortalActiveSubscriptionToJSON = CustomerPortalActiveSubscriptionToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tZXJQb3J0YWxBY3RpdmVTdWJzY3JpcHRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29kZWdlbi9tb2RlbHMvQ3VzdG9tZXJQb3J0YWxBY3RpdmVTdWJzY3JpcHRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9CQUFvQjtBQUNwQixvQkFBb0I7QUFDcEI7Ozs7Ozs7Ozs7R0FVRzs7O0FBRUgsd0NBQStDO0FBQy9DLHlEQUs0QjtBQUM1QixpREFLd0I7QUF3Q3hCLFNBQWdCLHdDQUF3QyxDQUFDLElBQVM7SUFDOUQsT0FBTyw2Q0FBNkMsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDdEUsQ0FBQztBQUZELDRGQUVDO0FBRUQsU0FBZ0IsNkNBQTZDLENBQUMsSUFBUyxFQUFFLG1CQUE0QjtJQUNqRyxJQUFJLENBQUMsSUFBSSxLQUFLLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxFQUFFO1FBQ3pDLE9BQU8sSUFBSSxDQUFDO0tBQ2Y7SUFDRCxPQUFPO1FBRUgsY0FBYyxFQUFFLElBQUEsMkNBQXdCLEVBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBQy9ELGVBQWUsRUFBRSxDQUFDLElBQUEsZ0JBQU0sRUFBQyxJQUFJLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDL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