UNPKG

kucoin-universal-sdk

Version:
126 lines 3.63 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.AddSubAccountApiReqBuilder = exports.AddSubAccountApiReq = void 0; const class_transformer_1 = require("class-transformer"); class AddSubAccountApiReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { // @ts-ignore this.uid = null; // @ts-ignore this.passphrase = null; // @ts-ignore this.ipWhitelist = null; // @ts-ignore this.permissions = null; // @ts-ignore this.label = null; } /** * Creates a new instance of the `AddSubAccountApiReq` class. * The builder pattern allows step-by-step construction of a `AddSubAccountApiReq` object. */ static builder() { return new AddSubAccountApiReqBuilder(new AddSubAccountApiReq()); } /** * Creates a new instance of the `AddSubAccountApiReq` class with the given data. */ static create(data) { let obj = new AddSubAccountApiReq(); obj.uid = data.uid; obj.passphrase = data.passphrase; obj.ipWhitelist = data.ipWhitelist; obj.permissions = data.permissions; obj.label = data.label; 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 AddSubAccountApiReq(), jsonObject); } } exports.AddSubAccountApiReq = AddSubAccountApiReq; (function (AddSubAccountApiReq) { let PermissionsEnum; (function (PermissionsEnum) { /** * */ PermissionsEnum[PermissionsEnum["GENERAL"] = 'general'] = "GENERAL"; /** * */ PermissionsEnum[PermissionsEnum["SPOT"] = 'spot'] = "SPOT"; /** * */ PermissionsEnum[PermissionsEnum["FUTURES"] = 'futures'] = "FUTURES"; })(PermissionsEnum = AddSubAccountApiReq.PermissionsEnum || (AddSubAccountApiReq.PermissionsEnum = {})); })(AddSubAccountApiReq || (exports.AddSubAccountApiReq = AddSubAccountApiReq = {})); class AddSubAccountApiReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Sub-account UID */ setUid(value) { this.obj.uid = value; return this; } /** * API passphrase */ setPassphrase(value) { this.obj.passphrase = value; return this; } /** * IP whitelist list, supports up to 20 IPs */ setIpWhitelist(value) { this.obj.ipWhitelist = value; return this; } /** * Permission group list (only General, Spot and Futures permissions can be set, such as \"General, Trade\"). */ setPermissions(value) { this.obj.permissions = value; return this; } /** * apikey remarks (length 4~32) */ setLabel(value) { this.obj.label = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.AddSubAccountApiReqBuilder = AddSubAccountApiReqBuilder; //# sourceMappingURL=model_add_sub_account_api_req.js.map