UNPKG

kucoin-universal-sdk

Version:
125 lines 3.77 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetTransferQuotasReqBuilder = exports.GetTransferQuotasReq = void 0; const class_transformer_1 = require("class-transformer"); class GetTransferQuotasReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT */ this.tag = 'BTC-USDT'; } /** * Creates a new instance of the `GetTransferQuotasReq` class. * The builder pattern allows step-by-step construction of a `GetTransferQuotasReq` object. */ static builder() { return new GetTransferQuotasReqBuilder(new GetTransferQuotasReq()); } /** * Creates a new instance of the `GetTransferQuotasReq` class with the given data. */ static create(data) { let obj = new GetTransferQuotasReq(); obj.currency = data.currency; obj.type = data.type; if (data.tag) { obj.tag = data.tag; } else { obj.tag = 'BTC-USDT'; } 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 GetTransferQuotasReq(), jsonObject); } } exports.GetTransferQuotasReq = GetTransferQuotasReq; (function (GetTransferQuotasReq) { let TypeEnum; (function (TypeEnum) { /** * Funding account */ TypeEnum[TypeEnum["MAIN"] = 'MAIN'] = "MAIN"; /** * Spot account */ TypeEnum[TypeEnum["TRADE"] = 'TRADE'] = "TRADE"; /** * Spot cross margin account */ TypeEnum[TypeEnum["MARGIN"] = 'MARGIN'] = "MARGIN"; /** * Spot isolated margin account */ TypeEnum[TypeEnum["ISOLATED"] = 'ISOLATED'] = "ISOLATED"; /** * Option account */ TypeEnum[TypeEnum["OPTION"] = 'OPTION'] = "OPTION"; /** * Spot cross margin HF account */ TypeEnum[TypeEnum["MARGIN_V2"] = 'MARGIN_V2'] = "MARGIN_V2"; /** * Spot isolated margin HF account */ TypeEnum[TypeEnum["ISOLATED_V2"] = 'ISOLATED_V2'] = "ISOLATED_V2"; })(TypeEnum = GetTransferQuotasReq.TypeEnum || (GetTransferQuotasReq.TypeEnum = {})); })(GetTransferQuotasReq || (exports.GetTransferQuotasReq = GetTransferQuotasReq = {})); class GetTransferQuotasReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * The account type:MAIN, TRADE, MARGIN, ISOLATED, MARGIN_V2, ISOLATED_V2 */ setType(value) { this.obj.type = value; return this; } /** * Trading pair required when the account type is ISOLATED; other types do not pass, e.g.: BTC-USDT */ setTag(value) { this.obj.tag = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetTransferQuotasReqBuilder = GetTransferQuotasReqBuilder; //# sourceMappingURL=model_get_transfer_quotas_req.js.map