"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.CouponInputArgsToJSON = exports.CouponInputArgsFromJSONTyped = exports.CouponInputArgsFromJSON = exports.CouponInputArgsDiscountTypeEnum = exports.CouponInputArgsFrequencyEnum = void 0;
const runtime_1 = require("../runtime");
/**
* @export
* @enum {string}
*/
var CouponInputArgsFrequencyEnum;
(function (CouponInputArgsFrequencyEnum) {
    CouponInputArgsFrequencyEnum["Once"] = "ONCE";
    CouponInputArgsFrequencyEnum["Recurring"] = "RECURRING";
})(CouponInputArgsFrequencyEnum = exports.CouponInputArgsFrequencyEnum || (exports.CouponInputArgsFrequencyEnum = {})); /**
* @export
* @enum {string}
*/
var CouponInputArgsDiscountTypeEnum;
(function (CouponInputArgsDiscountTypeEnum) {
    CouponInputArgsDiscountTypeEnum["Flat"] = "FLAT";
    CouponInputArgsDiscountTypeEnum["Percent"] = "PERCENT";
})(CouponInputArgsDiscountTypeEnum = exports.CouponInputArgsDiscountTypeEnum || (exports.CouponInputArgsDiscountTypeEnum = {}));
function CouponInputArgsFromJSON(json) {
    return CouponInputArgsFromJSONTyped(json, false);
}
exports.CouponInputArgsFromJSON = CouponInputArgsFromJSON;
function CouponInputArgsFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'vendorId': !(0, runtime_1.exists)(json, 'vendor_id') ? undefined : json['vendor_id'],
        'name': json['name'],
        'displayName': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
        'expirationTime': !(0, runtime_1.exists)(json, 'expiration_time') ? undefined : (new Date(json['expiration_time'])),
        'frequency': json['frequency'],
        'durationLength': !(0, runtime_1.exists)(json, 'duration_length') ? undefined : json['duration_length'],
        'durationUnit': !(0, runtime_1.exists)(json, 'duration_unit') ? undefined : json['duration_unit'],
        'maxUses': !(0, runtime_1.exists)(json, 'max_uses') ? undefined : json['max_uses'],
        'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
        'excludedCustomers': !(0, runtime_1.exists)(json, 'excluded_customers') ? undefined : json['excluded_customers'],
        'excludedPricePlans': !(0, runtime_1.exists)(json, 'excluded_price_plans') ? undefined : json['excluded_price_plans'],
        'discountType': json['discount_type'],
        'discountAmount': json['discount_amount'],
    };
}
exports.CouponInputArgsFromJSONTyped = CouponInputArgsFromJSONTyped;
function CouponInputArgsToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'vendor_id': value.vendorId,
        'name': value.name,
        'display_name': value.displayName,
        'expiration_time': value.expirationTime === undefined ? undefined : (value.expirationTime.toISOString()),
        'frequency': value.frequency,
        'duration_length': value.durationLength,
        'duration_unit': value.durationUnit,
        'max_uses': value.maxUses,
        'code': value.code,
        'excluded_customers': value.excludedCustomers,
        'excluded_price_plans': value.excludedPricePlans,
        'discount_type': value.discountType,
        'discount_amount': value.discountAmount,
    };
}
exports.CouponInputArgsToJSON = CouponInputArgsToJSON;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ291cG9uSW5wdXRBcmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvZGVnZW4vbW9kZWxzL0NvdXBvbklucHV0QXJncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3BCLG9CQUFvQjtBQUNwQjs7Ozs7Ozs7OztHQVVHOzs7QUFFSCx3Q0FBK0M7QUF1Ri9DOzs7RUFHRTtBQUNGLElBQVksNEJBR1g7QUFIRCxXQUFZLDRCQUE0QjtJQUNwQyw2Q0FBYSxDQUFBO0l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