# All files / codegen/models UpdateSelfServeSettingsArgs.ts

67.96% Statements 70/103
100% Branches 0/0
0% Functions 0/3
67.96% Lines 70/103

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
    1051x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    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';
    /**
     *
     * @export
     * @interface UpdateSelfServeSettingsArgs
     */
    export interface UpdateSelfServeSettingsArgs {
        /**
         * Time length unit for the default expiration for credits bought in the customer portal.
         * @type {string}
         * @memberof UpdateSelfServeSettingsArgs
         */
        creditsExpirationUnit?: string;
        /**
         * True if the customer can switch their current price plan via self serve. Defaults to False.
         * @type {boolean}
         * @memberof UpdateSelfServeSettingsArgs
         */
        switchPricePlans?: boolean;
        /**
         * True if the vendor has enabled customization for their customer portal.
         * @type {boolean}
         * @memberof UpdateSelfServeSettingsArgs
         */
        enabled?: boolean;
        /**
         * Time length of the default expiration for credits bought in the customer portal.
         * @type {number}
         * @memberof UpdateSelfServeSettingsArgs
         */
        creditsExpirationLength?: number;
        /**
         * True if the vendor has enabled customization for their customer portal.
         * @type {boolean}
         * @memberof UpdateSelfServeSettingsArgs
         */
        customization?: boolean;
        /**
         * Price per credit, in cents, that the customer is charged for buying credits through the customer portal
         * @type {number}
         * @memberof UpdateSelfServeSettingsArgs
         */
        pricePerCreditCents?: number;
        /**
         * True if the customer can purchase credits via self serve. Defaults to False.
         * @type {boolean}
         * @memberof UpdateSelfServeSettingsArgs
         */
        purchaseCredits?: boolean;
    }

    export function UpdateSelfServeSettingsArgsFromJSON(json: any): UpdateSelfServeSettingsArgs {
        return UpdateSelfServeSettingsArgsFromJSONTyped(json, false);
    }

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

            'creditsExpirationUnit': !exists(json, 'credits_expiration_unit') ? undefined : json['credits_expiration_unit'],
            'switchPricePlans': !exists(json, 'switch_price_plans') ? undefined : json['switch_price_plans'],
            'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
            'creditsExpirationLength': !exists(json, 'credits_expiration_length') ? undefined : json['credits_expiration_length'],
            'customization': !exists(json, 'customization') ? undefined : json['customization'],
            'pricePerCreditCents': !exists(json, 'price_per_credit_cents') ? undefined : json['price_per_credit_cents'],
            'purchaseCredits': !exists(json, 'purchase_credits') ? undefined : json['purchase_credits'],
        };
    }

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

            'credits_expiration_unit': value.creditsExpirationUnit,
            'switch_price_plans': value.switchPricePlans,
            'enabled': value.enabled,
            'credits_expiration_length': value.creditsExpirationLength,
            'customization': value.customization,
            'price_per_credit_cents': value.pricePerCreditCents,
            'purchase_credits': value.purchaseCredits,
        };
    }