package com.czg.pay;

import lombok.Data;
import lombok.NonNull;

/**
 * @author ww
 */
@Data
public class CzgRefundReq {
    //必填范围
    /**
     * 退款订单号
     * 商户退款订单号
     */
    private String mchRefundNo;
    /**
     * 退款原因
     */
    private String refundReason;
    /**
     * 退款金额
     * 单位为分
     */
    private Long refundAmount;
    /**
     * 原订单总金额 单位 分
     */
    private Long orderTotalAmount;

    //非必填范围
    /**
     * 原平台订单号 (二选一)
     */
    private String payOrderId;
    /**
     * 原商户订单号 (二选一)
     */
    private String mchOrderNo;
    /**
     * 扩展参数
     * * 扩展参数
     * * {
     * *     "pay_type": "order/vip"
     * * }
     */
    private String extParam;
    /**
     * 回调地址
     */
    private String notifyUrl;

    /**
     * 支付平台
     */
    private String platform;

    /**
     * payOrderId和mchOrderNo 二选一 必填
     */
    public CzgRefundReq(@NonNull String mchRefundNo, @NonNull String refundReason, @NonNull Long refundAmount,
                        @NonNull Long orderTotalAmount, String mchOrderNo, String extParam, String platform) {
        this.mchRefundNo = mchRefundNo;
        this.refundReason = refundReason;
        this.refundAmount = refundAmount;
        this.orderTotalAmount = orderTotalAmount;
        this.mchOrderNo = mchOrderNo;
        this.extParam = extParam;
        this.platform = platform;
    }
}
