class PisCommonPaymentServiceInternal implements PisCommonPaymentService {

    @Override
    public CmsResponse<List<PsuIdData>> getPsuDataListByPaymentId(String paymentId) {
        Optional<List<PsuIdData>> psuDataListOptional = readPisCommonPaymentDataByPaymentId(paymentId)
                                                            .map(pc -> psuDataMapper.mapToPsuIdDataList(pc.getPsuDataList()));

        if (psuDataListOptional.isPresent()) {
            return CmsResponse.<List<PsuIdData>>builder()
                       .payload(psuDataListOptional.get())
                       .build();
        }

        log.info("PaymentId ID: [{}]. Get PSU data list by payment ID failed, because payment is not found", paymentId);
        return CmsResponse.<List<PsuIdData>>builder()
                   .error(LOGICAL_ERROR)
                   .build();
    }

}