kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
89 lines • 2.3 kB
JavaScript
;
// Code generated by Kucoin Universal SDK Generator; DO NOT EDIT.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RedeemReqBuilder = exports.RedeemReq = void 0;
const class_transformer_1 = require("class-transformer");
class RedeemReq {
/**
* Private constructor, please use the corresponding static methods to construct the object.
*/
constructor() {
// @ts-ignore
this.currency = null;
// @ts-ignore
this.size = null;
// @ts-ignore
this.purchaseOrderNo = null;
}
/**
* Creates a new instance of the `RedeemReq` class.
* The builder pattern allows step-by-step construction of a `RedeemReq` object.
*/
static builder() {
return new RedeemReqBuilder(new RedeemReq());
}
/**
* Creates a new instance of the `RedeemReq` class with the given data.
*/
static create(data) {
let obj = new RedeemReq();
obj.currency = data.currency;
obj.size = data.size;
obj.purchaseOrderNo = data.purchaseOrderNo;
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 RedeemReq(), jsonObject);
}
}
exports.RedeemReq = RedeemReq;
class RedeemReqBuilder {
constructor(obj) {
this.obj = obj;
this.obj = obj;
}
/**
* Currency
*/
setCurrency(value) {
this.obj.currency = value;
return this;
}
/**
* Redemption amount
*/
setSize(value) {
this.obj.size = value;
return this;
}
/**
* Purchase order ID
*/
setPurchaseOrderNo(value) {
this.obj.purchaseOrderNo = value;
return this;
}
/**
* Get the final object.
*/
build() {
return this.obj;
}
}
exports.RedeemReqBuilder = RedeemReqBuilder;
//# sourceMappingURL=model_redeem_req.js.map