kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
82 lines • 2.49 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.BatchCancelStopOrderReqBuilder = exports.BatchCancelStopOrderReq = void 0;
const class_transformer_1 = require("class-transformer");
class BatchCancelStopOrderReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `BatchCancelStopOrderReq` class.
* The builder pattern allows step-by-step construction of a `BatchCancelStopOrderReq` object.
*/
static builder() {
return new BatchCancelStopOrderReqBuilder(new BatchCancelStopOrderReq());
}
/**
* Creates a new instance of the `BatchCancelStopOrderReq` class with the given data.
*/
static create(data) {
let obj = new BatchCancelStopOrderReq();
obj.symbol = data.symbol;
obj.tradeType = data.tradeType;
obj.orderIds = data.orderIds;
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 BatchCancelStopOrderReq(), jsonObject);
}
}
exports.BatchCancelStopOrderReq = BatchCancelStopOrderReq;
class BatchCancelStopOrderReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Cancel the open order for the specified symbol
*/
setSymbol(value) {
this.obj.symbol = value;
return this;
}
/**
* The type of trading : TRADE(Spot), MARGIN_TRADE (Cross Margin), MARGIN_ISOLATED_TRADE (Isolated Margin).
*/
setTradeType(value) {
this.obj.tradeType = value;
return this;
}
/**
* Comma seperated order IDs.
*/
setOrderIds(value) {
this.obj.orderIds = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.BatchCancelStopOrderReqBuilder = BatchCancelStopOrderReqBuilder;
//# sourceMappingURL=model_batch_cancel_stop_order_req.js.map