UNPKG

kucoin-universal-sdk

Version:
164 lines 4.95 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.TransferReqBuilder = exports.TransferReq = void 0; const class_transformer_1 = require("class-transformer"); class TransferReq { /** * 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.direction = null; // @ts-ignore this.accountType = null; // @ts-ignore this.specialUid = null; // @ts-ignore this.specialAccountType = null; // @ts-ignore this.clientOid = null; } /** * Creates a new instance of the `TransferReq` class. * The builder pattern allows step-by-step construction of a `TransferReq` object. */ static builder() { return new TransferReqBuilder(new TransferReq()); } /** * Creates a new instance of the `TransferReq` class with the given data. */ static create(data) { let obj = new TransferReq(); obj.currency = data.currency; obj.amount = data.amount; obj.direction = data.direction; obj.accountType = data.accountType; obj.specialUid = data.specialUid; obj.specialAccountType = data.specialAccountType; obj.clientOid = data.clientOid; 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 TransferReq(), jsonObject); } } exports.TransferReq = TransferReq; (function (TransferReq) { let DirectionEnum; (function (DirectionEnum) { /** * */ DirectionEnum[DirectionEnum["OUT"] = 'OUT'] = "OUT"; /** * */ DirectionEnum[DirectionEnum["IN"] = 'IN'] = "IN"; })(DirectionEnum = TransferReq.DirectionEnum || (TransferReq.DirectionEnum = {})); let AccountTypeEnum; (function (AccountTypeEnum) { /** * */ AccountTypeEnum[AccountTypeEnum["MAIN"] = 'MAIN'] = "MAIN"; /** * */ AccountTypeEnum[AccountTypeEnum["TRADE"] = 'TRADE'] = "TRADE"; })(AccountTypeEnum = TransferReq.AccountTypeEnum || (TransferReq.AccountTypeEnum = {})); let SpecialAccountTypeEnum; (function (SpecialAccountTypeEnum) { /** * */ SpecialAccountTypeEnum[SpecialAccountTypeEnum["MAIN"] = 'MAIN'] = "MAIN"; /** * */ SpecialAccountTypeEnum[SpecialAccountTypeEnum["TRADE"] = 'TRADE'] = "TRADE"; })(SpecialAccountTypeEnum = TransferReq.SpecialAccountTypeEnum || (TransferReq.SpecialAccountTypeEnum = {})); })(TransferReq || (exports.TransferReq = TransferReq = {})); class TransferReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * Transfer Amount (must be a positive integer in the currency\'s precision) */ setAmount(value) { this.obj.amount = value; return this; } /** * Fund transfer direction: OUT (Broker account is transferred to Broker sub-account), IN (Broker sub-account is transferred to Broker account) */ setDirection(value) { this.obj.direction = value; return this; } /** * Broker account types: MAIN (Funding account), TRADE (Spot trading account) */ setAccountType(value) { this.obj.accountType = value; return this; } /** * Broker sub-account UID, must be the Broker sub-account created by the current Broker user. */ setSpecialUid(value) { this.obj.specialUid = value; return this; } /** * Broker sub-account types: MAIN (Funding account), TRADE (Spot trading account) */ setSpecialAccountType(value) { this.obj.specialAccountType = value; return this; } /** * Client Order ID, the unique identifier created by the client. It is recommended to use UUID. The maximum length is 128 bits. */ setClientOid(value) { this.obj.clientOid = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.TransferReqBuilder = TransferReqBuilder; //# sourceMappingURL=model_transfer_req.js.map