UNPKG

kucoin-universal-sdk

Version:
150 lines 4.22 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetWithdrawalHistoryReqBuilder = exports.GetWithdrawalHistoryReq = void 0; const class_transformer_1 = require("class-transformer"); class GetWithdrawalHistoryReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * Current request page. */ this.currentPage = 1; /** * Number of results per request. Minimum is 10, maximum is 500. */ this.pageSize = 50; } /** * Creates a new instance of the `GetWithdrawalHistoryReq` class. * The builder pattern allows step-by-step construction of a `GetWithdrawalHistoryReq` object. */ static builder() { return new GetWithdrawalHistoryReqBuilder(new GetWithdrawalHistoryReq()); } /** * Creates a new instance of the `GetWithdrawalHistoryReq` class with the given data. */ static create(data) { let obj = new GetWithdrawalHistoryReq(); obj.currency = data.currency; obj.status = data.status; obj.startAt = data.startAt; obj.endAt = data.endAt; if (data.currentPage) { obj.currentPage = data.currentPage; } else { obj.currentPage = 1; } 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 GetWithdrawalHistoryReq(), jsonObject); } } exports.GetWithdrawalHistoryReq = GetWithdrawalHistoryReq; (function (GetWithdrawalHistoryReq) { let StatusEnum; (function (StatusEnum) { /** * */ StatusEnum[StatusEnum["PROCESSING"] = 'PROCESSING'] = "PROCESSING"; /** * */ StatusEnum[StatusEnum["REVIEW"] = 'REVIEW'] = "REVIEW"; /** * */ StatusEnum[StatusEnum["WALLET_PROCESSING"] = 'WALLET_PROCESSING'] = "WALLET_PROCESSING"; /** * */ StatusEnum[StatusEnum["SUCCESS"] = 'SUCCESS'] = "SUCCESS"; /** * */ StatusEnum[StatusEnum["FAILURE"] = 'FAILURE'] = "FAILURE"; })(StatusEnum = GetWithdrawalHistoryReq.StatusEnum || (GetWithdrawalHistoryReq.StatusEnum = {})); })(GetWithdrawalHistoryReq || (exports.GetWithdrawalHistoryReq = GetWithdrawalHistoryReq = {})); class GetWithdrawalHistoryReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * Status. Available value: REVIEW, PROCESSING, WALLET_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.GetWithdrawalHistoryReqBuilder = GetWithdrawalHistoryReqBuilder; //# sourceMappingURL=model_get_withdrawal_history_req.js.map