com.truelayer.java.paymentsproviders.PaymentsProvidersHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truelayer-java Show documentation
Show all versions of truelayer-java Show documentation
TrueLayer Java SDK for https://truelayer.com
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);
}
}