kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
74 lines • 2.34 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CancelOrderByClientOidReqBuilder = exports.CancelOrderByClientOidReq = void 0;
const class_transformer_1 = require("class-transformer");
class CancelOrderByClientOidReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `CancelOrderByClientOidReq` class.
* The builder pattern allows step-by-step construction of a `CancelOrderByClientOidReq` object.
*/
static builder() {
return new CancelOrderByClientOidReqBuilder(new CancelOrderByClientOidReq());
}
/**
* Creates a new instance of the `CancelOrderByClientOidReq` class with the given data.
*/
static create(data) {
let obj = new CancelOrderByClientOidReq();
obj.symbol = data.symbol;
obj.clientOid = data.clientOid;
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 CancelOrderByClientOidReq(), jsonObject);
}
}
exports.CancelOrderByClientOidReq = CancelOrderByClientOidReq;
class CancelOrderByClientOidReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Symbol of the contract. Please refer to [Get Symbol endpoint: symbol](https://www.kucoin.com/docs-new/api-3470220)
*/
setSymbol(value) {
this.obj.symbol = value;
return this;
}
/**
* The user self-defined order ID.
*/
setClientOid(value) {
this.obj.clientOid = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.CancelOrderByClientOidReqBuilder = CancelOrderByClientOidReqBuilder;
//# sourceMappingURL=model_cancel_order_by_client_oid_req.js.map