UNPKG

@factset/sdk-factsetglobalprices

Version:

FactSet Global Prices client library for JavaScript

125 lines (114 loc) 4.84 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")); var _Frequency = _interopRequireDefault(require("./Frequency")); 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.8.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 ReturnsRequest model module. * @module model/ReturnsRequest */ class ReturnsRequest { /** * Constructs a new <code>ReturnsRequest</code>. * Returns Request Body * @alias module:model/ReturnsRequest * @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. * @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. */ constructor(ids, startDate) { ReturnsRequest.initialize(this, ids, startDate); } /** * 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) { obj['ids'] = ids; obj['startDate'] = startDate; } /** * Constructs a <code>ReturnsRequest</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/ReturnsRequest} obj Optional instance to populate. * @return {module:model/ReturnsRequest} The populated <code>ReturnsRequest</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new ReturnsRequest(); if (data.hasOwnProperty('ids')) { obj['ids'] = _ApiClient.default.convertToType(data['ids'], ['String']); } if (data.hasOwnProperty('startDate')) { obj['startDate'] = _ApiClient.default.convertToType(data['startDate'], 'String'); } if (data.hasOwnProperty('endDate')) { obj['endDate'] = _ApiClient.default.convertToType(data['endDate'], 'String'); } if (data.hasOwnProperty('currency')) { obj['currency'] = _ApiClient.default.convertToType(data['currency'], 'String'); } if (data.hasOwnProperty('frequency')) { obj['frequency'] = _Frequency.default.constructFromObject(data['frequency']); } if (data.hasOwnProperty('dividendAdjust')) { obj['dividendAdjust'] = _DividendAdjust.default.constructFromObject(data['dividendAdjust']); } if (data.hasOwnProperty('batch')) { 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. * @member {Array.<String>} ids */ ReturnsRequest.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 */ ReturnsRequest.prototype['startDate'] = undefined; /** * The end date requested for a given date range in **YYYY-MM-DD** format. Future dates (T+1) are not accepted in this endpoint. * @member {String} endDate */ ReturnsRequest.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 */ ReturnsRequest.prototype['currency'] = undefined; /** * @member {module:model/Frequency} frequency */ ReturnsRequest.prototype['frequency'] = undefined; /** * @member {module:model/DividendAdjust} dividendAdjust */ ReturnsRequest.prototype['dividendAdjust'] = undefined; /** * @member {module:model/Batch} batch */ ReturnsRequest.prototype['batch'] = undefined; var _default = exports.default = ReturnsRequest;