UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
821 lines (806 loc) 22.3 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 OrderGetCancelTime from './OrderGetCancelTime'; import OrderGetDuration from './OrderGetDuration'; import OrderGetOrderActivityCollection from './OrderGetOrderActivityCollection'; import OrderGetOrderLegCollection from './OrderGetOrderLegCollection'; import OrderGetOrderType from './OrderGetOrderType'; import OrderGetSession from './OrderGetSession'; /** * The OrderGet model module. * @module model/OrderGet * @version 0.1.4 */ export default class OrderGet { /** * Constructs a new <code>OrderGet</code>. * @alias module:model/OrderGet * @class */ constructor() { } /** * Constructs a <code>OrderGet</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/OrderGet} obj Optional instance to populate. * @return {module:model/OrderGet} The populated <code>OrderGet</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new OrderGet(); if (data.hasOwnProperty('session')) { obj['session'] = OrderGetSession.constructFromObject(data['session']); } if (data.hasOwnProperty('duration')) { obj['duration'] = OrderGetDuration.constructFromObject(data['duration']); } if (data.hasOwnProperty('orderType')) { obj['orderType'] = OrderGetOrderType.constructFromObject(data['orderType']); } if (data.hasOwnProperty('cancelTime')) { obj['cancelTime'] = OrderGetCancelTime.constructFromObject(data['cancelTime']); } if (data.hasOwnProperty('complexOrderStrategyType')) { obj['complexOrderStrategyType'] = ApiClient.convertToType(data['complexOrderStrategyType'], 'String'); } if (data.hasOwnProperty('quality')) { obj['quality'] = ApiClient.convertToType(data['quality'], 'Number'); } if (data.hasOwnProperty('filledQuantity')) { obj['filledQuantity'] = ApiClient.convertToType(data['filledQuantity'], 'Number'); } if (data.hasOwnProperty('remainingQuantity')) { obj['remainingQuantity'] = ApiClient.convertToType(data['remainingQuantity'], 'Number'); } if (data.hasOwnProperty('requestedDestination')) { obj['requestedDestination'] = ApiClient.convertToType(data['requestedDestination'], 'String'); } if (data.hasOwnProperty('destinationLinkName')) { obj['destinationLinkName'] = ApiClient.convertToType(data['destinationLinkName'], 'String'); } if (data.hasOwnProperty('releaseTime')) { obj['releaseTime'] = ApiClient.convertToType(data['releaseTime'], 'Date'); } if (data.hasOwnProperty('stopPrice')) { obj['stopPrice'] = ApiClient.convertToType(data['stopPrice'], 'Number'); } if (data.hasOwnProperty('stopPriceLinkBasis')) { obj['stopPriceLinkBasis'] = ApiClient.convertToType(data['stopPriceLinkBasis'], 'String'); } if (data.hasOwnProperty('stopPriceLinkType')) { obj['stopPriceLinkType'] = ApiClient.convertToType(data['stopPriceLinkType'], 'String'); } if (data.hasOwnProperty('stopPriceOffset')) { obj['stopPriceOffset'] = ApiClient.convertToType(data['stopPriceOffset'], 'Number'); } if (data.hasOwnProperty('stopType')) { obj['stopType'] = ApiClient.convertToType(data['stopType'], 'String'); } if (data.hasOwnProperty('priceLinkBasis')) { obj['priceLinkBasis'] = ApiClient.convertToType(data['priceLinkBasis'], 'String'); } if (data.hasOwnProperty('priceLinkType')) { obj['priceLinkType'] = ApiClient.convertToType(data['priceLinkType'], 'String'); } if (data.hasOwnProperty('price')) { obj['price'] = ApiClient.convertToType(data['price'], 'Number'); } if (data.hasOwnProperty('taxLotMethod')) { obj['taxLotMethod'] = ApiClient.convertToType(data['taxLotMethod'], 'String'); } if (data.hasOwnProperty('orderLegCollection')) { obj['orderLegCollection'] = ApiClient.convertToType(data['orderLegCollection'], [OrderGetOrderLegCollection]); } if (data.hasOwnProperty('activationPrice')) { obj['activationPrice'] = ApiClient.convertToType(data['activationPrice'], 'Number'); } if (data.hasOwnProperty('specialInstruction')) { obj['specialInstruction'] = ApiClient.convertToType(data['specialInstruction'], 'String'); } if (data.hasOwnProperty('orderStrategyType')) { obj['orderStrategyType'] = ApiClient.convertToType(data['orderStrategyType'], 'String'); } if (data.hasOwnProperty('orderId')) { obj['orderId'] = ApiClient.convertToType(data['orderId'], 'Number'); } if (data.hasOwnProperty('cancelable')) { obj['cancelable'] = ApiClient.convertToType(data['cancelable'], 'Boolean'); } if (data.hasOwnProperty('editable')) { obj['editable'] = ApiClient.convertToType(data['editable'], 'Boolean'); } if (data.hasOwnProperty('status')) { obj['status'] = ApiClient.convertToType(data['status'], 'String'); } if (data.hasOwnProperty('enteredTime')) { obj['enteredTime'] = ApiClient.convertToType(data['enteredTime'], 'Date'); } if (data.hasOwnProperty('closedTime')) { obj['closedTime'] = ApiClient.convertToType(data['closedTime'], 'Date'); } if (data.hasOwnProperty('tag')) { obj['tag'] = ApiClient.convertToType(data['tag'], 'String'); } if (data.hasOwnProperty('accountId')) { obj['accountId'] = ApiClient.convertToType(data['accountId'], 'Number'); } if (data.hasOwnProperty('orderActivityCollection')) { obj['orderActivityCollection'] = ApiClient.convertToType(data['orderActivityCollection'], [OrderGetOrderActivityCollection]); } if (data.hasOwnProperty('replacingOrderCollection')) { obj['replacingOrderCollection'] = ApiClient.convertToType(data['replacingOrderCollection'], [Object]); } if (data.hasOwnProperty('childOrderStrategies')) { obj['childOrderStrategies'] = ApiClient.convertToType(data['childOrderStrategies'], [Object]); } if (data.hasOwnProperty('statusDescription')) { obj['statusDescription'] = ApiClient.convertToType(data['statusDescription'], 'String'); } } return obj; } /** * @member {module:model/OrderGetSession} session */ 'session' = undefined; /** * @member {module:model/OrderGetDuration} duration */ 'duration' = undefined; /** * @member {module:model/OrderGetOrderType} orderType */ 'orderType' = undefined; /** * @member {module:model/OrderGetCancelTime} cancelTime */ 'cancelTime' = undefined; /** * @member {module:model/OrderGet.ComplexOrderStrategyTypeEnum} complexOrderStrategyType */ 'complexOrderStrategyType' = undefined; /** * @member {Number} quality */ 'quality' = undefined; /** * @member {Number} filledQuantity */ 'filledQuantity' = undefined; /** * @member {Number} remainingQuantity */ 'remainingQuantity' = undefined; /** * @member {module:model/OrderGet.RequestedDestinationEnum} requestedDestination */ 'requestedDestination' = undefined; /** * @member {String} destinationLinkName */ 'destinationLinkName' = undefined; /** * @member {Date} releaseTime */ 'releaseTime' = undefined; /** * @member {Number} stopPrice */ 'stopPrice' = undefined; /** * @member {module:model/OrderGet.StopPriceLinkBasisEnum} stopPriceLinkBasis */ 'stopPriceLinkBasis' = undefined; /** * @member {module:model/OrderGet.StopPriceLinkTypeEnum} stopPriceLinkType */ 'stopPriceLinkType' = undefined; /** * @member {Number} stopPriceOffset */ 'stopPriceOffset' = undefined; /** * @member {module:model/OrderGet.StopTypeEnum} stopType */ 'stopType' = undefined; /** * @member {module:model/OrderGet.PriceLinkBasisEnum} priceLinkBasis */ 'priceLinkBasis' = undefined; /** * @member {module:model/OrderGet.PriceLinkTypeEnum} priceLinkType */ 'priceLinkType' = undefined; /** * @member {Number} price */ 'price' = undefined; /** * @member {module:model/OrderGet.TaxLotMethodEnum} taxLotMethod */ 'taxLotMethod' = undefined; /** * @member {Array.<module:model/OrderGetOrderLegCollection>} orderLegCollection */ 'orderLegCollection' = undefined; /** * @member {Number} activationPrice */ 'activationPrice' = undefined; /** * @member {module:model/OrderGet.SpecialInstructionEnum} specialInstruction */ 'specialInstruction' = undefined; /** * @member {module:model/OrderGet.OrderStrategyTypeEnum} orderStrategyType */ 'orderStrategyType' = undefined; /** * @member {Number} orderId */ 'orderId' = undefined; /** * @member {Boolean} cancelable * @default false */ 'cancelable' = false; /** * @member {Boolean} editable * @default false */ 'editable' = false; /** * @member {module:model/OrderGet.StatusEnum} status */ 'status' = undefined; /** * @member {Date} enteredTime */ 'enteredTime' = undefined; /** * @member {Date} closedTime */ 'closedTime' = undefined; /** * @member {String} tag */ 'tag' = undefined; /** * @member {Number} accountId */ 'accountId' = undefined; /** * @member {Array.<module:model/OrderGetOrderActivityCollection>} orderActivityCollection */ 'orderActivityCollection' = undefined; /** * @member {Array.<Object>} replacingOrderCollection */ 'replacingOrderCollection' = undefined; /** * @member {Array.<Object>} childOrderStrategies */ 'childOrderStrategies' = undefined; /** * @member {String} statusDescription */ 'statusDescription' = undefined; /** * Allowed values for the <code>complexOrderStrategyType</code> property. * @enum {String} * @readonly */ static ComplexOrderStrategyTypeEnum = { /** * value: "NONE" * @const */ "NONE": "NONE", /** * value: "COVERED" * @const */ "COVERED": "COVERED", /** * value: "VERTICAL" * @const */ "VERTICAL": "VERTICAL", /** * value: "BACK_RATIO" * @const */ "BACK_RATIO": "BACK_RATIO", /** * value: "CALENDAR" * @const */ "CALENDAR": "CALENDAR", /** * value: "DIAGONAL" * @const */ "DIAGONAL": "DIAGONAL", /** * value: "STRADDLE" * @const */ "STRADDLE": "STRADDLE", /** * value: "STRANGLE" * @const */ "STRANGLE": "STRANGLE", /** * value: "COLLAR_SYNTHETIC" * @const */ "COLLAR_SYNTHETIC": "COLLAR_SYNTHETIC", /** * value: "BUTTERFLY" * @const */ "BUTTERFLY": "BUTTERFLY", /** * value: "CONDOR" * @const */ "CONDOR": "CONDOR", /** * value: "IRON_CONDOR" * @const */ "IRON_CONDOR": "IRON_CONDOR", /** * value: "VERTICAL_ROLL" * @const */ "VERTICAL_ROLL": "VERTICAL_ROLL", /** * value: "COLLAR_WITH_STOCK" * @const */ "COLLAR_WITH_STOCK": "COLLAR_WITH_STOCK", /** * value: "DOUBLE_DIAGONAL" * @const */ "DOUBLE_DIAGONAL": "DOUBLE_DIAGONAL", /** * value: "UNBALANCED_BUTTERFLY" * @const */ "UNBALANCED_BUTTERFLY": "UNBALANCED_BUTTERFLY", /** * value: "UNBALANCED_CONDOR" * @const */ "UNBALANCED_CONDOR": "UNBALANCED_CONDOR", /** * value: "UNBALANCED_IRON_CONDOR" * @const */ "UNBALANCED_IRON_CONDOR": "UNBALANCED_IRON_CONDOR", /** * value: "UNBALANCED_VERTICAL_ROLL" * @const */ "UNBALANCED_VERTICAL_ROLL": "UNBALANCED_VERTICAL_ROLL", /** * value: "CUSTOM" * @const */ "CUSTOM": "CUSTOM" }; /** * Allowed values for the <code>requestedDestination</code> property. * @enum {String} * @readonly */ static RequestedDestinationEnum = { /** * value: "INET" * @const */ "INET": "INET", /** * value: "ECN_ARCA" * @const */ "ECN_ARCA": "ECN_ARCA", /** * value: "CBOE" * @const */ "CBOE": "CBOE", /** * value: "AMEX" * @const */ "AMEX": "AMEX", /** * value: "PHLX" * @const */ "PHLX": "PHLX", /** * value: "ISE" * @const */ "ISE": "ISE", /** * value: "BOX" * @const */ "BOX": "BOX", /** * value: "NYSE" * @const */ "NYSE": "NYSE", /** * value: "NASDAQ" * @const */ "NASDAQ": "NASDAQ", /** * value: "BATS" * @const */ "BATS": "BATS", /** * value: "C2" * @const */ "C2": "C2", /** * value: "AUTO" * @const */ "AUTO": "AUTO" }; /** * Allowed values for the <code>stopPriceLinkBasis</code> property. * @enum {String} * @readonly */ static StopPriceLinkBasisEnum = { /** * value: "MANUAL" * @const */ "MANUAL": "MANUAL", /** * value: "BASE" * @const */ "BASE": "BASE", /** * value: "TRIGGER" * @const */ "TRIGGER": "TRIGGER", /** * value: "LAST" * @const */ "LAST": "LAST", /** * value: "BID" * @const */ "BID": "BID", /** * value: "ASK" * @const */ "ASK": "ASK", /** * value: "ASK_BID" * @const */ "ASK_BID": "ASK_BID", /** * value: "MARK" * @const */ "MARK": "MARK", /** * value: "AVERAGE" * @const */ "AVERAGE": "AVERAGE" }; /** * Allowed values for the <code>stopPriceLinkType</code> property. * @enum {String} * @readonly */ static StopPriceLinkTypeEnum = { /** * value: "VALUE" * @const */ "VALUE": "VALUE", /** * value: "PERCENT" * @const */ "PERCENT": "PERCENT", /** * value: "TICK" * @const */ "TICK": "TICK" }; /** * Allowed values for the <code>stopType</code> property. * @enum {String} * @readonly */ static StopTypeEnum = { /** * value: "STANDARD" * @const */ "STANDARD": "STANDARD", /** * value: "BID" * @const */ "BID": "BID", /** * value: "ASK" * @const */ "ASK": "ASK", /** * value: "LAST" * @const */ "LAST": "LAST", /** * value: "MARK" * @const */ "MARK": "MARK" }; /** * Allowed values for the <code>priceLinkBasis</code> property. * @enum {String} * @readonly */ static PriceLinkBasisEnum = { /** * value: "MANUAL" * @const */ "MANUAL": "MANUAL", /** * value: "BASE" * @const */ "BASE": "BASE", /** * value: "TRIGGER" * @const */ "TRIGGER": "TRIGGER", /** * value: "LAST" * @const */ "LAST": "LAST", /** * value: "BID" * @const */ "BID": "BID", /** * value: "ASK" * @const */ "ASK": "ASK", /** * value: "ASK_BID" * @const */ "ASK_BID": "ASK_BID", /** * value: "MARK" * @const */ "MARK": "MARK", /** * value: "AVERAGE" * @const */ "AVERAGE": "AVERAGE" }; /** * Allowed values for the <code>priceLinkType</code> property. * @enum {String} * @readonly */ static PriceLinkTypeEnum = { /** * value: "VALUE" * @const */ "VALUE": "VALUE", /** * value: "PERCENT" * @const */ "PERCENT": "PERCENT", /** * value: "TICK" * @const */ "TICK": "TICK" }; /** * Allowed values for the <code>taxLotMethod</code> property. * @enum {String} * @readonly */ static TaxLotMethodEnum = { /** * value: "FIFO" * @const */ "FIFO": "FIFO", /** * value: "LIFO" * @const */ "LIFO": "LIFO", /** * value: "HIGH_COST" * @const */ "HIGH_COST": "HIGH_COST", /** * value: "LOW_COST" * @const */ "LOW_COST": "LOW_COST", /** * value: "AVERAGE_COST" * @const */ "AVERAGE_COST": "AVERAGE_COST", /** * value: "SPECIFIC_LOT" * @const */ "SPECIFIC_LOT": "SPECIFIC_LOT" }; /** * Allowed values for the <code>specialInstruction</code> property. * @enum {String} * @readonly */ static SpecialInstructionEnum = { /** * value: "ALL_OR_NONE" * @const */ "ALL_OR_NONE": "ALL_OR_NONE", /** * value: "DO_NOT_REDUCE" * @const */ "DO_NOT_REDUCE": "DO_NOT_REDUCE", /** * value: "ALL_OR_NONE_DO_NOT_REDUCE" * @const */ "ALL_OR_NONE_DO_NOT_REDUCE": "ALL_OR_NONE_DO_NOT_REDUCE" }; /** * Allowed values for the <code>orderStrategyType</code> property. * @enum {String} * @readonly */ static OrderStrategyTypeEnum = { /** * value: "SINGLE" * @const */ "SINGLE": "SINGLE", /** * value: "OCO" * @const */ "OCO": "OCO", /** * value: "TRIGGER" * @const */ "TRIGGER": "TRIGGER" }; /** * Allowed values for the <code>status</code> property. * @enum {String} * @readonly */ static StatusEnum = { /** * value: "AWAITING_PARENT_ORDER" * @const */ "AWAITING_PARENT_ORDER": "AWAITING_PARENT_ORDER", /** * value: "AWAITING_CONDITION" * @const */ "AWAITING_CONDITION": "AWAITING_CONDITION", /** * value: "AWAITING_MANUAL_REVIEW" * @const */ "AWAITING_MANUAL_REVIEW": "AWAITING_MANUAL_REVIEW", /** * value: "ACCEPTED" * @const */ "ACCEPTED": "ACCEPTED", /** * value: "AWAITING_UR_OUT" * @const */ "AWAITING_UR_OUT": "AWAITING_UR_OUT", /** * value: "PENDING_ACTIVATION" * @const */ "PENDING_ACTIVATION": "PENDING_ACTIVATION", /** * value: "QUEUED" * @const */ "QUEUED": "QUEUED", /** * value: "WORKING" * @const */ "WORKING": "WORKING", /** * value: "REJECTED" * @const */ "REJECTED": "REJECTED", /** * value: "PENDING_CANCEL" * @const */ "PENDING_CANCEL": "PENDING_CANCEL", /** * value: "CANCELED" * @const */ "CANCELED": "CANCELED", /** * value: "PENDING_REPLACE" * @const */ "PENDING_REPLACE": "PENDING_REPLACE", /** * value: "REPLACED" * @const */ "REPLACED": "REPLACED", /** * value: "FILLED" * @const */ "FILLED": "FILLED", /** * value: "EXPIRED" * @const */ "EXPIRED": "EXPIRED" }; }