/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* 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'
import Address from './Address'
import OrderEntry from './OrderEntry'
import Price from './Price'
/**
* The DeliveryOrderEntryGroup model module.
* @module models/DeliveryOrderEntryGroup
* @version v2
*/
export default class DeliveryOrderEntryGroup {
/**
* Constructs a new <code>DeliveryOrderEntryGroup</code>.
* @alias module:models/DeliveryOrderEntryGroup
* @class
*/
constructor() {
/**
* @member {module:models/Address} deliveryAddress
*/
this.deliveryAddress = undefined
/**
* @member {module:models/Price} totalPriceWithTax
*/
this.totalPriceWithTax = undefined
/**
*
* @member {Array.<module:models/OrderEntry>} entries
*/
this.entries = undefined
/**
*
* @member {Number} quantity
*/
this.quantity = undefined
}
/**
* Constructs a <code>DeliveryOrderEntryGroup</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/DeliveryOrderEntryGroup} obj Optional instance
* to populate.
* @return {module:models/DeliveryOrderEntryGroup} The populated
* <code>DeliveryOrderEntryGroup</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new DeliveryOrderEntryGroup()
if (data.hasOwnProperty('deliveryAddress')) {
obj.deliveryAddress = Address.constructFromObject(data.deliveryAddress)
}
if (data.hasOwnProperty('totalPriceWithTax')) {
obj.totalPriceWithTax = Price.constructFromObject(data.totalPriceWithTax)
}
if (data.hasOwnProperty('entries')) {
obj.entries = ApiClient.convertToType(data.entries, [OrderEntry])
}
if (data.hasOwnProperty('quantity')) {
obj.quantity = ApiClient.convertToType(data.quantity, 'Number')
}
}
return obj
}
}