@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
157 lines (142 loc) • 4.59 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';
/**
* The UserPrincipalAuthorizations model module.
* @module model/UserPrincipalAuthorizations
* @version 0.1.4
*/
export default class UserPrincipalAuthorizations {
/**
* Constructs a new <code>UserPrincipalAuthorizations</code>.
* @alias module:model/UserPrincipalAuthorizations
* @class
*/
constructor() {
}
/**
* 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.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new UserPrincipalAuthorizations();
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('stockTrading')) {
obj['stockTrading'] = ApiClient.convertToType(data['stockTrading'], 'Boolean');
}
if (data.hasOwnProperty('marginTrading')) {
obj['marginTrading'] = ApiClient.convertToType(data['marginTrading'], 'Boolean');
}
if (data.hasOwnProperty('streamingNews')) {
obj['streamingNews'] = ApiClient.convertToType(data['streamingNews'], 'Boolean');
}
if (data.hasOwnProperty('optionTradingLevel')) {
obj['optionTradingLevel'] = ApiClient.convertToType(data['optionTradingLevel'], 'String');
}
if (data.hasOwnProperty('streamerAccess')) {
obj['streamerAccess'] = ApiClient.convertToType(data['streamerAccess'], 'Boolean');
}
if (data.hasOwnProperty('advancedMargin')) {
obj['advancedMargin'] = ApiClient.convertToType(data['advancedMargin'], 'Boolean');
}
if (data.hasOwnProperty('scottradeAccount')) {
obj['scottradeAccount'] = ApiClient.convertToType(data['scottradeAccount'], 'Boolean');
}
}
return obj;
}
/**
* @member {Boolean} apex
* @default false
*/
'apex' = false;
/**
* @member {Boolean} levelTwoQuotes
* @default false
*/
'levelTwoQuotes' = false;
/**
* @member {Boolean} stockTrading
* @default false
*/
'stockTrading' = false;
/**
* @member {Boolean} marginTrading
* @default false
*/
'marginTrading' = false;
/**
* @member {Boolean} streamingNews
* @default false
*/
'streamingNews' = false;
/**
* @member {module:model/UserPrincipalAuthorizations.OptionTradingLevelEnum} optionTradingLevel
*/
'optionTradingLevel' = undefined;
/**
* @member {Boolean} streamerAccess
* @default false
*/
'streamerAccess' = false;
/**
* @member {Boolean} advancedMargin
* @default false
*/
'advancedMargin' = false;
/**
* @member {Boolean} scottradeAccount
* @default false
*/
'scottradeAccount' = false;
/**
* Allowed values for the <code>optionTradingLevel</code> property.
* @enum {String}
* @readonly
*/
static 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" };
}