package org.wfc.payment.pay.ccpay.model;

import lombok.Data;

@Data
public class PaymentRequest {
    private Long userId;
    private String cardNumber;
    private String cardLastFour;
    private String cardHolderName;
    private String expirationDate;
    private String cvv;
    private double amount;
    private String token;
    private String cardType;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void setCardLastFour() {
        this.cardLastFour = cardNumber.substring(cardNumber.length() - 4);
    }
    
    public String getCardLastFour() {
        return cardLastFour;
    }

    public String getCardType() {
        return cardType;
    }
}
