jp.gopay.sdk.models.response.merchant.TransactionUserData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.models.response.merchant;
import com.google.gson.annotations.SerializedName;
import jp.gopay.sdk.models.response.transactiontoken.PhoneNumber;
import jp.gopay.sdk.types.*;
import java.util.List;
public class TransactionUserData {
@SerializedName("cardholder_name")
private String cardHolderName;
@SerializedName("card_brand")
private CardBrand cardBrand;
@SerializedName("gateway")
private Gateway gateway;
@SerializedName("cardholder_email_address")
private String cardholderEmailAddress;
@SerializedName("customer_name")
private String customerName;
@SerializedName("convenience_store")
private Konbini convenienceStore;
@SerializedName("cardholder_phone_number")
private PhoneNumber cardholderPhoneNumber;
@SerializedName("type")
private TransactionType transactionType;
@SerializedName("refunds")
private List refunds;
@SerializedName("reason")
private RefundReason refundReason;
private PaymentTransactionData paymentData;
private TransactionTypeData transactionTypeData;
public TransactionType getTransactionType() {
return transactionType;
}
public CardTransactionData asCardTransactionData() {
if (paymentData == null) {
paymentData = new CardTransactionData(cardHolderName, cardBrand, gateway);
}
return (CardTransactionData) paymentData;
}
public ApplePayTransactionData asApplePayTransactionData() {
if (paymentData == null) {
paymentData = new ApplePayTransactionData(cardHolderName, cardBrand, gateway);
}
return (ApplePayTransactionData) paymentData;
}
public QRScanTransactionData asQRScanTransactionData() {
if (paymentData == null) {
paymentData = new QRScanTransactionData(cardholderEmailAddress, gateway);
}
return (QRScanTransactionData) paymentData;
}
public KonbiniTransactionData asKonbiniTransactionData() {
if (paymentData == null) {
paymentData = new KonbiniTransactionData(customerName, convenienceStore, gateway);
}
return (KonbiniTransactionData) paymentData;
}
public PaidyTransactionData asPaidyTransactionData() {
if (paymentData == null) {
paymentData = new PaidyTransactionData(cardholderEmailAddress, cardholderPhoneNumber, gateway);
}
return (PaidyTransactionData) paymentData;
}
public ChargeUserData asChargeUserData() {
if (transactionTypeData == null) {
transactionTypeData = new ChargeUserData(refunds);
}
return (ChargeUserData) transactionTypeData;
}
public RefundUserData asRefundUseData() {
if (transactionTypeData == null) {
transactionTypeData = new RefundUserData(refundReason);
}
return (RefundUserData) transactionTypeData;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy