@factset/sdk-factsetglobalprices
Version:
FactSet Global Prices client library for JavaScript
143 lines (130 loc) • 6.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _Adjust = _interopRequireDefault(require("./Adjust"));
var _Batch = _interopRequireDefault(require("./Batch"));
var _Calendar = _interopRequireDefault(require("./Calendar"));
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 GlobalPricesRequest model module.
* @module model/GlobalPricesRequest
*/
class GlobalPricesRequest {
/**
* Constructs a new <code>GlobalPricesRequest</code>.
* Prices Request Body
* @alias module:model/GlobalPricesRequest
* @param ids {Array.<String>} The requested list of security identifiers. Accepted ID types include Market Tickers, SEDOL, ISINs, CUSIPs, or FactSet Permanent Ids. <p>ids limit = 500 per non-batch request / 2000 per batch request for a single day and 50 per multi-day request for both batch and non-batch. </p>
* @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) {
GlobalPricesRequest.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>GlobalPricesRequest</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/GlobalPricesRequest} obj Optional instance to populate.
* @return {module:model/GlobalPricesRequest} The populated <code>GlobalPricesRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new GlobalPricesRequest();
if (data.hasOwnProperty('ids')) {
obj['ids'] = _ApiClient.default.convertToType(data['ids'], ['String']);
}
if (data.hasOwnProperty('fields')) {
obj['fields'] = _ApiClient.default.convertToType(data['fields'], ['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('frequency')) {
obj['frequency'] = _Frequency.default.constructFromObject(data['frequency']);
}
if (data.hasOwnProperty('currency')) {
obj['currency'] = _ApiClient.default.convertToType(data['currency'], 'String');
}
if (data.hasOwnProperty('calendar')) {
obj['calendar'] = _Calendar.default.constructFromObject(data['calendar']);
}
if (data.hasOwnProperty('adjust')) {
obj['adjust'] = _Adjust.default.constructFromObject(data['adjust']);
}
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. <p>ids limit = 500 per non-batch request / 2000 per batch request for a single day and 50 per multi-day request for both batch and non-batch. </p>
* @member {Array.<String>} ids
*/
GlobalPricesRequest.prototype['ids'] = undefined;
/**
* Request available pricing data fields to be included in the response. Default is all fields. All responses will include the _fsymId_, _date_, and _currency_ fields. |field|description| |---|---| |price|Closing Price| |priceOpen|Opening Price| |priceHigh|High Price| |priceLow|Low Price| |volume|Volume| |turnover|Total Trade Value for the Day| |tradeCount|Number of Trades| |vwap|Volume Weighted Average Price|
* @member {Array.<String>} fields
*/
GlobalPricesRequest.prototype['fields'] = 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
*/
GlobalPricesRequest.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
*/
GlobalPricesRequest.prototype['endDate'] = undefined;
/**
* @member {module:model/Frequency} frequency
*/
GlobalPricesRequest.prototype['frequency'] = 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
*/
GlobalPricesRequest.prototype['currency'] = undefined;
/**
* @member {module:model/Calendar} calendar
*/
GlobalPricesRequest.prototype['calendar'] = undefined;
/**
* @member {module:model/Adjust} adjust
*/
GlobalPricesRequest.prototype['adjust'] = undefined;
/**
* @member {module:model/Batch} batch
*/
GlobalPricesRequest.prototype['batch'] = undefined;
var _default = exports.default = GlobalPricesRequest;