UNPKG

kucoin-universal-sdk

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