UNPKG

kucoin-universal-sdk

Version:
116 lines 3.1 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetDepositListReqBuilder = exports.GetDepositListReq = void 0; const class_transformer_1 = require("class-transformer"); class GetDepositListReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * Maximum number of returned items, maximum 1000, default 1000 */ this.limit = 1000; } /** * Creates a new instance of the `GetDepositListReq` class. * The builder pattern allows step-by-step construction of a `GetDepositListReq` object. */ static builder() { return new GetDepositListReqBuilder(new GetDepositListReq()); } /** * Creates a new instance of the `GetDepositListReq` class with the given data. */ static create(data) { let obj = new GetDepositListReq(); obj.currency = data.currency; obj.status = data.status; obj.hash = data.hash; obj.startTimestamp = data.startTimestamp; obj.endTimestamp = data.endTimestamp; if (data.limit) { obj.limit = data.limit; } else { obj.limit = 1000; } 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 GetDepositListReq(), jsonObject); } } exports.GetDepositListReq = GetDepositListReq; class GetDepositListReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * Status. Available value: PROCESSING, SUCCESS, FAILURE */ setStatus(value) { this.obj.status = value; return this; } /** * hash */ setHash(value) { this.obj.hash = value; return this; } /** * Start time (milliseconds) */ setStartTimestamp(value) { this.obj.startTimestamp = value; return this; } /** * End time (milliseconds); default sorting in descending order */ setEndTimestamp(value) { this.obj.endTimestamp = value; return this; } /** * Maximum number of returned items, maximum 1000, default 1000 */ setLimit(value) { this.obj.limit = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetDepositListReqBuilder = GetDepositListReqBuilder; //# sourceMappingURL=model_get_deposit_list_req.js.map