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

com.unzer.payment.Recurring Maven / Gradle / Ivy

package com.unzer.payment;

public class Recurring extends BaseTransaction {
    private final static String TYPE_ID_TOKEN = "";

    @Override
    public String getUrl() {
        String partialResult = getPaymentId() == null
                ? getTransactionUrl().replaceAll(PAYMENT_ID_TOKEN + "/", "")
                : getTransactionUrl().replaceAll(PAYMENT_ID_TOKEN, getPaymentId());

        partialResult = getTypeId() == null
                ? partialResult.replaceAll(TYPE_ID_TOKEN + "/", "")
                : partialResult.replaceAll(TYPE_ID_TOKEN, getTypeId());

        return partialResult
                .replaceAll(TRANSACTION_ID_TOKEN, getId() == null ? "" : getId());
    }

    @Override
    protected String getTransactionUrl() {
        return "/v1/types//recurring";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy