# All files / codegen/models CreatePricePlanArgs.ts

75.24% Statements 155/206
100% Branches 0/0
0% Functions 0/3
75.24% Lines 155/206

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    2081x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x

    1x
    1x

    1x
    1x

     /* 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.
     */

    import { exists, mapValues } from '../runtime';
    import {
        AddOnInputArgs,
        AddOnInputArgsFromJSON,
        AddOnInputArgsFromJSONTyped,
        AddOnInputArgsToJSON,
    } from './AddOnInputArgs';
    import {
        FeatureInputArgs,
        FeatureInputArgsFromJSON,
        FeatureInputArgsFromJSONTyped,
        FeatureInputArgsToJSON,
    } from './FeatureInputArgs';
    import {
        LimitInputArgs,
        LimitInputArgsFromJSON,
        LimitInputArgsFromJSONTyped,
        LimitInputArgsToJSON,
    } from './LimitInputArgs';
    import {
        MeteredComponentInputArgs,
        MeteredComponentInputArgsFromJSON,
        MeteredComponentInputArgsFromJSONTyped,
        MeteredComponentInputArgsToJSON,
    } from './MeteredComponentInputArgs';
    import {
        TrialInputArgs,
        TrialInputArgsFromJSON,
        TrialInputArgsFromJSONTyped,
        TrialInputArgsToJSON,
    } from './TrialInputArgs';

    /**
     *
     * @export
     * @interface CreatePricePlanArgs
     */
    export interface CreatePricePlanArgs {
        /**
         * The frequency (as a an integer multiple of the period) at which to charge the minimum charge.
         * @type {number}
         * @memberof CreatePricePlanArgs
         */
        minimumChargeFrequency?: number | null;
        /**
         * The frequency (as a an integer multiple of the period) at which to charge the base price.
         * @type {number}
         * @memberof CreatePricePlanArgs
         */
        basePriceFrequency?: number;
        /**
         *
         * @type {string}
         * @memberof CreatePricePlanArgs
         */
        name?: string;
        /**
         *
         * @type {number}
         * @memberof CreatePricePlanArgs
         */
        basePrice?: number;
        /**
         *
         * @type {Array<AddOnInputArgs>}
         * @memberof CreatePricePlanArgs
         */
        addOns?: Array<AddOnInputArgs>;
        /**
         *
         * @type {Array<FeatureInputArgs>}
         * @memberof CreatePricePlanArgs
         */
        features?: Array<FeatureInputArgs>;
        /**
         *
         * @type {string}
         * @memberof CreatePricePlanArgs
         */
        displayName?: string;
        /**
         *
         * @type {Array<string>}
         * @memberof CreatePricePlanArgs
         */
        tags?: Array<string>;
        /**
         *
         * @type {number}
         * @memberof CreatePricePlanArgs
         */
        vendorId?: number;
        /**
         * Custom invoice description for the base price line item.
         * @type {string}
         * @memberof CreatePricePlanArgs
         */
        basePriceDescription?: string | null;
        /**
         *
         * @type {Array<LimitInputArgs>}
         * @memberof CreatePricePlanArgs
         */
        limits?: Array<LimitInputArgs>;
        /**
         *
         * @type {TrialInputArgs}
         * @memberof CreatePricePlanArgs
         */
        trial?: TrialInputArgs;
        /**
         *
         * @type {string}
         * @memberof CreatePricePlanArgs
         */
        period?: string;
        /**
         *
         * @type {Array<MeteredComponentInputArgs>}
         * @memberof CreatePricePlanArgs
         */
        meteredComponents?: Array<MeteredComponentInputArgs>;
        /**
         *
         * @type {string}
         * @memberof CreatePricePlanArgs
         */
        description?: string;
        /**
         * Minimum amount (in cents) to charge every price plan period.
         * @type {number}
         * @memberof CreatePricePlanArgs
         */
        minimumCharge?: number | null;
    }

    export function CreatePricePlanArgsFromJSON(json: any): CreatePricePlanArgs {
        return CreatePricePlanArgsFromJSONTyped(json, false);
    }

    export function CreatePricePlanArgsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePricePlanArgs {
        if ((json === undefined) || (json === null)) {
            return json;
        }
        return {

            'minimumChargeFrequency': !exists(json, 'minimum_charge_frequency') ? undefined : json['minimum_charge_frequency'],
            'basePriceFrequency': !exists(json, 'base_price_frequency') ? undefined : json['base_price_frequency'],
            'name': !exists(json, 'name') ? undefined : json['name'],
            'basePrice': !exists(json, 'base_price') ? undefined : json['base_price'],
            'addOns': !exists(json, 'add_ons') ? undefined : ((json['add_ons'] as Array<any>).map(AddOnInputArgsFromJSON)),
            'features': !exists(json, 'features') ? undefined : ((json['features'] as Array<any>).map(FeatureInputArgsFromJSON)),
            'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
            'tags': !exists(json, 'tags') ? undefined : json['tags'],
            'vendorId': !exists(json, 'vendor_id') ? undefined : json['vendor_id'],
            'basePriceDescription': !exists(json, 'base_price_description') ? undefined : json['base_price_description'],
            'limits': !exists(json, 'limits') ? undefined : ((json['limits'] as Array<any>).map(LimitInputArgsFromJSON)),
            'trial': !exists(json, 'trial') ? undefined : TrialInputArgsFromJSON(json['trial']),
            'period': !exists(json, 'period') ? undefined : json['period'],
            'meteredComponents': !exists(json, 'metered_components') ? undefined : ((json['metered_components'] as Array<any>).map(MeteredComponentInputArgsFromJSON)),
            'description': !exists(json, 'description') ? undefined : json['description'],
            'minimumCharge': !exists(json, 'minimum_charge') ? undefined : json['minimum_charge'],
        };
    }

    export function CreatePricePlanArgsToJSON(value?: CreatePricePlanArgs | null): any {
        if (value === undefined) {
            return undefined;
        }
        if (value === null) {
            return null;
        }
        return {

            'minimum_charge_frequency': value.minimumChargeFrequency,
            'base_price_frequency': value.basePriceFrequency,
            'name': value.name,
            'base_price': value.basePrice,
            'add_ons': value.addOns === undefined ? undefined : ((value.addOns as Array<any>).map(AddOnInputArgsToJSON)),
            'features': value.features === undefined ? undefined : ((value.features as Array<any>).map(FeatureInputArgsToJSON)),
            'display_name': value.displayName,
            'tags': value.tags,
            'vendor_id': value.vendorId,
            'base_price_description': value.basePriceDescription,
            'limits': value.limits === undefined ? undefined : ((value.limits as Array<any>).map(LimitInputArgsToJSON)),
            'trial': TrialInputArgsToJSON(value.trial),
            'period': value.period,
            'metered_components': value.meteredComponents === undefined ? undefined : ((value.meteredComponents as Array<any>).map(MeteredComponentInputArgsToJSON)),
            'description': value.description,
            'minimum_charge': value.minimumCharge,
        };
    }