kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
95 lines • 2.78 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetBrokerInfoReqBuilder = exports.GetBrokerInfoReq = void 0;
const class_transformer_1 = require("class-transformer");
class GetBrokerInfoReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `GetBrokerInfoReq` class.
* The builder pattern allows step-by-step construction of a `GetBrokerInfoReq` object.
*/
static builder() {
return new GetBrokerInfoReqBuilder(new GetBrokerInfoReq());
}
/**
* Creates a new instance of the `GetBrokerInfoReq` class with the given data.
*/
static create(data) {
let obj = new GetBrokerInfoReq();
obj.begin = data.begin;
obj.end = data.end;
obj.tradeType = data.tradeType;
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 GetBrokerInfoReq(), jsonObject);
}
}
exports.GetBrokerInfoReq = GetBrokerInfoReq;
(function (GetBrokerInfoReq) {
let TradeTypeEnum;
(function (TradeTypeEnum) {
/**
* spot
*/
TradeTypeEnum[TradeTypeEnum["_1"] = '1'] = "_1";
/**
* futures
*/
TradeTypeEnum[TradeTypeEnum["_2"] = '2'] = "_2";
})(TradeTypeEnum = GetBrokerInfoReq.TradeTypeEnum || (GetBrokerInfoReq.TradeTypeEnum = {}));
})(GetBrokerInfoReq || (exports.GetBrokerInfoReq = GetBrokerInfoReq = {}));
class GetBrokerInfoReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Start time, for example: 20230110
*/
setBegin(value) {
this.obj.begin = value;
return this;
}
/**
* End time, for example: 20230210 (query data with a maximum interval of 6 months)
*/
setEnd(value) {
this.obj.end = value;
return this;
}
/**
* Transaction type: 1, spot; 2: futures
*/
setTradeType(value) {
this.obj.tradeType = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.GetBrokerInfoReqBuilder = GetBrokerInfoReqBuilder;
//# sourceMappingURL=model_get_broker_info_req.js.map