@gitchrisqueen/tdameritrade-api-js-client
Version:
TD Ameritrade API integration for node.js
133 lines (116 loc) • 3.8 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/ExecutionExecutionLegs'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./ExecutionExecutionLegs'));
} else {
// Browser globals (root is window)
if (!root.GitChrisQueen_TDA_JS) {
root.GitChrisQueen_TDA_JS = {};
}
root.GitChrisQueen_TDA_JS.Execution = factory(root.GitChrisQueen_TDA_JS.ApiClient, root.GitChrisQueen_TDA_JS.ExecutionExecutionLegs);
}
}(this, function(ApiClient, ExecutionExecutionLegs) {
'use strict';
/**
* The Execution model module.
* @module model/Execution
* @version 0.1.4
*/
/**
* Constructs a new <code>Execution</code>.
* @alias module:model/Execution
* @class
*/
var exports = function() {
};
/**
* Constructs a <code>Execution</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/Execution} obj Optional instance to populate.
* @return {module:model/Execution} The populated <code>Execution</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('activityType'))
obj.activityType = ApiClient.convertToType(data['activityType'], 'String');
if (data.hasOwnProperty('executionLegs'))
obj.executionLegs = ApiClient.convertToType(data['executionLegs'], [ExecutionExecutionLegs]);
if (data.hasOwnProperty('executionType'))
obj.executionType = ApiClient.convertToType(data['executionType'], 'String');
if (data.hasOwnProperty('orderRamainingQuantity'))
obj.orderRamainingQuantity = ApiClient.convertToType(data['orderRamainingQuantity'], 'Number');
if (data.hasOwnProperty('quantity'))
obj.quantity = ApiClient.convertToType(data['quantity'], 'Number');
}
return obj;
}
/**
* @member {module:model/Execution.ActivityTypeEnum} activityType
*/
exports.prototype.activityType = undefined;
/**
* @member {Array.<module:model/ExecutionExecutionLegs>} executionLegs
*/
exports.prototype.executionLegs = undefined;
/**
* @member {module:model/Execution.ExecutionTypeEnum} executionType
*/
exports.prototype.executionType = undefined;
/**
* @member {Number} orderRamainingQuantity
*/
exports.prototype.orderRamainingQuantity = undefined;
/**
* @member {Number} quantity
*/
exports.prototype.quantity = undefined;
/**
* Allowed values for the <code>activityType</code> property.
* @enum {String}
* @readonly
*/
exports.ActivityTypeEnum = {
/**
* value: "EXECUTION"
* @const
*/
EXECUTION: "EXECUTION",
/**
* value: "ORDER_ACTION"
* @const
*/
ORDER_ACTION: "ORDER_ACTION"
};
/**
* Allowed values for the <code>executionType</code> property.
* @enum {String}
* @readonly
*/
exports.ExecutionTypeEnum = {
/**
* value: "FILL"
* @const
*/
FILL: "FILL"
};
return exports;
}));