UNPKG

kucoin-universal-sdk

Version:
102 lines 3.23 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.FuturesAccountTransferInReqBuilder = exports.FuturesAccountTransferInReq = void 0; const class_transformer_1 = require("class-transformer"); class FuturesAccountTransferInReq { /** * 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.payAccountType = null; } /** * Creates a new instance of the `FuturesAccountTransferInReq` class. * The builder pattern allows step-by-step construction of a `FuturesAccountTransferInReq` object. */ static builder() { return new FuturesAccountTransferInReqBuilder(new FuturesAccountTransferInReq()); } /** * Creates a new instance of the `FuturesAccountTransferInReq` class with the given data. */ static create(data) { let obj = new FuturesAccountTransferInReq(); obj.currency = data.currency; obj.amount = data.amount; obj.payAccountType = data.payAccountType; 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 FuturesAccountTransferInReq(), jsonObject); } } exports.FuturesAccountTransferInReq = FuturesAccountTransferInReq; (function (FuturesAccountTransferInReq) { let PayAccountTypeEnum; (function (PayAccountTypeEnum) { /** * */ PayAccountTypeEnum[PayAccountTypeEnum["MAIN"] = 'MAIN'] = "MAIN"; /** * */ PayAccountTypeEnum[PayAccountTypeEnum["TRADE"] = 'TRADE'] = "TRADE"; })(PayAccountTypeEnum = FuturesAccountTransferInReq.PayAccountTypeEnum || (FuturesAccountTransferInReq.PayAccountTypeEnum = {})); })(FuturesAccountTransferInReq || (exports.FuturesAccountTransferInReq = FuturesAccountTransferInReq = {})); class FuturesAccountTransferInReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Currency, including XBT, USDT... */ setCurrency(value) { this.obj.currency = value; return this; } /** * Amount to be transferred in */ setAmount(value) { this.obj.amount = value; return this; } /** * Payment account type, including MAIN, TRADE */ setPayAccountType(value) { this.obj.payAccountType = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.FuturesAccountTransferInReqBuilder = FuturesAccountTransferInReqBuilder; //# sourceMappingURL=model_futures_account_transfer_in_req.js.map