kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
96 lines • 3.28 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CancelPartialOrderReqBuilder = exports.CancelPartialOrderReq = void 0;
const class_transformer_1 = require("class-transformer");
require("reflect-metadata");
class CancelPartialOrderReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `CancelPartialOrderReq` class.
* The builder pattern allows step-by-step construction of a `CancelPartialOrderReq` object.
*/
static builder() {
return new CancelPartialOrderReqBuilder(new CancelPartialOrderReq());
}
/**
* Creates a new instance of the `CancelPartialOrderReq` class with the given data.
*/
static create(data) {
let obj = new CancelPartialOrderReq();
obj.orderId = data.orderId;
obj.symbol = data.symbol;
obj.cancelSize = data.cancelSize;
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 CancelPartialOrderReq(), jsonObject);
}
}
exports.CancelPartialOrderReq = CancelPartialOrderReq;
__decorate([
Reflect.metadata('path', 'orderId'),
__metadata("design:type", String)
], CancelPartialOrderReq.prototype, "orderId", void 0);
class CancelPartialOrderReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* The unique order id generated by the trading system
*/
setOrderId(value) {
this.obj.orderId = value;
return this;
}
/**
* symbol
*/
setSymbol(value) {
this.obj.symbol = value;
return this;
}
/**
* The size you want cancel
*/
setCancelSize(value) {
this.obj.cancelSize = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.CancelPartialOrderReqBuilder = CancelPartialOrderReqBuilder;
//# sourceMappingURL=model_cancel_partial_order_req.js.map