package com.jsowell.adapay.response;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 查询支付确认对象详情反参
 */
@Data
public class QueryPaymentConfirmDetailResponse extends AdapayBaseResponse{
    @JSONField(name = "payment_id")
    private String paymentId;

    @JSONField(name = "prod_mode")
    private String prodMode;

    @JSONField(name = "payment_confirms")
    private List<PaymentConfirmInfo> paymentConfirms;

    @JSONField(name = "has_more")
    private Boolean hasMore;

    @JSONField(name = "app_id")
    private String appId;

    @JSONField(name = "object")
    private String object;

    @Getter
    @Setter
    public static class PaymentConfirmInfo{
        /**
         * 返参，必填，由AdaPay生成的支付对象 ID
         */
        @JSONField(name = "id")
        private String id;

        /**
         * 返参，必填，支付创建时的时间戳
         */
        @JSONField(name = "created_time")
        private String createdTime;

        /**
         * 必填，订单号
         */
        @JSONField(name = "order_no")
        private String orderNo;

        /**
         * 商户发起支付的应用id，不同的前端应用将无法使用该 Payment 对象完成支付
         */
        @JSONField(name = "app_id")
        private String appId;

        @JSONField(name = "confirm_amt")
        private String confirmAmt;

        @JSONField(name = "confirmed_amt")
        private String confirmedAmt;

        @JSONField(name = "fee_mode")
        private String feeMode;

        private String description;

        @JSONField(name = "reserved_amt")
        private String reservedAmt;

        @JSONField(name = "refunded_amt")
        private String refundedAmt;

        @JSONField(name = "fee_amt")
        private String feeAmt;

    }
}
