# All files / codegen/models UpdateSelfServeSettingsArgs.ts

68.46% Statements 76/111
100% Branches 0/0
0% Functions 0/3
68.46% Lines 76/111

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

    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 {

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

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

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