UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
87 lines (77 loc) 2.62 kB
/* * TD Ameritrade API - OAuth2 * This is replication of the TD Ameritrade API. * * OpenAPI spec version: 0.1.4 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.14 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient', 'model/CandleListCandles'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./CandleListCandles')); } else { // Browser globals (root is window) if (!root.GitChrisQueen_TDA_JS) { root.GitChrisQueen_TDA_JS = {}; } root.GitChrisQueen_TDA_JS.CandleList = factory(root.GitChrisQueen_TDA_JS.ApiClient, root.GitChrisQueen_TDA_JS.CandleListCandles); } }(this, function(ApiClient, CandleListCandles) { 'use strict'; /** * The CandleList model module. * @module model/CandleList * @version 0.1.4 */ /** * Constructs a new <code>CandleList</code>. * List of Candles * @alias module:model/CandleList * @class */ var exports = function() { }; /** * Constructs a <code>CandleList</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:model/CandleList} obj Optional instance to populate. * @return {module:model/CandleList} The populated <code>CandleList</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('candles')) obj.candles = ApiClient.convertToType(data['candles'], [CandleListCandles]); if (data.hasOwnProperty('empty')) obj.empty = ApiClient.convertToType(data['empty'], 'Boolean'); if (data.hasOwnProperty('symbol')) obj.symbol = ApiClient.convertToType(data['symbol'], 'String'); } return obj; } /** * @member {Array.<module:model/CandleListCandles>} candles */ exports.prototype.candles = undefined; /** * @member {Boolean} empty */ exports.prototype.empty = undefined; /** * Symbol * @member {String} symbol */ exports.prototype.symbol = undefined; return exports; }));