UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
118 lines (103 loc) 3.37 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 ExecutionExecutionLegs from './ExecutionExecutionLegs'; /** * The Execution model module. * @module model/Execution * @version 0.1.4 */ export default class Execution { /** * Constructs a new <code>Execution</code>. * @alias module:model/Execution * @class */ constructor() { } /** * 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. */ static constructFromObject(data, obj) { if (data) { obj = obj || new Execution(); if (data.hasOwnProperty('activityType')) { obj['activityType'] = ApiClient.convertToType(data['activityType'], 'String'); } if (data.hasOwnProperty('executionType')) { obj['executionType'] = ApiClient.convertToType(data['executionType'], 'String'); } if (data.hasOwnProperty('quantity')) { obj['quantity'] = ApiClient.convertToType(data['quantity'], 'Number'); } if (data.hasOwnProperty('orderRamainingQuantity')) { obj['orderRamainingQuantity'] = ApiClient.convertToType(data['orderRamainingQuantity'], 'Number'); } if (data.hasOwnProperty('executionLegs')) { obj['executionLegs'] = ApiClient.convertToType(data['executionLegs'], [ExecutionExecutionLegs]); } } return obj; } /** * @member {module:model/Execution.ActivityTypeEnum} activityType */ 'activityType' = undefined; /** * @member {module:model/Execution.ExecutionTypeEnum} executionType */ 'executionType' = undefined; /** * @member {Number} quantity */ 'quantity' = undefined; /** * @member {Number} orderRamainingQuantity */ 'orderRamainingQuantity' = undefined; /** * @member {Array.<module:model/ExecutionExecutionLegs>} executionLegs */ 'executionLegs' = undefined; /** * Allowed values for the <code>activityType</code> property. * @enum {String} * @readonly */ static 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 */ static ExecutionTypeEnum = { /** * value: "FILL" * @const */ "FILL": "FILL" }; }