kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
77 lines • 2.53 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetDCPReqBuilder = exports.SetDCPReq = void 0;
const class_transformer_1 = require("class-transformer");
class SetDCPReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() {
// @ts-ignore
this.timeout = null;
}
/**
* Creates a new instance of the `SetDCPReq` class.
* The builder pattern allows step-by-step construction of a `SetDCPReq` object.
*/
static builder() {
return new SetDCPReqBuilder(new SetDCPReq());
}
/**
* Creates a new instance of the `SetDCPReq` class with the given data.
*/
static create(data) {
let obj = new SetDCPReq();
obj.timeout = data.timeout;
obj.symbols = data.symbols;
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 SetDCPReq(), jsonObject);
}
}
exports.SetDCPReq = SetDCPReq;
class SetDCPReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Auto cancel order trigger setting time, the unit is second. Range: timeout=-1 (meaning unset) or 5 <= timeout <= 86400. For example, timeout=5 means that the order will be automatically canceled if no user request is received for more than 5 seconds. When this parameter is changed, the previous setting will be overwritten.
*/
setTimeout(value) {
this.obj.timeout = value;
return this;
}
/**
* List of trading pairs. When this parameter is not empty, separate it with commas and support up to 50 trading pairs. Empty means all trading pairs. When this parameter is changed, the previous setting will be overwritten.
*/
setSymbols(value) {
this.obj.symbols = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.SetDCPReqBuilder = SetDCPReqBuilder;
//# sourceMappingURL=model_set_dcp_req.js.map