kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
82 lines • 2.42 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetMarginRiskLimitReqBuilder = exports.GetMarginRiskLimitReq = void 0;
const class_transformer_1 = require("class-transformer");
class GetMarginRiskLimitReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `GetMarginRiskLimitReq` class.
* The builder pattern allows step-by-step construction of a `GetMarginRiskLimitReq` object.
*/
static builder() {
return new GetMarginRiskLimitReqBuilder(new GetMarginRiskLimitReq());
}
/**
* Creates a new instance of the `GetMarginRiskLimitReq` class with the given data.
*/
static create(data) {
let obj = new GetMarginRiskLimitReq();
obj.isIsolated = data.isIsolated;
obj.currency = data.currency;
obj.symbol = data.symbol;
return obj;
}
/**
* Convert the object to a JSON string.
*/
toJson() {
return JSON.stringify((0, class_transformer_1.instanceToPlain)(this));
}
/**
* Create an object from a JSON string.
*/
static fromJson(input) {
return this.fromObject(JSON.parse(input));
}
/**
* Create an object from Js Object.
*/
static fromObject(jsonObject) {
return (0, class_transformer_1.plainToClassFromExist)(new GetMarginRiskLimitReq(), jsonObject);
}
}
exports.GetMarginRiskLimitReq = GetMarginRiskLimitReq;
class GetMarginRiskLimitReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* True-isolated, false-cross
*/
setIsIsolated(value) {
this.obj.isIsolated = value;
return this;
}
/**
* Currency: This field is only required for cross margin
*/
setCurrency(value) {
this.obj.currency = value;
return this;
}
/**
* Symbol: This field is only required for isolated margin
*/
setSymbol(value) {
this.obj.symbol = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.GetMarginRiskLimitReqBuilder = GetMarginRiskLimitReqBuilder;
//# sourceMappingURL=model_get_margin_risk_limit_req.js.map