@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
124 lines (108 loc) • 3.44 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
*
* 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/EquityAssetType'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./EquityAssetType'));
} else {
// Browser globals (root is window)
if (!root.GitChrisQueen_TDA_JS) {
root.GitChrisQueen_TDA_JS = {};
}
root.GitChrisQueen_TDA_JS.OptionOptionDeliverables = factory(root.GitChrisQueen_TDA_JS.ApiClient, root.GitChrisQueen_TDA_JS.EquityAssetType);
}
}(this, function(ApiClient, EquityAssetType) {
'use strict';
/**
* The OptionOptionDeliverables model module.
* @module model/OptionOptionDeliverables
* @version 0.1.4
*/
/**
* Constructs a new <code>OptionOptionDeliverables</code>.
* @alias module:model/OptionOptionDeliverables
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>OptionOptionDeliverables</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/OptionOptionDeliverables} obj Optional instance to populate.
* @return {module:model/OptionOptionDeliverables} The populated <code>OptionOptionDeliverables</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('assetType'))
obj.assetType = EquityAssetType.constructFromObject(data['assetType']);
if (data.hasOwnProperty('currencyType'))
obj.currencyType = ApiClient.convertToType(data['currencyType'], 'String');
if (data.hasOwnProperty('deliverableUnits'))
obj.deliverableUnits = ApiClient.convertToType(data['deliverableUnits'], 'Number');
if (data.hasOwnProperty('symbol'))
obj.symbol = ApiClient.convertToType(data['symbol'], 'String');
}
return obj;
}
/**
* @member {module:model/EquityAssetType} assetType
*/
exports.prototype.assetType = undefined;
/**
* @member {module:model/OptionOptionDeliverables.CurrencyTypeEnum} currencyType
*/
exports.prototype.currencyType = undefined;
/**
* @member {Number} deliverableUnits
*/
exports.prototype.deliverableUnits = undefined;
/**
* @member {String} symbol
*/
exports.prototype.symbol = undefined;
/**
* Allowed values for the <code>currencyType</code> property.
* @enum {String}
* @readonly
*/
exports.CurrencyTypeEnum = {
/**
* value: "USD"
* @const
*/
USD: "USD",
/**
* value: "CAD"
* @const
*/
CAD: "CAD",
/**
* value: "EUR"
* @const
*/
EUR: "EUR",
/**
* value: "JPY"
* @const
*/
JPY: "JPY"
};
return exports;
}));