kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
84 lines • 2.91 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetWithdrawalQuotasReqBuilder = exports.GetWithdrawalQuotasReq = void 0;
const class_transformer_1 = require("class-transformer");
class GetWithdrawalQuotasReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() {
/**
* The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies.
*/
this.chain = 'eth';
}
/**
* Creates a new instance of the `GetWithdrawalQuotasReq` class.
* The builder pattern allows step-by-step construction of a `GetWithdrawalQuotasReq` object.
*/
static builder() {
return new GetWithdrawalQuotasReqBuilder(new GetWithdrawalQuotasReq());
}
/**
* Creates a new instance of the `GetWithdrawalQuotasReq` class with the given data.
*/
static create(data) {
let obj = new GetWithdrawalQuotasReq();
obj.currency = data.currency;
if (data.chain) {
obj.chain = data.chain;
}
else {
obj.chain = 'eth';
}
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 GetWithdrawalQuotasReq(), jsonObject);
}
}
exports.GetWithdrawalQuotasReq = GetWithdrawalQuotasReq;
class GetWithdrawalQuotasReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* currency
*/
setCurrency(value) {
this.obj.currency = value;
return this;
}
/**
* The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies.
*/
setChain(value) {
this.obj.chain = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.GetWithdrawalQuotasReqBuilder = GetWithdrawalQuotasReqBuilder;
//# sourceMappingURL=model_get_withdrawal_quotas_req.js.map