kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
66 lines • 2.08 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetPositionListReqBuilder = exports.GetPositionListReq = void 0;
const class_transformer_1 = require("class-transformer");
class GetPositionListReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() { }
/**
* Creates a new instance of the `GetPositionListReq` class.
* The builder pattern allows step-by-step construction of a `GetPositionListReq` object.
*/
static builder() {
return new GetPositionListReqBuilder(new GetPositionListReq());
}
/**
* Creates a new instance of the `GetPositionListReq` class with the given data.
*/
static create(data) {
let obj = new GetPositionListReq();
obj.currency = data.currency;
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 GetPositionListReq(), jsonObject);
}
}
exports.GetPositionListReq = GetPositionListReq;
class GetPositionListReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Quote currency code, Please refer to [rootSymbol](https://www.kucoin.com/docs-new/api-221752070) , such as USDT,XBT. Query all positions when empty
*/
setCurrency(value) {
this.obj.currency = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.GetPositionListReqBuilder = GetPositionListReqBuilder;
//# sourceMappingURL=model_get_position_list_req.js.map