UNPKG

kucoin-universal-sdk

Version:
101 lines 2.73 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetSubAccountReqBuilder = exports.GetSubAccountReq = void 0; const class_transformer_1 = require("class-transformer"); class GetSubAccountReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * Current page, default is 1 */ this.currentPage = 1; /** * The number returned per page, the default is 20, the maximum is 100 */ this.pageSize = 20; } /** * Creates a new instance of the `GetSubAccountReq` class. * The builder pattern allows step-by-step construction of a `GetSubAccountReq` object. */ static builder() { return new GetSubAccountReqBuilder(new GetSubAccountReq()); } /** * Creates a new instance of the `GetSubAccountReq` class with the given data. */ static create(data) { let obj = new GetSubAccountReq(); obj.uid = data.uid; if (data.currentPage) { obj.currentPage = data.currentPage; } else { obj.currentPage = 1; } if (data.pageSize) { obj.pageSize = data.pageSize; } else { obj.pageSize = 20; } 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 GetSubAccountReq(), jsonObject); } } exports.GetSubAccountReq = GetSubAccountReq; class GetSubAccountReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Sub-account UID */ setUid(value) { this.obj.uid = value; return this; } /** * Current page, default is 1 */ setCurrentPage(value) { this.obj.currentPage = value; return this; } /** * The number returned per page, the default is 20, the maximum is 100 */ setPageSize(value) { this.obj.pageSize = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetSubAccountReqBuilder = GetSubAccountReqBuilder; //# sourceMappingURL=model_get_sub_account_req.js.map