UNPKG

@gitchrisqueen/tdameritrade-api-js-client

Version:
110 lines (95 loc) 3.03 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 EquityAssetType from './EquityAssetType'; /** * The OptionOptionDeliverables model module. * @module model/OptionOptionDeliverables * @version 0.1.4 */ export default class OptionOptionDeliverables { /** * Constructs a new <code>OptionOptionDeliverables</code>. * @alias module:model/OptionOptionDeliverables * @class */ constructor() { } /** * Constructs a <code>OptionOptionDeliverables</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/OptionOptionDeliverables} obj Optional instance to populate. * @return {module:model/OptionOptionDeliverables} The populated <code>OptionOptionDeliverables</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new OptionOptionDeliverables(); if (data.hasOwnProperty('symbol')) { obj['symbol'] = ApiClient.convertToType(data['symbol'], 'String'); } if (data.hasOwnProperty('deliverableUnits')) { obj['deliverableUnits'] = ApiClient.convertToType(data['deliverableUnits'], 'Number'); } if (data.hasOwnProperty('currencyType')) { obj['currencyType'] = ApiClient.convertToType(data['currencyType'], 'String'); } if (data.hasOwnProperty('assetType')) { obj['assetType'] = EquityAssetType.constructFromObject(data['assetType']); } } return obj; } /** * @member {String} symbol */ 'symbol' = undefined; /** * @member {Number} deliverableUnits */ 'deliverableUnits' = undefined; /** * @member {module:model/OptionOptionDeliverables.CurrencyTypeEnum} currencyType */ 'currencyType' = undefined; /** * @member {module:model/EquityAssetType} assetType */ 'assetType' = undefined; /** * Allowed values for the <code>currencyType</code> property. * @enum {String} * @readonly */ static CurrencyTypeEnum = { /** * value: "USD" * @const */ "USD": "USD", /** * value: "CAD" * @const */ "CAD": "CAD", /** * value: "EUR" * @const */ "EUR": "EUR", /** * value: "JPY" * @const */ "JPY": "JPY" }; }