@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
106 lines (92 loc) • 3.08 kB
JavaScript
/**
* 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
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient';
import EquityAssetType from './EquityAssetType';
/**
* The FixedIncome model module.
* @module model/FixedIncome
* @version 0.1.4
*/
export default class FixedIncome {
/**
* Constructs a new <code>FixedIncome</code>.
* @alias module:model/FixedIncome
* @class
*/
constructor() {
OneOfInstrumentSchema.call(this);
}
/**
* Constructs a <code>FixedIncome</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/FixedIncome} obj Optional instance to populate.
* @return {module:model/FixedIncome} The populated <code>FixedIncome</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new FixedIncome();
if (data.hasOwnProperty('assetType')) {
obj['assetType'] = EquityAssetType.constructFromObject(data['assetType']);
}
if (data.hasOwnProperty('cusip')) {
obj['cusip'] = ApiClient.convertToType(data['cusip'], 'String');
}
if (data.hasOwnProperty('symbol')) {
obj['symbol'] = ApiClient.convertToType(data['symbol'], 'String');
}
if (data.hasOwnProperty('description')) {
obj['description'] = ApiClient.convertToType(data['description'], 'String');
}
if (data.hasOwnProperty('maturityDate')) {
obj['maturityDate'] = ApiClient.convertToType(data['maturityDate'], 'Date');
}
if (data.hasOwnProperty('variableRate')) {
obj['variableRate'] = ApiClient.convertToType(data['variableRate'], 'Number');
}
if (data.hasOwnProperty('factor')) {
obj['factor'] = ApiClient.convertToType(data['factor'], 'Number');
}
}
return obj;
}
/**
* @member {module:model/EquityAssetType} assetType
*/
'assetType' = undefined;
/**
* @member {String} cusip
*/
'cusip' = undefined;
/**
* @member {String} symbol
*/
'symbol' = undefined;
/**
* @member {String} description
*/
'description' = undefined;
/**
* @member {Date} maturityDate
*/
'maturityDate' = undefined;
/**
* @member {Number} variableRate
*/
'variableRate' = undefined;
/**
* @member {Number} factor
*/
'factor' = undefined;
// Implement OneOfInstrumentSchema interface:
}