@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
173 lines (151 loc) • 4.79 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'], 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.UserPrincipalAuthorizations = factory(root.GitChrisQueen_TDA_JS.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The UserPrincipalAuthorizations model module.
* @module model/UserPrincipalAuthorizations
* @version 0.1.4
*/
/**
* Constructs a new <code>UserPrincipalAuthorizations</code>.
* @alias module:model/UserPrincipalAuthorizations
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>UserPrincipalAuthorizations</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/UserPrincipalAuthorizations} obj Optional instance to populate.
* @return {module:model/UserPrincipalAuthorizations} The populated <code>UserPrincipalAuthorizations</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('advancedMargin'))
obj.advancedMargin = ApiClient.convertToType(data['advancedMargin'], 'Boolean');
if (data.hasOwnProperty('apex'))
obj.apex = ApiClient.convertToType(data['apex'], 'Boolean');
if (data.hasOwnProperty('levelTwoQuotes'))
obj.levelTwoQuotes = ApiClient.convertToType(data['levelTwoQuotes'], 'Boolean');
if (data.hasOwnProperty('marginTrading'))
obj.marginTrading = ApiClient.convertToType(data['marginTrading'], 'Boolean');
if (data.hasOwnProperty('optionTradingLevel'))
obj.optionTradingLevel = ApiClient.convertToType(data['optionTradingLevel'], 'String');
if (data.hasOwnProperty('scottradeAccount'))
obj.scottradeAccount = ApiClient.convertToType(data['scottradeAccount'], 'Boolean');
if (data.hasOwnProperty('stockTrading'))
obj.stockTrading = ApiClient.convertToType(data['stockTrading'], 'Boolean');
if (data.hasOwnProperty('streamerAccess'))
obj.streamerAccess = ApiClient.convertToType(data['streamerAccess'], 'Boolean');
if (data.hasOwnProperty('streamingNews'))
obj.streamingNews = ApiClient.convertToType(data['streamingNews'], 'Boolean');
}
return obj;
}
/**
* @member {Boolean} advancedMargin
* @default false
*/
exports.prototype.advancedMargin = false;
/**
* @member {Boolean} apex
* @default false
*/
exports.prototype.apex = false;
/**
* @member {Boolean} levelTwoQuotes
* @default false
*/
exports.prototype.levelTwoQuotes = false;
/**
* @member {Boolean} marginTrading
* @default false
*/
exports.prototype.marginTrading = false;
/**
* @member {module:model/UserPrincipalAuthorizations.OptionTradingLevelEnum} optionTradingLevel
*/
exports.prototype.optionTradingLevel = undefined;
/**
* @member {Boolean} scottradeAccount
* @default false
*/
exports.prototype.scottradeAccount = false;
/**
* @member {Boolean} stockTrading
* @default false
*/
exports.prototype.stockTrading = false;
/**
* @member {Boolean} streamerAccess
* @default false
*/
exports.prototype.streamerAccess = false;
/**
* @member {Boolean} streamingNews
* @default false
*/
exports.prototype.streamingNews = false;
/**
* Allowed values for the <code>optionTradingLevel</code> property.
* @enum {String}
* @readonly
*/
exports.OptionTradingLevelEnum = {
/**
* value: "COVERED"
* @const
*/
COVERED: "COVERED",
/**
* value: "FULL"
* @const
*/
FULL: "FULL",
/**
* value: "LONG"
* @const
*/
LONG: "LONG",
/**
* value: "SPREAD"
* @const
*/
SPREAD: "SPREAD",
/**
* value: "NONE"
* @const
*/
NONE: "NONE"
};
return exports;
}));