@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
134 lines (117 loc) • 4.53 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/UserPrincipalAuthorizations', 'model/UserPrincipalPreferences'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./UserPrincipalAuthorizations'), require('./UserPrincipalPreferences'));
} else {
// Browser globals (root is window)
if (!root.GitChrisQueen_TDA_JS) {
root.GitChrisQueen_TDA_JS = {};
}
root.GitChrisQueen_TDA_JS.UserPrincipalAccounts = factory(root.GitChrisQueen_TDA_JS.ApiClient, root.GitChrisQueen_TDA_JS.UserPrincipalAuthorizations, root.GitChrisQueen_TDA_JS.UserPrincipalPreferences);
}
}(this, function(ApiClient, UserPrincipalAuthorizations, UserPrincipalPreferences) {
'use strict';
/**
* The UserPrincipalAccounts model module.
* @module model/UserPrincipalAccounts
* @version 0.1.4
*/
/**
* Constructs a new <code>UserPrincipalAccounts</code>.
* @alias module:model/UserPrincipalAccounts
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>UserPrincipalAccounts</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/UserPrincipalAccounts} obj Optional instance to populate.
* @return {module:model/UserPrincipalAccounts} The populated <code>UserPrincipalAccounts</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('accountCdDomainId'))
obj.accountCdDomainId = ApiClient.convertToType(data['accountCdDomainId'], 'String');
if (data.hasOwnProperty('accountId'))
obj.accountId = ApiClient.convertToType(data['accountId'], 'String');
if (data.hasOwnProperty('acl'))
obj.acl = ApiClient.convertToType(data['acl'], 'String');
if (data.hasOwnProperty('authorizations'))
obj.authorizations = UserPrincipalAuthorizations.constructFromObject(data['authorizations']);
if (data.hasOwnProperty('company'))
obj.company = ApiClient.convertToType(data['company'], 'String');
if (data.hasOwnProperty('description'))
obj.description = ApiClient.convertToType(data['description'], 'String');
if (data.hasOwnProperty('displayName'))
obj.displayName = ApiClient.convertToType(data['displayName'], 'String');
if (data.hasOwnProperty('preferences'))
obj.preferences = UserPrincipalPreferences.constructFromObject(data['preferences']);
if (data.hasOwnProperty('segment'))
obj.segment = ApiClient.convertToType(data['segment'], 'String');
if (data.hasOwnProperty('surrogateIds'))
obj.surrogateIds = ApiClient.convertToType(data['surrogateIds'], {'String': 'String'});
}
return obj;
}
/**
* @member {String} accountCdDomainId
*/
exports.prototype.accountCdDomainId = undefined;
/**
* @member {String} accountId
*/
exports.prototype.accountId = undefined;
/**
* @member {String} acl
*/
exports.prototype.acl = undefined;
/**
* @member {module:model/UserPrincipalAuthorizations} authorizations
*/
exports.prototype.authorizations = undefined;
/**
* @member {String} company
*/
exports.prototype.company = undefined;
/**
* @member {String} description
*/
exports.prototype.description = undefined;
/**
* @member {String} displayName
*/
exports.prototype.displayName = undefined;
/**
* @member {module:model/UserPrincipalPreferences} preferences
*/
exports.prototype.preferences = undefined;
/**
* @member {String} segment
*/
exports.prototype.segment = undefined;
/**
* @member {Object.<String, String>} surrogateIds
*/
exports.prototype.surrogateIds = undefined;
return exports;
}));