@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
191 lines (166 loc) • 6.37 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.CashAccountInitialBalances = factory(root.GitChrisQueen_TDA_JS.ApiClient);
}
}(this, function(ApiClient) {
'use strict';
/**
* The CashAccountInitialBalances model module.
* @module model/CashAccountInitialBalances
* @version 0.1.4
*/
/**
* Constructs a new <code>CashAccountInitialBalances</code>.
* @alias module:model/CashAccountInitialBalances
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>CashAccountInitialBalances</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/CashAccountInitialBalances} obj Optional instance to populate.
* @return {module:model/CashAccountInitialBalances} The populated <code>CashAccountInitialBalances</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('accountValue'))
obj.accountValue = ApiClient.convertToType(data['accountValue'], 'Number');
if (data.hasOwnProperty('accruedInterest'))
obj.accruedInterest = ApiClient.convertToType(data['accruedInterest'], 'Number');
if (data.hasOwnProperty('bondValue'))
obj.bondValue = ApiClient.convertToType(data['bondValue'], 'Number');
if (data.hasOwnProperty('cashAvailableForTrading'))
obj.cashAvailableForTrading = ApiClient.convertToType(data['cashAvailableForTrading'], 'Number');
if (data.hasOwnProperty('cashAvailableForWithdrawal'))
obj.cashAvailableForWithdrawal = ApiClient.convertToType(data['cashAvailableForWithdrawal'], 'Number');
if (data.hasOwnProperty('cashBalance'))
obj.cashBalance = ApiClient.convertToType(data['cashBalance'], 'Number');
if (data.hasOwnProperty('cashDebitCallValue'))
obj.cashDebitCallValue = ApiClient.convertToType(data['cashDebitCallValue'], 'Number');
if (data.hasOwnProperty('cashReceipts'))
obj.cashReceipts = ApiClient.convertToType(data['cashReceipts'], 'Number');
if (data.hasOwnProperty('isInCall'))
obj.isInCall = ApiClient.convertToType(data['isInCall'], 'Boolean');
if (data.hasOwnProperty('liquidationValue'))
obj.liquidationValue = ApiClient.convertToType(data['liquidationValue'], 'Number');
if (data.hasOwnProperty('longOptionMarketValue'))
obj.longOptionMarketValue = ApiClient.convertToType(data['longOptionMarketValue'], 'Number');
if (data.hasOwnProperty('longStockValue'))
obj.longStockValue = ApiClient.convertToType(data['longStockValue'], 'Number');
if (data.hasOwnProperty('moneyMarketFund'))
obj.moneyMarketFund = ApiClient.convertToType(data['moneyMarketFund'], 'Number');
if (data.hasOwnProperty('mutualFundValue'))
obj.mutualFundValue = ApiClient.convertToType(data['mutualFundValue'], 'Number');
if (data.hasOwnProperty('pendingDeposits'))
obj.pendingDeposits = ApiClient.convertToType(data['pendingDeposits'], 'Number');
if (data.hasOwnProperty('shortOptionMarketValue'))
obj.shortOptionMarketValue = ApiClient.convertToType(data['shortOptionMarketValue'], 'Number');
if (data.hasOwnProperty('shortStockValue'))
obj.shortStockValue = ApiClient.convertToType(data['shortStockValue'], 'Number');
if (data.hasOwnProperty('unsettledCash'))
obj.unsettledCash = ApiClient.convertToType(data['unsettledCash'], 'Number');
}
return obj;
}
/**
* @member {Number} accountValue
*/
exports.prototype.accountValue = undefined;
/**
* @member {Number} accruedInterest
*/
exports.prototype.accruedInterest = undefined;
/**
* @member {Number} bondValue
*/
exports.prototype.bondValue = undefined;
/**
* @member {Number} cashAvailableForTrading
*/
exports.prototype.cashAvailableForTrading = undefined;
/**
* @member {Number} cashAvailableForWithdrawal
*/
exports.prototype.cashAvailableForWithdrawal = undefined;
/**
* @member {Number} cashBalance
*/
exports.prototype.cashBalance = undefined;
/**
* @member {Number} cashDebitCallValue
*/
exports.prototype.cashDebitCallValue = undefined;
/**
* @member {Number} cashReceipts
*/
exports.prototype.cashReceipts = undefined;
/**
* @member {Boolean} isInCall
* @default false
*/
exports.prototype.isInCall = false;
/**
* @member {Number} liquidationValue
*/
exports.prototype.liquidationValue = undefined;
/**
* @member {Number} longOptionMarketValue
*/
exports.prototype.longOptionMarketValue = undefined;
/**
* @member {Number} longStockValue
*/
exports.prototype.longStockValue = undefined;
/**
* @member {Number} moneyMarketFund
*/
exports.prototype.moneyMarketFund = undefined;
/**
* @member {Number} mutualFundValue
*/
exports.prototype.mutualFundValue = undefined;
/**
* @member {Number} pendingDeposits
*/
exports.prototype.pendingDeposits = undefined;
/**
* @member {Number} shortOptionMarketValue
*/
exports.prototype.shortOptionMarketValue = undefined;
/**
* @member {Number} shortStockValue
*/
exports.prototype.shortStockValue = undefined;
/**
* @member {Number} unsettledCash
*/
exports.prototype.unsettledCash = undefined;
return exports;
}));