@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
123 lines (109 loc) • 3.38 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 MutualFund model module.
* @module model/MutualFund
* @version 0.1.4
*/
export default class MutualFund {
/**
* Constructs a new <code>MutualFund</code>.
* @alias module:model/MutualFund
* @class
*/
constructor() {
OneOfInstrumentSchema.call(this);
}
/**
* Constructs a <code>MutualFund</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/MutualFund} obj Optional instance to populate.
* @return {module:model/MutualFund} The populated <code>MutualFund</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new MutualFund();
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('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
}
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 {module:model/MutualFund.TypeEnum} type
*/
'type' = undefined;
// Implement OneOfInstrumentSchema interface:
/**
* Allowed values for the <code>type</code> property.
* @enum {String}
* @readonly
*/
static TypeEnum = {
/**
* value: "NOT_APPLICABLE"
* @const
*/
"NOT_APPLICABLE": "NOT_APPLICABLE",
/**
* value: "OPEN_END_NON_TAXABLE"
* @const
*/
"OPEN_END_NON_TAXABLE": "OPEN_END_NON_TAXABLE",
/**
* value: "OPEN_END_TAXABLE"
* @const
*/
"OPEN_END_TAXABLE": "OPEN_END_TAXABLE",
/**
* value: "NO_LOAD_NON_TAXABLE"
* @const
*/
"NO_LOAD_NON_TAXABLE": "NO_LOAD_NON_TAXABLE",
/**
* value: "NO_LOAD_TAXABLE"
* @const
*/
"NO_LOAD_TAXABLE": "NO_LOAD_TAXABLE" };
}