class Xs2aToSpiPaymentInfoMapper {

    public SpiPaymentInfo mapToSpiPaymentInfo(CommonPayment commonPayment) {
        SpiPaymentInfo info = new SpiPaymentInfo(commonPayment.getPaymentProduct());
        info.setPaymentId(commonPayment.getPaymentId());
        info.setPaymentType(commonPayment.getPaymentType());
        info.setStatus(commonPayment.getTransactionStatus());
        info.setPaymentData(commonPayment.getPaymentData());
        info.setPsuDataList(xs2aToSpiPsuDataMapper.mapToSpiPsuDataList(commonPayment.getPsuDataList()));
        info.setStatusChangeTimestamp(commonPayment.getStatusChangeTimestamp());
        info.setCreationTimestamp(commonPayment.getCreationTimestamp());
        info.setContentType(commonPayment.getContentType());
        info.setInstanceId(commonPayment.getInstanceId());
        return info;
    }

}