kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
69 lines • 2.12 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddSubAccountReqBuilder = exports.AddSubAccountReq = void 0;
const class_transformer_1 = require("class-transformer");
class AddSubAccountReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() {
// @ts-ignore
this.accountName = null;
}
/**
* Creates a new instance of the `AddSubAccountReq` class.
* The builder pattern allows step-by-step construction of a `AddSubAccountReq` object.
*/
static builder() {
return new AddSubAccountReqBuilder(new AddSubAccountReq());
}
/**
* Creates a new instance of the `AddSubAccountReq` class with the given data.
*/
static create(data) {
let obj = new AddSubAccountReq();
obj.accountName = data.accountName;
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 AddSubAccountReq(), jsonObject);
}
}
exports.AddSubAccountReq = AddSubAccountReq;
class AddSubAccountReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Sub-account Name. Note that this name is unique across the exchange. It is recommended to add a special identifier to prevent name duplication.
*/
setAccountName(value) {
this.obj.accountName = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.AddSubAccountReqBuilder = AddSubAccountReqBuilder;
//# sourceMappingURL=model_add_sub_account_req.js.map