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

jp.gopay.sdk.models.common.PaidyPaymentData Maven / Gradle / Ivy

There is a newer version: 0.11.17
Show newest version
package jp.gopay.sdk.models.common;

import com.google.gson.annotations.SerializedName;
import jp.gopay.sdk.models.request.transactiontoken.PaymentData;
import jp.gopay.sdk.models.response.transactiontoken.PhoneNumber;
import jp.gopay.sdk.types.PaymentTypeName;

public class PaidyPaymentData implements PaymentData {
    @SerializedName("paidy_token")
    PaidyToken paidyToken;

    @SerializedName("phone_number")
    PhoneNumber phoneNumber;

    @SerializedName("shipping_address")
    PaidyShippingAddress shippingAddress;

    public PaidyPaymentData(PaidyToken paidyToken, PaidyShippingAddress shippingAddress) {
        this.paidyToken = paidyToken;
        this.shippingAddress = shippingAddress;
    }

    public PaidyPaymentData(String paidyToken, PaidyShippingAddress shippingAddress) {
        this.paidyToken = new PaidyToken(paidyToken);
        this.shippingAddress = shippingAddress;
    }

    public PaidyPaymentData withPhoneNumber(PhoneNumber phoneNumber) {
        this.phoneNumber = phoneNumber;
        return this;
    }

    @Override
    public PaymentTypeName getPaymentType() {
        return PaymentTypeName.PAIDY;
    }

    public PaidyToken getPaidyToken() {
        return paidyToken;
    }

    public PhoneNumber getPhoneNumber() {
        return phoneNumber;
    }

    public PaidyShippingAddress getShippingAddress() {
        return shippingAddress;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy