UNPKG

kucoin-universal-sdk

Version:
82 lines 2.33 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetMaxOpenSizeReqBuilder = exports.GetMaxOpenSizeReq = void 0; const class_transformer_1 = require("class-transformer"); class GetMaxOpenSizeReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { } /** * Creates a new instance of the `GetMaxOpenSizeReq` class. * The builder pattern allows step-by-step construction of a `GetMaxOpenSizeReq` object. */ static builder() { return new GetMaxOpenSizeReqBuilder(new GetMaxOpenSizeReq()); } /** * Creates a new instance of the `GetMaxOpenSizeReq` class with the given data. */ static create(data) { let obj = new GetMaxOpenSizeReq(); obj.symbol = data.symbol; obj.price = data.price; obj.leverage = data.leverage; 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 GetMaxOpenSizeReq(), jsonObject); } } exports.GetMaxOpenSizeReq = GetMaxOpenSizeReq; class GetMaxOpenSizeReqBuilder { 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; } /** * Order Price */ setPrice(value) { this.obj.price = value; return this; } /** * Leverage */ setLeverage(value) { this.obj.leverage = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetMaxOpenSizeReqBuilder = GetMaxOpenSizeReqBuilder; //# sourceMappingURL=model_get_max_open_size_req.js.map