UNPKG

palmpaywrappersdk

Version:

PalmPay Wrapper Sdk

61 lines (60 loc) 1.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateOrderRequestBuilder = void 0; const CreateOrderRequest2_1 = require("./CreateOrderRequest2"); class CreateOrderRequestBuilder { constructor(requestTime, version, nonceStr) { this.data = {}; this.data.requestTime = requestTime; this.data.version = version; this.data.nonceStr = nonceStr; } withAmount(amount) { this.data.amount = amount; return this; } withNotifyUrl(notifyUrl) { this.data.notifyUrl = notifyUrl; return this; } withOrderId(orderId) { this.data.orderId = orderId; return this; } withTitle(title) { this.data.title = title; return this; } withDescription(description) { this.data.description = description; return this; } withUserId(userId) { this.data.userId = userId; return this; } withUserMobileNo(userMobileNo) { this.data.userMobileNo = userMobileNo; return this; } withCurrency(currency) { this.data.currency = currency; return this; } withCallBackUrl(callBackUrl) { this.data.callBackUrl = callBackUrl; return this; } withGoodsDetails(goodsDetails) { this.data.goodsDetails = goodsDetails; return this; } withProductType(productType) { this.data.productType = productType; return this; } build() { return new CreateOrderRequest2_1.CreateOrderRequest(this.data); } } exports.CreateOrderRequestBuilder = CreateOrderRequestBuilder;