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

com.truelayer.java.paymentsproviders.PaymentsProvidersHandler Maven / Gradle / Ivy

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

import static com.truelayer.java.Constants.Scopes.PAYMENTS;

import com.truelayer.java.IAuthenticatedHandler;
import com.truelayer.java.entities.RequestScopes;
import com.truelayer.java.http.entities.ApiResponse;
import com.truelayer.java.paymentsproviders.entities.PaymentsProvider;
import java.util.concurrent.CompletableFuture;
import lombok.Builder;

/**
 * {@inheritDoc}
 */
@Builder
public class PaymentsProvidersHandler implements IAuthenticatedHandler, IPaymentsProvidersHandler {

    IPaymentsProvidersApi paymentsProvidersApi;

    @Builder.Default
    private RequestScopes scopes = RequestScopes.builder().scope(PAYMENTS).build();

    @Override
    public RequestScopes getRequestScopes() {
        return scopes;
    }

    @Override
    public CompletableFuture> getProvider(String providerId) {
        return paymentsProvidersApi.getProvider(getRequestScopes(), providerId);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy