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

com.truelayer.java.payments.IPaymentsHandler Maven / Gradle / Ivy

There is a newer version: 16.0.0
Show newest version
package com.truelayer.java.payments;

import com.truelayer.java.http.entities.ApiResponse;
import com.truelayer.java.http.entities.Headers;
import com.truelayer.java.payments.entities.*;
import com.truelayer.java.payments.entities.paymentdetail.PaymentDetail;
import com.truelayer.java.payments.entities.paymentrefund.PaymentRefund;
import java.util.concurrent.CompletableFuture;

/**
 * Provides /payments API integration without the burden of Retrofit's annotation
 * and improve both usability and backward compatibility for the implemented endpoints.
 */
public interface IPaymentsHandler {

    CompletableFuture> createPayment(CreatePaymentRequest request);

    CompletableFuture> createPayment(Headers headers, CreatePaymentRequest request);

    CompletableFuture> getPayment(String paymentId);

    CompletableFuture> startAuthorizationFlow(
            String paymentId, StartAuthorizationFlowRequest request);

    CompletableFuture> startAuthorizationFlow(
            Headers headers, String paymentId, StartAuthorizationFlowRequest request);

    CompletableFuture> submitProviderSelection(
            String paymentId, SubmitProviderSelectionRequest request);

    CompletableFuture> submitProviderSelection(
            Headers headers, String paymentId, SubmitProviderSelectionRequest request);

    CompletableFuture> submitConsent(String paymentId);

    CompletableFuture> submitConsent(Headers headers, String paymentId);

    CompletableFuture> submitForm(String paymentId, SubmitFormRequest request);

    CompletableFuture> submitForm(
            Headers headers, String paymentId, SubmitFormRequest request);

    CompletableFuture> createPaymentRefund(
            String paymentId, CreatePaymentRefundRequest request);

    CompletableFuture> createPaymentRefund(
            Headers headers, String paymentId, CreatePaymentRefundRequest request);

    CompletableFuture> listPaymentRefunds(String paymentId);

    CompletableFuture> getPaymentRefundById(String paymentId, String refundId);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy