palmpaywrappersdk
Version:
PalmPay Wrapper Sdk
57 lines (56 loc) • 1.97 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PayOutQueryRequestBuilder = exports.PayOutQueryRequest = void 0;
const PaymentRequest_1 = require("./PaymentRequest");
class PayOutQueryRequest extends PaymentRequest_1.PaymentRequest {
constructor(paymentRequest, merchantId, businessType, bankCode, bankAccNo, palmpayAccNo) {
super(paymentRequest.requestTime, paymentRequest.version, paymentRequest.nonceStr);
this.merchantId = merchantId;
this.businessType = businessType;
this.bankCode = bankCode;
this.bankAccNo = bankAccNo;
this.palmpayAccNo = palmpayAccNo;
}
toJSON() {
return {
requestTime: this.requestTime,
version: this.version,
nonceStr: this.nonceStr,
merchantId: this.merchantId,
businessType: this.businessType,
bankCode: this.bankCode,
bankAccNo: this.bankAccNo,
palmpayAccNo: this.palmpayAccNo,
};
}
}
exports.PayOutQueryRequest = PayOutQueryRequest;
class PayOutQueryRequestBuilder extends PaymentRequest_1.BuildPayload {
constructor(requestTime, version, nonceStr) {
super(requestTime, version, nonceStr);
}
setMerchantId(merchantId) {
this.merchantId = merchantId;
return this;
}
setBusinessType(businessType) {
this.businessType = businessType;
return this;
}
setBankCode(bankCode) {
this.bankCode = bankCode;
return this;
}
setBankAccNo(bankAccNo) {
this.bankAccNo = bankAccNo;
return this;
}
setPalmpayAccNo(palmpayAccNo) {
this.palmpayAccNo = palmpayAccNo;
return this;
}
build() {
return new PayOutQueryRequest(super.build(), this.merchantId, this.businessType, this.bankCode, this.bankAccNo, this.palmpayAccNo);
}
}
exports.PayOutQueryRequestBuilder = PayOutQueryRequestBuilder;