UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

79 lines (72 loc) 2.09 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.54 * * Do not edit the class manually. * */ import {ApiClient} from '../ApiClient'; import {MarginData} from './MarginData'; /** * The PostMarginResponse model module. * @module model/PostMarginResponse * @version v0 */ export class PostMarginResponse { /** * Constructs a new <code>PostMarginResponse</code>. * @alias module:model/PostMarginResponse * @class */ constructor() { } /** * Constructs a <code>PostMarginResponse</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/PostMarginResponse} obj Optional instance to populate. * @return {module:model/PostMarginResponse} The populated <code>PostMarginResponse</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new PostMarginResponse(); if (data.hasOwnProperty('status')) obj.status = ApiClient.convertToType(data['status'], 'String'); if (data.hasOwnProperty('data')) obj.data = MarginData.constructFromObject(data['data']); } return obj; } } /** * Allowed values for the <code>status</code> property. * @enum {String} * @readonly */ PostMarginResponse.StatusEnum = { /** * value: "success" * @const */ success: "success", /** * value: "error" * @const */ error: "error" }; /** * @member {module:model/PostMarginResponse.StatusEnum} status */ PostMarginResponse.prototype.status = undefined; /** * @member {module:model/MarginData} data */ PostMarginResponse.prototype.data = undefined;