com.lehuipay.leona.model.RefundRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leona-java Show documentation
Show all versions of leona-java Show documentation
leona-java is a http development kit.
package com.lehuipay.leona.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.lehuipay.leona.utils.CommonUtil;
public class RefundRequest {
public RefundRequest(String merchantID, String orderNo, String transactionID, String refundNo, Integer amount) {
if (CommonUtil.isEmpty(merchantID)) {
throw new IllegalArgumentException("init com.lehuipay.leona.model.RefundRequest, merchantID should not be empty");
}
if (CommonUtil.isEmpty(orderNo) && CommonUtil.isEmpty(transactionID)) {
throw new IllegalArgumentException("init com.lehuipay.leona.model.RefundRequest, at least one of orderNo, transactionID");
}
if (CommonUtil.isEmpty(refundNo)) {
throw new IllegalArgumentException("init com.lehuipay.leona.model.RefundRequest, refundNo should not be empty");
}
if (amount <= 0) {
throw new IllegalArgumentException("init com.lehuipay.leona.model.RefundRequest, amount should be greater than zero");
}
this.merchantID = merchantID;
this.orderNo = orderNo;
this.transactionID = transactionID;
this.refundNo = refundNo;
this.amount = amount;
}
@JSONField(name = "merchant_id")
private String merchantID;
@JSONField(name = "order_no")
private String orderNo;
@JSONField(name = "transaction_id")
private String transactionID;
@JSONField(name = "refund_no")
private String refundNo;
@JSONField(name = "amount")
private Integer amount;
public String getMerchantID() {
return merchantID;
}
public String getOrderNo() {
return orderNo;
}
public String getTransactionID() {
return transactionID;
}
public String getRefundNo() {
return refundNo;
}
public Integer getAmount() {
return amount;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy