All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univapay.sdk.models.response.merchant.TransactionUserData Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
package com.univapay.sdk.models.response.merchant;

import com.google.gson.annotations.SerializedName;
import com.univapay.sdk.models.response.merchant.transaction.OnlineTransactionData;
import com.univapay.sdk.models.response.merchant.transaction.QrMpmTransactionData;
import com.univapay.sdk.types.*;
import com.univapay.sdk.types.Gateway;
import com.univapay.sdk.types.RefundReason;
import com.univapay.sdk.types.TransactionType;
import java.util.List;

public class TransactionUserData {

  @SerializedName("brand")
  private String brand;

  @Deprecated
  @SerializedName("gateway")
  private Gateway gateway;

  @SerializedName("type")
  private TransactionType transactionType;

  @SerializedName("cardholder_email_address")
  private String cardholderEmailAddress;

  @SerializedName("cardholder_phone_number")
  private String cardholderPhoneNumber;

  @SerializedName("cardholder_name")
  private String cardHolderName;

  @SerializedName("customer_name")
  private String customerName;

  @SerializedName("refunds")
  private List refunds;

  @SerializedName("reason")
  private RefundReason refundReason;

  public TransactionType getTransactionType() {
    return transactionType;
  }

  public CardTransactionData asCardTransactionData() {
    return new CardTransactionData(cardHolderName, gateway, brand);
  }

  public ApplePayTransactionData asApplePayTransactionData() {
    return new ApplePayTransactionData(cardHolderName, gateway, brand);
  }

  public QRScanTransactionData asQRScanTransactionData() {
    return new QRScanTransactionData(cardholderEmailAddress, gateway, brand);
  }

  public KonbiniTransactionData asKonbiniTransactionData() {
    return new KonbiniTransactionData(customerName, gateway, brand);
  }

  public PaidyTransactionData asPaidyTransactionData() {
    return new PaidyTransactionData(cardholderEmailAddress, cardholderPhoneNumber, gateway, brand);
  }

  public OnlineTransactionData asOnlineTransactionData() {
    return new OnlineTransactionData(cardholderEmailAddress, gateway, brand);
  }

  public QrMpmTransactionData asQrMpmTransactionData() {
    return new QrMpmTransactionData(cardholderEmailAddress, gateway, brand);
  }

  public ChargeUserData asChargeUserData() {
    return new ChargeUserData(refunds);
  }

  public RefundUserData asRefundUserData() {
    return new RefundUserData(refundReason);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy