Source: models/OrderHistoryList.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* 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 OrderHistory from './OrderHistory'
import Pagination from './Pagination'
import Sort from './Sort'

/**
* The OrderHistoryList model module.
* @module models/OrderHistoryList
* @version v2
*/
export default class OrderHistoryList {
    /**
    * Constructs a new <code>OrderHistoryList</code>.
    * @alias module:models/OrderHistoryList
    * @class
    */

    constructor() {
        /**
    *
    * @member {Array.<module:models/OrderHistory>} orders
    */
        this.orders = undefined
        /**
    *
    * @member {Array.<module:models/Sort>} sorts
    */
        this.sorts = undefined
        /**
    * @member {module:models/Pagination} pagination
    */
        this.pagination = undefined
    }

    /**
    * Constructs a <code>OrderHistoryList</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/OrderHistoryList} obj Optional instance to
    * populate.
    * @return {module:models/OrderHistoryList} The populated
    * <code>OrderHistoryList</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new OrderHistoryList()

            if (data.hasOwnProperty('orders')) {
                obj.orders = ApiClient.convertToType(data.orders, [OrderHistory])
            }
            if (data.hasOwnProperty('sorts')) {
                obj.sorts = ApiClient.convertToType(data.sorts, [Sort])
            }
            if (data.hasOwnProperty('pagination')) {
                obj.pagination = Pagination.constructFromObject(data.pagination)
            }
        }
        return obj
    }



}