UNPKG

kucoin-universal-sdk

Version:
114 lines 4.01 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetSpotSubAccountDetailReqBuilder = exports.GetSpotSubAccountDetailReq = void 0; const class_transformer_1 = require("class-transformer"); require("reflect-metadata"); class GetSpotSubAccountDetailReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * False: Do not display currencies with 0 assets; True: display all currencies */ this.includeBaseAmount = false; } /** * Creates a new instance of the `GetSpotSubAccountDetailReq` class. * The builder pattern allows step-by-step construction of a `GetSpotSubAccountDetailReq` object. */ static builder() { return new GetSpotSubAccountDetailReqBuilder(new GetSpotSubAccountDetailReq()); } /** * Creates a new instance of the `GetSpotSubAccountDetailReq` class with the given data. */ static create(data) { let obj = new GetSpotSubAccountDetailReq(); obj.subUserId = data.subUserId; if (data.includeBaseAmount) { obj.includeBaseAmount = data.includeBaseAmount; } else { obj.includeBaseAmount = false; } obj.baseCurrency = data.baseCurrency; obj.baseAmount = data.baseAmount; 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 GetSpotSubAccountDetailReq(), jsonObject); } } exports.GetSpotSubAccountDetailReq = GetSpotSubAccountDetailReq; __decorate([ Reflect.metadata('path', 'subUserId'), __metadata("design:type", String) ], GetSpotSubAccountDetailReq.prototype, "subUserId", void 0); class GetSpotSubAccountDetailReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * the userID of a sub-account. */ setSubUserId(value) { this.obj.subUserId = value; return this; } /** * False: Do not display currencies with 0 assets; True: display all currencies */ setIncludeBaseAmount(value) { this.obj.includeBaseAmount = value; return this; } /** * Specify the currency used to convert assets */ setBaseCurrency(value) { this.obj.baseCurrency = value; return this; } /** * The currency balance specified must be greater than or equal to the amount */ setBaseAmount(value) { this.obj.baseAmount = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetSpotSubAccountDetailReqBuilder = GetSpotSubAccountDetailReqBuilder; //# sourceMappingURL=model_get_spot_sub_account_detail_req.js.map