UNPKG

kucoin-universal-sdk

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