UNPKG

kucoin-universal-sdk

Version:
95 lines 2.69 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetRebaseReqBuilder = exports.GetRebaseReq = void 0; const class_transformer_1 = require("class-transformer"); class GetRebaseReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { } /** * Creates a new instance of the `GetRebaseReq` class. * The builder pattern allows step-by-step construction of a `GetRebaseReq` object. */ static builder() { return new GetRebaseReqBuilder(new GetRebaseReq()); } /** * Creates a new instance of the `GetRebaseReq` class with the given data. */ static create(data) { let obj = new GetRebaseReq(); obj.begin = data.begin; obj.end = data.end; obj.tradeType = data.tradeType; 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 GetRebaseReq(), jsonObject); } } exports.GetRebaseReq = GetRebaseReq; (function (GetRebaseReq) { let TradeTypeEnum; (function (TradeTypeEnum) { /** * spot */ TradeTypeEnum[TradeTypeEnum["_1"] = '1'] = "_1"; /** * futures */ TradeTypeEnum[TradeTypeEnum["_2"] = '2'] = "_2"; })(TradeTypeEnum = GetRebaseReq.TradeTypeEnum || (GetRebaseReq.TradeTypeEnum = {})); })(GetRebaseReq || (exports.GetRebaseReq = GetRebaseReq = {})); class GetRebaseReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Start time, for example: 20240610 */ setBegin(value) { this.obj.begin = value; return this; } /** * End time, for example: 20241010 (query data with a maximum interval of 6 months) */ setEnd(value) { this.obj.end = value; return this; } /** * Transaction type: 1, spot; 2, futures */ setTradeType(value) { this.obj.tradeType = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetRebaseReqBuilder = GetRebaseReqBuilder; //# sourceMappingURL=model_get_rebase_req.js.map