UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
89 lines (79 loc) 2.97 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/WatchListRequestWatchlistItems'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./WatchListRequestWatchlistItems')); } else { // Browser globals (root is window) if (!root.GitChrisQueen_TDA_JS) { root.GitChrisQueen_TDA_JS = {}; } root.GitChrisQueen_TDA_JS.WatchListRequest = factory(root.GitChrisQueen_TDA_JS.ApiClient, root.GitChrisQueen_TDA_JS.WatchListRequestWatchlistItems); } }(this, function(ApiClient, WatchListRequestWatchlistItems) { 'use strict'; /** * The WatchListRequest model module. * @module model/WatchListRequest * @version 0.1.4 */ /** * Constructs a new <code>WatchListRequest</code>. * @alias module:model/WatchListRequest * @class * @param name {String} * @param watchlistItems {Array.<module:model/WatchListRequestWatchlistItems>} */ var exports = function(name, watchlistItems) { this.name = name; this.watchlistItems = watchlistItems; }; /** * Constructs a <code>WatchListRequest</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/WatchListRequest} obj Optional instance to populate. * @return {module:model/WatchListRequest} The populated <code>WatchListRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('name')) obj.name = ApiClient.convertToType(data['name'], 'String'); if (data.hasOwnProperty('watchlistId')) obj.watchlistId = ApiClient.convertToType(data['watchlistId'], 'String'); if (data.hasOwnProperty('watchlistItems')) obj.watchlistItems = ApiClient.convertToType(data['watchlistItems'], [WatchListRequestWatchlistItems]); } return obj; } /** * @member {String} name */ exports.prototype.name = undefined; /** * @member {String} watchlistId */ exports.prototype.watchlistId = undefined; /** * @member {Array.<module:model/WatchListRequestWatchlistItems>} watchlistItems */ exports.prototype.watchlistItems = undefined; return exports; }));