UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
192 lines (166 loc) 5.29 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'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) if (!root.GitChrisQueen_TDA_JS) { root.GitChrisQueen_TDA_JS = {}; } root.GitChrisQueen_TDA_JS.TransactionTransactionItemInstrument = factory(root.GitChrisQueen_TDA_JS.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * The TransactionTransactionItemInstrument model module. * @module model/TransactionTransactionItemInstrument * @version 0.1.4 */ /** * Constructs a new <code>TransactionTransactionItemInstrument</code>. * @alias module:model/TransactionTransactionItemInstrument * @class */ var exports = function() { }; /** * Constructs a <code>TransactionTransactionItemInstrument</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/TransactionTransactionItemInstrument} obj Optional instance to populate. * @return {module:model/TransactionTransactionItemInstrument} The populated <code>TransactionTransactionItemInstrument</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('assetType')) obj.assetType = ApiClient.convertToType(data['assetType'], 'String'); if (data.hasOwnProperty('bondInterestRate')) obj.bondInterestRate = ApiClient.convertToType(data['bondInterestRate'], 'Number'); if (data.hasOwnProperty('bondMaturityDate')) obj.bondMaturityDate = ApiClient.convertToType(data['bondMaturityDate'], 'Date'); if (data.hasOwnProperty('cusip')) obj.cusip = ApiClient.convertToType(data['cusip'], 'String'); if (data.hasOwnProperty('description')) obj.description = ApiClient.convertToType(data['description'], 'String'); if (data.hasOwnProperty('optionExpirationDate')) obj.optionExpirationDate = ApiClient.convertToType(data['optionExpirationDate'], 'Date'); if (data.hasOwnProperty('optionStrikePrice')) obj.optionStrikePrice = ApiClient.convertToType(data['optionStrikePrice'], 'Number'); if (data.hasOwnProperty('putCall')) obj.putCall = ApiClient.convertToType(data['putCall'], 'String'); if (data.hasOwnProperty('symbol')) obj.symbol = ApiClient.convertToType(data['symbol'], 'String'); if (data.hasOwnProperty('underlyingSymbol')) obj.underlyingSymbol = ApiClient.convertToType(data['underlyingSymbol'], 'String'); } return obj; } /** * @member {module:model/TransactionTransactionItemInstrument.AssetTypeEnum} assetType */ exports.prototype.assetType = undefined; /** * @member {Number} bondInterestRate */ exports.prototype.bondInterestRate = undefined; /** * @member {Date} bondMaturityDate */ exports.prototype.bondMaturityDate = undefined; /** * @member {String} cusip */ exports.prototype.cusip = undefined; /** * @member {String} description */ exports.prototype.description = undefined; /** * @member {Date} optionExpirationDate */ exports.prototype.optionExpirationDate = undefined; /** * @member {Number} optionStrikePrice */ exports.prototype.optionStrikePrice = undefined; /** * @member {module:model/TransactionTransactionItemInstrument.PutCallEnum} putCall */ exports.prototype.putCall = undefined; /** * @member {String} symbol */ exports.prototype.symbol = undefined; /** * @member {String} underlyingSymbol */ exports.prototype.underlyingSymbol = undefined; /** * Allowed values for the <code>assetType</code> property. * @enum {String} * @readonly */ exports.AssetTypeEnum = { /** * value: "EQUITY" * @const */ EQUITY: "EQUITY", /** * value: "MUTUAL_FUND" * @const */ MUTUAL_FUND: "MUTUAL_FUND", /** * value: "OPTION" * @const */ OPTION: "OPTION", /** * value: "FIXED_INCOME" * @const */ FIXED_INCOME: "FIXED_INCOME", /** * value: "CASH_EQUIVALENT" * @const */ CASH_EQUIVALENT: "CASH_EQUIVALENT" }; /** * Allowed values for the <code>putCall</code> property. * @enum {String} * @readonly */ exports.PutCallEnum = { /** * value: "PUT" * @const */ PUT: "PUT", /** * value: "CALL" * @const */ CALL: "CALL" }; return exports; }));