UNPKG

kucoin-universal-sdk

Version:
89 lines 2.69 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.AddIsolatedMarginReqBuilder = exports.AddIsolatedMarginReq = void 0; const class_transformer_1 = require("class-transformer"); class AddIsolatedMarginReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { // @ts-ignore this.symbol = null; // @ts-ignore this.margin = null; // @ts-ignore this.bizNo = null; } /** * Creates a new instance of the `AddIsolatedMarginReq` class. * The builder pattern allows step-by-step construction of a `AddIsolatedMarginReq` object. */ static builder() { return new AddIsolatedMarginReqBuilder(new AddIsolatedMarginReq()); } /** * Creates a new instance of the `AddIsolatedMarginReq` class with the given data. */ static create(data) { let obj = new AddIsolatedMarginReq(); obj.symbol = data.symbol; obj.margin = data.margin; obj.bizNo = data.bizNo; 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 AddIsolatedMarginReq(), jsonObject); } } exports.AddIsolatedMarginReq = AddIsolatedMarginReq; class AddIsolatedMarginReqBuilder { 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; } /** * Margin amount (min. margin amount≥0.00001667XBT) */ setMargin(value) { this.obj.margin = value; return this; } /** * A unique ID generated by the user, to ensure the operation is processed by the system only once, The maximum length cannot exceed 36 */ setBizNo(value) { this.obj.bizNo = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.AddIsolatedMarginReqBuilder = AddIsolatedMarginReqBuilder; //# sourceMappingURL=model_add_isolated_margin_req.js.map