upstox-js-sdk
Version:
The official Node Js client for communicating with the Upstox API
86 lines (77 loc) • 2.57 kB
JavaScript
/*
* OpenAPI definition
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 3.0.66
*
* Do not edit the class manually.
*
*/
import {ApiClient} from '../ApiClient';
/**
* The CorporateActionData model module.
* @module model/CorporateActionData
* @version v0
*/
export class CorporateActionData {
/**
* Constructs a new <code>CorporateActionData</code>.
* @alias module:model/CorporateActionData
* @class
*/
constructor() {
}
/**
* Constructs a <code>CorporateActionData</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/CorporateActionData} obj Optional instance to populate.
* @return {module:model/CorporateActionData} The populated <code>CorporateActionData</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CorporateActionData();
if (data.hasOwnProperty('name'))
obj.name = ApiClient.convertToType(data['name'], Object);
if (data.hasOwnProperty('expiry_date'))
obj.expiryDate = ApiClient.convertToType(data['expiry_date'], Object);
if (data.hasOwnProperty('amount'))
obj.amount = ApiClient.convertToType(data['amount'], Object);
if (data.hasOwnProperty('ratio'))
obj.ratio = ApiClient.convertToType(data['ratio'], Object);
if (data.hasOwnProperty('event_details'))
obj.eventDetails = ApiClient.convertToType(data['event_details'], Object);
}
return obj;
}
}
/**
* Type of corporate action
* @member {Object} name
*/
CorporateActionData.prototype.name = undefined;
/**
* Ex-date or expiry date of the action
* @member {Object} expiryDate
*/
CorporateActionData.prototype.expiryDate = undefined;
/**
* Amount associated with the action
* @member {Object} amount
*/
CorporateActionData.prototype.amount = undefined;
/**
* Ratio for bonus or split actions
* @member {Object} ratio
*/
CorporateActionData.prototype.ratio = undefined;
/**
* Detailed event fields for the corporate action
* @member {Object} eventDetails
*/
CorporateActionData.prototype.eventDetails = undefined;