UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

87 lines (78 loc) 2.81 kB
/* * 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'; import {SectorMarketCapAmount} from './SectorMarketCapAmount'; /** * The CompetitorData model module. * @module model/CompetitorData * @version v0 */ export class CompetitorData { /** * Constructs a new <code>CompetitorData</code>. * @alias module:model/CompetitorData * @class */ constructor() { } /** * Constructs a <code>CompetitorData</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/CompetitorData} obj Optional instance to populate. * @return {module:model/CompetitorData} The populated <code>CompetitorData</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new CompetitorData(); if (data.hasOwnProperty('company_profile')) obj.companyProfile = ApiClient.convertToType(data['company_profile'], Object); if (data.hasOwnProperty('sector')) obj.sector = ApiClient.convertToType(data['sector'], Object); if (data.hasOwnProperty('sector_market_cap_inr')) obj.sectorMarketCapInr = SectorMarketCapAmount.constructFromObject(data['sector_market_cap_inr']); if (data.hasOwnProperty('sector_market_cap_usd')) obj.sectorMarketCapUsd = SectorMarketCapAmount.constructFromObject(data['sector_market_cap_usd']); if (data.hasOwnProperty('instrument_key')) obj.instrumentKey = ApiClient.convertToType(data['instrument_key'], Object); } return obj; } } /** * Business description of the company * @member {Object} companyProfile */ CompetitorData.prototype.companyProfile = undefined; /** * Sector the company belongs to * @member {Object} sector */ CompetitorData.prototype.sector = undefined; /** * Sector market capitalisation in INR * @member {module:model/SectorMarketCapAmount} sectorMarketCapInr */ CompetitorData.prototype.sectorMarketCapInr = undefined; /** * Sector market capitalisation in USD * @member {module:model/SectorMarketCapAmount} sectorMarketCapUsd */ CompetitorData.prototype.sectorMarketCapUsd = undefined; /** * Instrument key of the competitor company * @member {Object} instrumentKey */ CompetitorData.prototype.instrumentKey = undefined;