Source: models/PriceAdjustmentLimit.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/**
 * Shop API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 20.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */


import ApiClient from '../ApiClient'





/**
* The PriceAdjustmentLimit model module.
* @module models/PriceAdjustmentLimit
* @version 20.4
*/
export default class PriceAdjustmentLimit {
    /**
    * Constructs a new <code>PriceAdjustmentLimit</code>.
    *   A price adjustment limit specifies the amount of manual adjustment that can be applied by a user at the specified  level.
    * @alias module:models/PriceAdjustmentLimit
    * @class
    */

    constructor() {








    }

    /**
    * Constructs a <code>PriceAdjustmentLimit</code> from a plain JavaScript object, optionally creating a new instance.
    * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
    * @param {Object} data The plain JavaScript object bearing properties of interest.
    * @param {module:models/PriceAdjustmentLimit} obj Optional instance to populate.
    * @return {module:models/PriceAdjustmentLimit} The populated <code>PriceAdjustmentLimit</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new PriceAdjustmentLimit()





            if (data.hasOwnProperty('amount')) {
                obj.amount = ApiClient.convertToType(data.amount, 'Number')
            }
            if (data.hasOwnProperty('currency')) {
                obj.currency = ApiClient.convertToType(data.currency, 'String')
            }
            if (data.hasOwnProperty('percent')) {
                obj.percent = ApiClient.convertToType(data.percent, 'Number')
            }
            if (data.hasOwnProperty('type')) {
                obj.type = ApiClient.convertToType(data.type, 'String')
            }
        }
        return obj
    }

    /**
    * The value for the currency or null if no currency value is specified.
    * @member {Number} amount
    */
    amount = undefined;
    /**
    * Returns the currency of the Price Adjustment Limit or null if not applicable.    Will be null if this is a percent limit only.    Price adjustment limits can be given up to a fixed amount (unit=a currency unit).
    * @member {String} currency
    */
    currency = undefined;
    /**
    * Returns percentage value of the Price Adjustment Limit or null if not applicable.    Will be null if this is a currency limit only.
    * @member {Number} percent
    */
    percent = undefined;
    /**
    * The Price Adjustment Limit type - ITEM, SHIPPING or ORDER. It identifies the level at which the Price Adjustment  is applicable.
    * @member {module:models/PriceAdjustmentLimit.TypeEnum} type
    */
    type = undefined;






    /**
    * Allowed values for the <code>type</code> property.
    * @enum {String}
    * @readonly
    */
    static TypeEnum = {

        /**
         * value: "item"
         * @const
         */
        item: 'item',

        /**
         * value: "shipping"
         * @const
         */
        shipping: 'shipping',

        /**
         * value: "order"
         * @const
         */
        order: 'order'
    };



}