package com.gingersoft.gsa.cloud.pay.pos.hyweb.bean.response.pos;

import android.os.Parcel;
import android.os.Parcelable;

import lombok.Data;

/**
 * 作者：ELEGANT_BIN
 * 版本：1.6.0
 * 创建日期：2019/6/6
 * 修订历史：2019/6/6
 * 描述：
 */
@Data
public class SaleRespose  extends HywebPosResponse implements Parcelable {

    //N5支付回调数据
    /**
     * EVENT_NAME : SALE_RESP
     * MID : 011603999000001
     * PAYMENT_TYPE : UP
     * PAN : 621483******1227
     * TRACE_NO : 000008
     * TIPS : 0
     * RESP_CODE : C1000
     * HOST_REF : 729706000007
     * TXN_TIME : 111905
     * TXN_ID : 18522
     * TXN_DATE : 20190613
     * STATUS : 00
     * EXPIRY_DATE : ****
     * AUTH_CODE : 080657
     * TID : 21700503
     * TXN_AMT : 0.5
     */

    private String MID;
    private String PAYMENT_TYPE;
    private String PAN;
    private String TRACE_NO;
//    private double TIPS;
    private String RESP_CODE;
    private String HOST_REF;
    private String TXN_TIME;
//    private String TXN_ID;
    private String TXN_DATE;
    private String EXPIRY_DATE;
    private String AUTH_CODE;
    private String TID;
//    private double TXN_AMT;

    public SaleRespose() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.MID);
        dest.writeString(this.PAYMENT_TYPE);
        dest.writeString(this.PAN);
        dest.writeString(this.TRACE_NO);
        dest.writeString(this.RESP_CODE);
        dest.writeString(this.HOST_REF);
        dest.writeString(this.TXN_TIME);
        dest.writeString(this.TXN_DATE);
        dest.writeString(this.EXPIRY_DATE);
        dest.writeString(this.AUTH_CODE);
        dest.writeString(this.TID);
    }

    protected SaleRespose(Parcel in) {
        super(in);
        this.MID = in.readString();
        this.PAYMENT_TYPE = in.readString();
        this.PAN = in.readString();
        this.TRACE_NO = in.readString();
        this.RESP_CODE = in.readString();
        this.HOST_REF = in.readString();
        this.TXN_TIME = in.readString();
        this.TXN_DATE = in.readString();
        this.EXPIRY_DATE = in.readString();
        this.AUTH_CODE = in.readString();
        this.TID = in.readString();
    }

    public static final Creator<SaleRespose> CREATOR = new Creator<SaleRespose>() {
        @Override
        public SaleRespose createFromParcel(Parcel source) {
            return new SaleRespose(source);
        }

        @Override
        public SaleRespose[] newArray(int size) {
            return new SaleRespose[size];
        }
    };
}
