UNPKG

@factset/sdk-factsetglobalprices

Version:

FactSet Global Prices client library for JavaScript

119 lines (109 loc) 5.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); var _Batch = _interopRequireDefault(require("./Batch")); var _DividendAdjust = _interopRequireDefault(require("./DividendAdjust")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * FactSet Global Prices API * The FactSet Global Prices API provides end of day market pricing content using cloud and microservices technology, encompassing both pricing as well as corporate actions and events data.</p> * * The version of the OpenAPI document: 1.11.0 * Contact: api@factset.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ /** * The RangeRequest model module. * @module model/RangeRequest */ class RangeRequest { /** * Constructs a new <code>RangeRequest</code>. * Range Request Body * @alias module:model/RangeRequest * @param ids {Array.<String>} The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. Requests are limited to 50 IDs for non-batch requests and 1000 for batch requests. * @param startDate {String} The start date requested for a given date range in **YYYY-MM-DD** format. Future dates (T+1) are not accepted in this endpoint. * @param endDate {String} The end date requested for a given date range in **YYYY-MM-DD** format. The input end date is required and must come after the input start date. Future dates (T+1) are not accepted in this endpoint. */ constructor(ids, startDate, endDate) { RangeRequest.initialize(this, ids, startDate, endDate); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ static initialize(obj, ids, startDate, endDate) { obj['ids'] = ids; obj['startDate'] = startDate; obj['endDate'] = endDate; } /** * Constructs a <code>RangeRequest</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/RangeRequest} obj Optional instance to populate. * @return {module:model/RangeRequest} The populated <code>RangeRequest</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new RangeRequest(); if (data.hasOwnProperty('ids') && obj['ids'] === undefined) { obj['ids'] = _ApiClient.default.convertToType(data['ids'], ['String']); } if (data.hasOwnProperty('startDate') && obj['startDate'] === undefined) { obj['startDate'] = _ApiClient.default.convertToType(data['startDate'], 'String'); } if (data.hasOwnProperty('endDate') && obj['endDate'] === undefined) { obj['endDate'] = _ApiClient.default.convertToType(data['endDate'], 'String'); } if (data.hasOwnProperty('currency') && obj['currency'] === undefined) { obj['currency'] = _ApiClient.default.convertToType(data['currency'], 'String'); } if (data.hasOwnProperty('dividendAdjust') && obj['dividendAdjust'] === undefined) { obj['dividendAdjust'] = _DividendAdjust.default.constructFromObject(data['dividendAdjust']); } if (data.hasOwnProperty('batch') && obj['batch'] === undefined) { obj['batch'] = _Batch.default.constructFromObject(data['batch']); } } return obj; } } /** * The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent IDs. Requests are limited to 50 IDs for non-batch requests and 1000 for batch requests. * @member {Array.<String>} ids */ RangeRequest.prototype['ids'] = undefined; /** * The start date requested for a given date range in **YYYY-MM-DD** format. Future dates (T+1) are not accepted in this endpoint. * @member {String} startDate */ RangeRequest.prototype['startDate'] = undefined; /** * The end date requested for a given date range in **YYYY-MM-DD** format. The input end date is required and must come after the input start date. Future dates (T+1) are not accepted in this endpoint. * @member {String} endDate */ RangeRequest.prototype['endDate'] = undefined; /** * Currency code for adjusting prices. Default is Local. For a list of currency ISO codes, visit [Online Assistant Page 1470](https://oa.apps.factset.com/pages/1470). * @member {String} currency * @default 'LOCAL' */ RangeRequest.prototype['currency'] = 'LOCAL'; /** * @member {module:model/DividendAdjust} dividendAdjust */ RangeRequest.prototype['dividendAdjust'] = undefined; /** * @member {module:model/Batch} batch */ RangeRequest.prototype['batch'] = undefined; var _default = exports.default = RangeRequest;