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

com.truelayer.java.commonapi.CommonHandler Maven / Gradle / Ivy

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

import static com.truelayer.java.http.mappers.HeadersMapper.toMap;
import static java.util.Collections.emptyMap;

import com.truelayer.java.commonapi.entities.SubmitPaymentsProviderReturnRequest;
import com.truelayer.java.commonapi.entities.SubmitPaymentsProviderReturnResponse;
import com.truelayer.java.http.entities.ApiResponse;
import com.truelayer.java.http.entities.Headers;
import java.util.concurrent.CompletableFuture;
import lombok.Value;

@Value
public class CommonHandler implements ICommonHandler {

    ICommonApi commonApi;

    @Override
    public CompletableFuture> submitPaymentReturnParameters(
            SubmitPaymentsProviderReturnRequest request) {
        return commonApi.submitPaymentReturnParameters(emptyMap(), request);
    }

    @Override
    public CompletableFuture> submitPaymentReturnParameters(
            Headers headers, SubmitPaymentsProviderReturnRequest request) {
        return commonApi.submitPaymentReturnParameters(toMap(headers), request);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy