All files / codegen/models UpdatePricePlanArgs.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 UpdatePricePlanArgs
 */
export interface UpdatePricePlanArgs {
    /**
     * 
     * @type {Array<string>}
     * @memberof UpdatePricePlanArgs
     */
    tags?: Array<string>;
    /**
     * 
     * @type {number}
     * @memberof UpdatePricePlanArgs
     */
    basePrice?: number;
    /**
     * The frequency (as a an integer multiple of the period) at which to charge the minimum charge.
     * @type {number}
     * @memberof UpdatePricePlanArgs
     */
    minimumChargeFrequency?: number | null;
    /**
     * Custom invoice description for the base price line item.
     * @type {string}
     * @memberof UpdatePricePlanArgs
     */
    basePriceDescription?: string | null;
    /**
     * Minimum amount (in cents) to charge every price plan period.
     * @type {number}
     * @memberof UpdatePricePlanArgs
     */
    minimumCharge?: number | null;
    /**
     * 
     * @type {Array<LimitInputArgs>}
     * @memberof UpdatePricePlanArgs
     */
    limits?: Array<LimitInputArgs>;
    /**
     * 
     * @type {Array<AddOnInputArgs>}
     * @memberof UpdatePricePlanArgs
     */
    addOns?: Array<AddOnInputArgs>;
    /**
     * 
     * @type {TrialInputArgs}
     * @memberof UpdatePricePlanArgs
     */
    trial?: TrialInputArgs;
    /**
     * 
     * @type {Array<FeatureInputArgs>}
     * @memberof UpdatePricePlanArgs
     */
    features?: Array<FeatureInputArgs>;
    /**
     * 
     * @type {string}
     * @memberof UpdatePricePlanArgs
     */
    description?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdatePricePlanArgs
     */
    name?: string;
    /**
     * 
     * @type {string}
     * @memberof UpdatePricePlanArgs
     */
    period?: string;
    /**
     * 
     * @type {Array<MeteredComponentInputArgs>}
     * @memberof UpdatePricePlanArgs
     */
    meteredComponents?: Array<MeteredComponentInputArgs>;
    /**
     * 
     * @type {number}
     * @memberof UpdatePricePlanArgs
     */
    vendorId?: number;
    /**
     * The frequency (as a an integer multiple of the period) at which to charge the base price.
     * @type {number}
     * @memberof UpdatePricePlanArgs
     */
    basePriceFrequency?: number;
    /**
     * 
     * @type {string}
     * @memberof UpdatePricePlanArgs
     */
    displayName?: string;
}
 
export function UpdatePricePlanArgsFromJSON(json: any): UpdatePricePlanArgs {
    return UpdatePricePlanArgsFromJSONTyped(json, false);
}
 
export function UpdatePricePlanArgsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePricePlanArgs {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'tags': !exists(json, 'tags') ? undefined : json['tags'],
        'basePrice': !exists(json, 'base_price') ? undefined : json['base_price'],
        'minimumChargeFrequency': !exists(json, 'minimum_charge_frequency') ? undefined : json['minimum_charge_frequency'],
        'basePriceDescription': !exists(json, 'base_price_description') ? undefined : json['base_price_description'],
        'minimumCharge': !exists(json, 'minimum_charge') ? undefined : json['minimum_charge'],
        'limits': !exists(json, 'limits') ? undefined : ((json['limits'] as Array<any>).map(LimitInputArgsFromJSON)),
        'addOns': !exists(json, 'add_ons') ? undefined : ((json['add_ons'] as Array<any>).map(AddOnInputArgsFromJSON)),
        'trial': !exists(json, 'trial') ? undefined : TrialInputArgsFromJSON(json['trial']),
        'features': !exists(json, 'features') ? undefined : ((json['features'] as Array<any>).map(FeatureInputArgsFromJSON)),
        'description': !exists(json, 'description') ? undefined : json['description'],
        'name': !exists(json, 'name') ? undefined : json['name'],
        'period': !exists(json, 'period') ? undefined : json['period'],
        'meteredComponents': !exists(json, 'metered_components') ? undefined : ((json['metered_components'] as Array<any>).map(MeteredComponentInputArgsFromJSON)),
        'vendorId': !exists(json, 'vendor_id') ? undefined : json['vendor_id'],
        'basePriceFrequency': !exists(json, 'base_price_frequency') ? undefined : json['base_price_frequency'],
        'displayName': !exists(json, 'display_name') ? undefined : json['display_name'],
    };
}
 
export function UpdatePricePlanArgsToJSON(value?: UpdatePricePlanArgs | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'tags': value.tags,
        'base_price': value.basePrice,
        'minimum_charge_frequency': value.minimumChargeFrequency,
        'base_price_description': value.basePriceDescription,
        'minimum_charge': value.minimumCharge,
        'limits': value.limits === undefined ? undefined : ((value.limits as Array<any>).map(LimitInputArgsToJSON)),
        'add_ons': value.addOns === undefined ? undefined : ((value.addOns as Array<any>).map(AddOnInputArgsToJSON)),
        'trial': TrialInputArgsToJSON(value.trial),
        'features': value.features === undefined ? undefined : ((value.features as Array<any>).map(FeatureInputArgsToJSON)),
        'description': value.description,
        'name': value.name,
        'period': value.period,
        'metered_components': value.meteredComponents === undefined ? undefined : ((value.meteredComponents as Array<any>).map(MeteredComponentInputArgsToJSON)),
        'vendor_id': value.vendorId,
        'base_price_frequency': value.basePriceFrequency,
        'display_name': value.displayName,
    };
}