package com.yono.messeripos.models;

import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import android.widget.ImageView;

import androidx.databinding.BindingAdapter;

import com.google.gson.annotations.SerializedName;
import com.yono.messeripos.R;

public class PaymentsModels<T> implements Parcelable {
    @SerializedName("id")
    private int id;

    @SerializedName("order_code")
    private String orderId;

    @SerializedName("payment_type")
    private String paymentType;

    @SerializedName("bank")
    private String bank;

    @SerializedName("gross_amount")
    private long grossAmount;

    @SerializedName("transaction_status")
    private String transactionStatus;

    @SerializedName("transaction_time")
    private String transaction_time;

    @SerializedName("transaction_id")
    private String transaction_id;

    @SerializedName("created_at")
    private String createdAt;

    @SerializedName("updated_at")
    private String updatedAt;

    @SerializedName("va_numbers")
    private T nomorPembayaran;

    @SerializedName("va_number")
    private String nomorPembayaranGet;

    @SerializedName("order_id")
    private String orderIdUpdate;


    public PaymentsModels() {
    }

    public PaymentsModels(String orderId, String paymentType, String bank, long grossAmount) {
        this.orderId = orderId;
        this.paymentType = paymentType;
        this.bank = bank;
        this.grossAmount = grossAmount;
    }

    protected PaymentsModels(Parcel in) {
        orderId = in.readString();
        paymentType = in.readString();
        bank = in.readString();
        grossAmount = in.readLong();
        transactionStatus = in.readString();
        createdAt = in.readString();
        updatedAt = in.readString();
    }

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

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

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    public long getGrossAmount() {
        return grossAmount;
    }

    public void setGrossAmount(long grossAmount) {
        this.grossAmount = grossAmount;
    }

    public String getTransactionStatus() {
        return transactionStatus;
    }

    public void setTransactionStatus(String transactionStatus) {
        this.transactionStatus = transactionStatus;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    public T getNomorPembayaran() {
        return nomorPembayaran;
    }

    public void setNomorPembayaran(T nomorPembayaran) {
        this.nomorPembayaran = nomorPembayaran;
    }

    public String getTransaction_time() {
        return transaction_time;
    }

    public void setTransaction_time(String transaction_time) {
        this.transaction_time = transaction_time;
    }

    public String getNomorPembayaranGet() {
        return nomorPembayaranGet;
    }

    public void setNomorPembayaranGet(String nomorPembayaranGet) {
        this.nomorPembayaranGet = nomorPembayaranGet;
    }

    public String getOrderIdUpdate() {
        return orderIdUpdate;
    }

    public void setOrderIdUpdate(String orderIdUpdate) {
        this.orderIdUpdate = orderIdUpdate;
    }

    public String getTransaction_id() {
        return transaction_id;
    }

    public void setTransaction_id(String transaction_id) {
        this.transaction_id = transaction_id;
    }

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

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(orderId);
        parcel.writeString(paymentType);
        parcel.writeString(bank);
        parcel.writeLong(grossAmount);
        parcel.writeString(transactionStatus);
        parcel.writeString(createdAt);
        parcel.writeString(updatedAt);
    }
}
