UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
127 lines (112 loc) 4.05 kB
/** * 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 UserPrincipalAuthorizations from './UserPrincipalAuthorizations'; import UserPrincipalPreferences from './UserPrincipalPreferences'; /** * The UserPrincipalAccounts model module. * @module model/UserPrincipalAccounts * @version 0.1.4 */ export default class UserPrincipalAccounts { /** * Constructs a new <code>UserPrincipalAccounts</code>. * @alias module:model/UserPrincipalAccounts * @class */ constructor() { } /** * 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. */ static constructFromObject(data, obj) { if (data) { obj = obj || new UserPrincipalAccounts(); if (data.hasOwnProperty('accountId')) { obj['accountId'] = ApiClient.convertToType(data['accountId'], '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('accountCdDomainId')) { obj['accountCdDomainId'] = ApiClient.convertToType(data['accountCdDomainId'], 'String'); } if (data.hasOwnProperty('company')) { obj['company'] = ApiClient.convertToType(data['company'], 'String'); } if (data.hasOwnProperty('segment')) { obj['segment'] = ApiClient.convertToType(data['segment'], 'String'); } if (data.hasOwnProperty('surrogateIds')) { obj['surrogateIds'] = ApiClient.convertToType(data['surrogateIds'], {'String': 'String'}); } if (data.hasOwnProperty('preferences')) { obj['preferences'] = UserPrincipalPreferences.constructFromObject(data['preferences']); } if (data.hasOwnProperty('acl')) { obj['acl'] = ApiClient.convertToType(data['acl'], 'String'); } if (data.hasOwnProperty('authorizations')) { obj['authorizations'] = UserPrincipalAuthorizations.constructFromObject(data['authorizations']); } } return obj; } /** * @member {String} accountId */ 'accountId' = undefined; /** * @member {String} description */ 'description' = undefined; /** * @member {String} displayName */ 'displayName' = undefined; /** * @member {String} accountCdDomainId */ 'accountCdDomainId' = undefined; /** * @member {String} company */ 'company' = undefined; /** * @member {String} segment */ 'segment' = undefined; /** * @member {Object.<String, String>} surrogateIds */ 'surrogateIds' = undefined; /** * @member {module:model/UserPrincipalPreferences} preferences */ 'preferences' = undefined; /** * @member {String} acl */ 'acl' = undefined; /** * @member {module:model/UserPrincipalAuthorizations} authorizations */ 'authorizations' = undefined; }