UNPKG

kucoin-universal-sdk

Version:
89 lines 2.49 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.ModifyPurchaseReqBuilder = exports.ModifyPurchaseReq = void 0; const class_transformer_1 = require("class-transformer"); class ModifyPurchaseReq { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { // @ts-ignore this.currency = null; // @ts-ignore this.interestRate = null; // @ts-ignore this.purchaseOrderNo = null; } /** * Creates a new instance of the `ModifyPurchaseReq` class. * The builder pattern allows step-by-step construction of a `ModifyPurchaseReq` object. */ static builder() { return new ModifyPurchaseReqBuilder(new ModifyPurchaseReq()); } /** * Creates a new instance of the `ModifyPurchaseReq` class with the given data. */ static create(data) { let obj = new ModifyPurchaseReq(); obj.currency = data.currency; obj.interestRate = data.interestRate; 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 ModifyPurchaseReq(), jsonObject); } } exports.ModifyPurchaseReq = ModifyPurchaseReq; class ModifyPurchaseReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * Currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * Modified purchase interest rate */ setInterestRate(value) { this.obj.interestRate = value; return this; } /** * Purchase order ID */ setPurchaseOrderNo(value) { this.obj.purchaseOrderNo = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.ModifyPurchaseReqBuilder = ModifyPurchaseReqBuilder; //# sourceMappingURL=model_modify_purchase_req.js.map