UNPKG

kucoin-universal-sdk

Version:
133 lines 3.75 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetDepositHistoryReqBuilder = exports.GetDepositHistoryReq = void 0; const class_transformer_1 = require("class-transformer"); class GetDepositHistoryReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * Number of results per request. Minimum is 10, maximum is 500. */ this.pageSize = 50; } /** * Creates a new instance of the `GetDepositHistoryReq` class. * The builder pattern allows step-by-step construction of a `GetDepositHistoryReq` object. */ static builder() { return new GetDepositHistoryReqBuilder(new GetDepositHistoryReq()); } /** * Creates a new instance of the `GetDepositHistoryReq` class with the given data. */ static create(data) { let obj = new GetDepositHistoryReq(); obj.currency = data.currency; obj.status = data.status; obj.startAt = data.startAt; obj.endAt = data.endAt; obj.currentPage = data.currentPage; if (data.pageSize) { obj.pageSize = data.pageSize; } else { obj.pageSize = 50; } 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 GetDepositHistoryReq(), jsonObject); } } exports.GetDepositHistoryReq = GetDepositHistoryReq; (function (GetDepositHistoryReq) { let StatusEnum; (function (StatusEnum) { /** * Deposit processing */ StatusEnum[StatusEnum["PROCESSING"] = 'PROCESSING'] = "PROCESSING"; /** * Deposit success */ StatusEnum[StatusEnum["SUCCESS"] = 'SUCCESS'] = "SUCCESS"; /** * Deposit fail */ StatusEnum[StatusEnum["FAILURE"] = 'FAILURE'] = "FAILURE"; })(StatusEnum = GetDepositHistoryReq.StatusEnum || (GetDepositHistoryReq.StatusEnum = {})); })(GetDepositHistoryReq || (exports.GetDepositHistoryReq = GetDepositHistoryReq = {})); class GetDepositHistoryReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * Status. Available value: PROCESSING, SUCCESS, and FAILURE */ setStatus(value) { this.obj.status = value; return this; } /** * Start time (milliseconds) */ setStartAt(value) { this.obj.startAt = value; return this; } /** * End time (milliseconds) */ setEndAt(value) { this.obj.endAt = value; return this; } /** * Current request page. */ setCurrentPage(value) { this.obj.currentPage = value; return this; } /** * Number of results per request. Minimum is 10, maximum is 500. */ setPageSize(value) { this.obj.pageSize = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetDepositHistoryReqBuilder = GetDepositHistoryReqBuilder; //# sourceMappingURL=model_get_deposit_history_req.js.map