/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2017 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* OCC No description provided (generated by Swagger Codegen
* https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v2
*
*
* 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 PromotionRestriction model module.
* @module models/PromotionRestriction
* @version v2
*/
export default class PromotionRestriction {
/**
* Constructs a new <code>PromotionRestriction</code>.
* @alias module:models/PromotionRestriction
* @class
*/
constructor() {
/**
*
* @member {String} restrictionType
*/
this.restrictionType = undefined
/**
*
* @member {String} description
*/
this.description = undefined
}
/**
* Constructs a <code>PromotionRestriction</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/PromotionRestriction} obj Optional instance to
* populate.
* @return {module:models/PromotionRestriction} The populated
* <code>PromotionRestriction</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new PromotionRestriction()
if (data.hasOwnProperty('restrictionType')) {
obj.restrictionType = ApiClient.convertToType(data.restrictionType, 'String')
}
if (data.hasOwnProperty('description')) {
obj.description = ApiClient.convertToType(data.description, 'String')
}
}
return obj
}
}