class RemotePaymentInitiationService implements PaymentInitiationService {

    @Override
    public Response<PaymentInitationRequestResponse201> initiatePayment(PaymentService paymentService,
                                                                        PaymentProduct paymentProduct,
                                                                        RequestHeaders requestHeaders,
                                                                        RequestParams requestParams,
                                                                        Object o) {
        ResponseEntity<PaymentInitationRequestResponse201> responseEntity;
        if (o instanceof String) {
            responseEntity = client.initiatePayment(
                paymentService,
                paymentProduct,
                requestParams.toMap(),
                requestHeaders.toMap(),
                (String) o
            );
        } else if (o instanceof PeriodicPaymentInitiationMultipartBody) {
            PeriodicPaymentInitiationMultipartBody body = (PeriodicPaymentInitiationMultipartBody) o;
            responseEntity = client.initiatePayment(
                paymentService,
                paymentProduct,
                requestParams.toMap(),
                requestHeaders.toMap(),
                body
            );
        } else {
            responseEntity = client.initiatePayment(
                paymentService,
                paymentProduct,
                requestParams.toMap(),
                requestHeaders.toMap(),
                objectMapper.valueToTree(o)
            );
        }
        return new Response<>(responseEntity.getStatusCodeValue(),
            responseEntity.getBody(),
            responseHeadersMapper.getHeaders(responseEntity.getHeaders()));
    }

    public  RemotePaymentInitiationService(PaymentInitiationClient paymentInitiationClient);
    public  RemotePaymentInitiationService(PaymentInitiationClient paymentInitiationClient, ObjectMapper objectMapper);

}