upstox-js-sdk
Version:
The official Node Js client for communicating with the Upstox API
89 lines (79 loc) • 2.72 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';
import {DeliveryMargin} from './DeliveryMargin';
/**
* The PledgeMarginUsed model module.
* @module model/PledgeMarginUsed
* @version v0
*/
export class PledgeMarginUsed {
/**
* Constructs a new <code>PledgeMarginUsed</code>.
* @alias module:model/PledgeMarginUsed
* @class
*/
constructor() {
}
/**
* Constructs a <code>PledgeMarginUsed</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/PledgeMarginUsed} obj Optional instance to populate.
* @return {module:model/PledgeMarginUsed} The populated <code>PledgeMarginUsed</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new PledgeMarginUsed();
if (data.hasOwnProperty('total'))
obj.total = ApiClient.convertToType(data['total'], Object);
if (data.hasOwnProperty('mtf'))
obj.mtf = ApiClient.convertToType(data['mtf'], Object);
if (data.hasOwnProperty('span_exposure'))
obj.spanExposure = ApiClient.convertToType(data['span_exposure'], Object);
if (data.hasOwnProperty('cash_margin_var_elm'))
obj.cashMarginVarElm = ApiClient.convertToType(data['cash_margin_var_elm'], Object);
if (data.hasOwnProperty('premium_present'))
obj.premiumPresent = ApiClient.convertToType(data['premium_present'], Object);
if (data.hasOwnProperty('delivery_margin'))
obj.deliveryMargin = DeliveryMargin.constructFromObject(data['delivery_margin']);
}
return obj;
}
}
/**
* @member {Object} total
*/
PledgeMarginUsed.prototype.total = undefined;
/**
* @member {Object} mtf
*/
PledgeMarginUsed.prototype.mtf = undefined;
/**
* @member {Object} spanExposure
*/
PledgeMarginUsed.prototype.spanExposure = undefined;
/**
* @member {Object} cashMarginVarElm
*/
PledgeMarginUsed.prototype.cashMarginVarElm = undefined;
/**
* @member {Object} premiumPresent
*/
PledgeMarginUsed.prototype.premiumPresent = undefined;
/**
* @member {module:model/DeliveryMargin} deliveryMargin
*/
PledgeMarginUsed.prototype.deliveryMargin = undefined;