UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

70 lines (63 loc) 1.95 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'; /** * The HistoryItem model module. * @module model/HistoryItem * @version v0 */ export class HistoryItem { /** * Constructs a new <code>HistoryItem</code>. * @alias module:model/HistoryItem * @class */ constructor() { } /** * Constructs a <code>HistoryItem</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/HistoryItem} obj Optional instance to populate. * @return {module:model/HistoryItem} The populated <code>HistoryItem</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new HistoryItem(); if (data.hasOwnProperty('value')) obj.value = ApiClient.convertToType(data['value'], Object); if (data.hasOwnProperty('period')) obj.period = ApiClient.convertToType(data['period'], Object); if (data.hasOwnProperty('change')) obj.change = ApiClient.convertToType(data['change'], Object); } return obj; } } /** * Amount value in the reported period * @member {Object} value */ HistoryItem.prototype.value = undefined; /** * Reporting period * @member {Object} period */ HistoryItem.prototype.period = undefined; /** * Percentage change compared to previous period * @member {Object} change */ HistoryItem.prototype.change = undefined;