UNPKG

kucoin-universal-sdk

Version:
74 lines 2.38 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.BatchCancelOcoOrdersReqBuilder = exports.BatchCancelOcoOrdersReq = void 0; const class_transformer_1 = require("class-transformer"); class BatchCancelOcoOrdersReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { } /** * Creates a new instance of the `BatchCancelOcoOrdersReq` class. * The builder pattern allows step-by-step construction of a `BatchCancelOcoOrdersReq` object. */ static builder() { return new BatchCancelOcoOrdersReqBuilder(new BatchCancelOcoOrdersReq()); } /** * Creates a new instance of the `BatchCancelOcoOrdersReq` class with the given data. */ static create(data) { let obj = new BatchCancelOcoOrdersReq(); obj.orderIds = data.orderIds; 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 BatchCancelOcoOrdersReq(), jsonObject); } } exports.BatchCancelOcoOrdersReq = BatchCancelOcoOrdersReq; class BatchCancelOcoOrdersReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Specify the order ID; there can be multiple orders, separated by commas. If not passed, all OCO orders will be canceled by default. */ setOrderIds(value) { this.obj.orderIds = value; return this; } /** * Trading pair. If not passed, the OCO orders of all symbols will be canceled by default. */ setSymbol(value) { this.obj.symbol = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.BatchCancelOcoOrdersReqBuilder = BatchCancelOcoOrdersReqBuilder; //# sourceMappingURL=model_batch_cancel_oco_orders_req.js.map