kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
142 lines • 4.03 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetWithdrawalHistoryOldReqBuilder = exports.GetWithdrawalHistoryOldReq = void 0;
const class_transformer_1 = require("class-transformer");
class GetWithdrawalHistoryOldReq {
/**
* 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 `GetWithdrawalHistoryOldReq` class.
* The builder pattern allows step-by-step construction of a `GetWithdrawalHistoryOldReq` object.
*/
static builder() {
return new GetWithdrawalHistoryOldReqBuilder(new GetWithdrawalHistoryOldReq());
}
/**
* Creates a new instance of the `GetWithdrawalHistoryOldReq` class with the given data.
*/
static create(data) {
let obj = new GetWithdrawalHistoryOldReq();
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 GetWithdrawalHistoryOldReq(), jsonObject);
}
}
exports.GetWithdrawalHistoryOldReq = GetWithdrawalHistoryOldReq;
(function (GetWithdrawalHistoryOldReq) {
let StatusEnum;
(function (StatusEnum) {
/**
*
*/
StatusEnum[StatusEnum["PROCESSING"] = 'PROCESSING'] = "PROCESSING";
/**
*
*/
StatusEnum[StatusEnum["SUCCESS"] = 'SUCCESS'] = "SUCCESS";
/**
*
*/
StatusEnum[StatusEnum["FAILURE"] = 'FAILURE'] = "FAILURE";
})(StatusEnum = GetWithdrawalHistoryOldReq.StatusEnum || (GetWithdrawalHistoryOldReq.StatusEnum = {}));
})(GetWithdrawalHistoryOldReq || (exports.GetWithdrawalHistoryOldReq = GetWithdrawalHistoryOldReq = {}));
class GetWithdrawalHistoryOldReqBuilder {
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.GetWithdrawalHistoryOldReqBuilder = GetWithdrawalHistoryOldReqBuilder;
//# sourceMappingURL=model_get_withdrawal_history_old_req.js.map