OnlineRefundRequest.java 1.6 KB
package com.diligrp.cashier.pipeline.domain;

import com.diligrp.cashier.shared.domain.ContainerSupport;

import java.time.LocalDateTime;

/**
 * 微信退款领域模型
 */
public class OnlineRefundRequest extends ContainerSupport {
    // 退款单号
    private String refundId;
    // 原订单号
    private String paymentId;
    // 原通道订单号
    private String outTradeNo;
    // 原订单总金额
    private Long maxAmount;
    // 退款金额
    private Long amount;
    // 交易备注或退款理由
    private String description;
    // 交易时间
    private LocalDateTime when;

    public static OnlineRefundRequest of(String refundId, String paymentId, String outTradeNo, Long maxAmount,
                                         Long amount, String description, LocalDateTime when) {
        OnlineRefundRequest request = new OnlineRefundRequest();
        request.refundId = refundId;
        request.paymentId = paymentId;
        request.outTradeNo = outTradeNo;
        request.maxAmount = maxAmount;
        request.amount = amount;
        request.description = description;
        request.when = when;
        return request;
    }

    public String getRefundId() {
        return refundId;
    }

    public String getPaymentId() {
        return paymentId;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public Long getMaxAmount() {
        return maxAmount;
    }

    public Long getAmount() {
        return amount;
    }

    public String getDescription() {
        return description;
    }

    public LocalDateTime getWhen() {
        return when;
    }
}