upstox-js-sdk
Version:
The official Node Js client for communicating with the Upstox API
69 lines (62 loc) • 2.21 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.54
*
* Do not edit the class manually.
*
*/
import {ApiClient} from '../ApiClient';
import {AnalyticsData} from './AnalyticsData';
import {MarketData} from './MarketData';
/**
* The PutCallOptionChainData model module.
* @module model/PutCallOptionChainData
* @version v0
*/
export class PutCallOptionChainData {
/**
* Constructs a new <code>PutCallOptionChainData</code>.
* @alias module:model/PutCallOptionChainData
* @class
*/
constructor() {
}
/**
* Constructs a <code>PutCallOptionChainData</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/PutCallOptionChainData} obj Optional instance to populate.
* @return {module:model/PutCallOptionChainData} The populated <code>PutCallOptionChainData</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new PutCallOptionChainData();
if (data.hasOwnProperty('instrument_key'))
obj.instrumentKey = ApiClient.convertToType(data['instrument_key'], 'String');
if (data.hasOwnProperty('market_data'))
obj.marketData = MarketData.constructFromObject(data['market_data']);
if (data.hasOwnProperty('option_greeks'))
obj.optionGreeks = AnalyticsData.constructFromObject(data['option_greeks']);
}
return obj;
}
}
/**
* @member {String} instrumentKey
*/
PutCallOptionChainData.prototype.instrumentKey = undefined;
/**
* @member {module:model/MarketData} marketData
*/
PutCallOptionChainData.prototype.marketData = undefined;
/**
* @member {module:model/AnalyticsData} optionGreeks
*/
PutCallOptionChainData.prototype.optionGreeks = undefined;