kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
102 lines • 3.28 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FuturesAccountTransferOutReqBuilder = exports.FuturesAccountTransferOutReq = void 0;
const class_transformer_1 = require("class-transformer");
class FuturesAccountTransferOutReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() {
// @ts-ignore
this.currency = null;
// @ts-ignore
this.amount = null;
// @ts-ignore
this.recAccountType = null;
}
/**
* Creates a new instance of the `FuturesAccountTransferOutReq` class.
* The builder pattern allows step-by-step construction of a `FuturesAccountTransferOutReq` object.
*/
static builder() {
return new FuturesAccountTransferOutReqBuilder(new FuturesAccountTransferOutReq());
}
/**
* Creates a new instance of the `FuturesAccountTransferOutReq` class with the given data.
*/
static create(data) {
let obj = new FuturesAccountTransferOutReq();
obj.currency = data.currency;
obj.amount = data.amount;
obj.recAccountType = data.recAccountType;
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 FuturesAccountTransferOutReq(), jsonObject);
}
}
exports.FuturesAccountTransferOutReq = FuturesAccountTransferOutReq;
(function (FuturesAccountTransferOutReq) {
let RecAccountTypeEnum;
(function (RecAccountTypeEnum) {
/**
*
*/
RecAccountTypeEnum[RecAccountTypeEnum["MAIN"] = 'MAIN'] = "MAIN";
/**
*
*/
RecAccountTypeEnum[RecAccountTypeEnum["TRADE"] = 'TRADE'] = "TRADE";
})(RecAccountTypeEnum = FuturesAccountTransferOutReq.RecAccountTypeEnum || (FuturesAccountTransferOutReq.RecAccountTypeEnum = {}));
})(FuturesAccountTransferOutReq || (exports.FuturesAccountTransferOutReq = FuturesAccountTransferOutReq = {}));
class FuturesAccountTransferOutReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Currency, including XBT, USDT...
*/
setCurrency(value) {
this.obj.currency = value;
return this;
}
/**
* Amount to be transferred out; cannot exceed 1000000000
*/
setAmount(value) {
this.obj.amount = value;
return this;
}
/**
* Receive account type, including MAIN, TRADE
*/
setRecAccountType(value) {
this.obj.recAccountType = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.FuturesAccountTransferOutReqBuilder = FuturesAccountTransferOutReqBuilder;
//# sourceMappingURL=model_futures_account_transfer_out_req.js.map