upstox-js-sdk
Version:
The official Node Js client for communicating with the Upstox API
116 lines (103 loc) • 3.74 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.62
*
* Do not edit the class manually.
*
*/
import {ApiClient} from '../ApiClient';
/**
* The CancelOrExitOrderErrorData model module.
* @module model/CancelOrExitOrderErrorData
* @version v0
*/
export class CancelOrExitOrderErrorData {
/**
* Constructs a new <code>CancelOrExitOrderErrorData</code>.
* Error data for cancel or exit order request
* @alias module:model/CancelOrExitOrderErrorData
* @class
*/
constructor() {
}
/**
* Constructs a <code>CancelOrExitOrderErrorData</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/CancelOrExitOrderErrorData} obj Optional instance to populate.
* @return {module:model/CancelOrExitOrderErrorData} The populated <code>CancelOrExitOrderErrorData</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CancelOrExitOrderErrorData();
if (data.hasOwnProperty('errorCode'))
obj.errorCode = ApiClient.convertToType(data['errorCode'], 'String');
if (data.hasOwnProperty('message'))
obj.message = ApiClient.convertToType(data['message'], 'String');
if (data.hasOwnProperty('propertyPath'))
obj.propertyPath = ApiClient.convertToType(data['propertyPath'], 'String');
if (data.hasOwnProperty('invalidValue'))
obj.invalidValue = ApiClient.convertToType(data['invalidValue'], Object);
if (data.hasOwnProperty('error_code'))
obj.errorCode = ApiClient.convertToType(data['error_code'], 'String');
if (data.hasOwnProperty('property_path'))
obj.propertyPath = ApiClient.convertToType(data['property_path'], 'String');
if (data.hasOwnProperty('invalid_value'))
obj.invalidValue = ApiClient.convertToType(data['invalid_value'], Object);
if (data.hasOwnProperty('instrument_key'))
obj.instrumentKey = ApiClient.convertToType(data['instrument_key'], 'String');
if (data.hasOwnProperty('order_id'))
obj.orderId = ApiClient.convertToType(data['order_id'], 'String');
}
return obj;
}
}
/**
* Unique code for the error state
* @member {String} errorCode
*/
CancelOrExitOrderErrorData.prototype.errorCode = undefined;
/**
* Verbose message for the error state
* @member {String} message
*/
CancelOrExitOrderErrorData.prototype.message = undefined;
/**
* Path to property failing validation
* @member {String} propertyPath
*/
CancelOrExitOrderErrorData.prototype.propertyPath = undefined;
/**
* Invalid value for the property failing validation
* @member {Object} invalidValue
*/
CancelOrExitOrderErrorData.prototype.invalidValue = undefined;
/**
* @member {String} errorCode
*/
CancelOrExitOrderErrorData.prototype.errorCode = undefined;
/**
* @member {String} propertyPath
*/
CancelOrExitOrderErrorData.prototype.propertyPath = undefined;
/**
* @member {Object} invalidValue
*/
CancelOrExitOrderErrorData.prototype.invalidValue = undefined;
/**
* Key of instrument
* @member {String} instrumentKey
*/
CancelOrExitOrderErrorData.prototype.instrumentKey = undefined;
/**
* Reference order ID
* @member {String} orderId
*/
CancelOrExitOrderErrorData.prototype.orderId = undefined;