Search in sources :

Example 1 with AccountReport

use of net.petafuel.styx.core.xs2a.entities.AccountReport in project styx by petafuel.

the class Camt052Converter method processReport.

public TransactionContainer processReport(String xmlData) throws SEPAParsingException {
    BankToCustomerAccountReportV02 originalReport = parseReport(xmlData);
    TransactionContainer transactionContainer = new TransactionContainer();
    transactionContainer.setTransactions(new AccountReport());
    transactionContainer.getTransactions().setBooked(new ArrayList<>());
    transactionContainer.getTransactions().setPending(new ArrayList<>());
    transactionContainer.getTransactions().setInformation(new ArrayList<>());
    for (AccountReport11 generalInfoAndTXNs : originalReport.getRpt()) {
        for (ReportEntry2 transactionInfo : generalInfoAndTXNs.getNtry()) {
            convertTransaction(transactionContainer.getTransactions(), transactionInfo);
        }
    }
    return transactionContainer;
}
Also used : TransactionContainer(net.petafuel.styx.core.xs2a.entities.TransactionContainer) BankToCustomerAccountReportV02(net.petafuel.styx.core.xs2a.utils.sepa.camt052.BankToCustomerAccountReportV02) AccountReport11(net.petafuel.styx.core.xs2a.utils.sepa.camt052.AccountReport11) AccountReport(net.petafuel.styx.core.xs2a.entities.AccountReport) ReportEntry2(net.petafuel.styx.core.xs2a.utils.sepa.camt052.ReportEntry2)

Aggregations

AccountReport (net.petafuel.styx.core.xs2a.entities.AccountReport)1 TransactionContainer (net.petafuel.styx.core.xs2a.entities.TransactionContainer)1 AccountReport11 (net.petafuel.styx.core.xs2a.utils.sepa.camt052.AccountReport11)1 BankToCustomerAccountReportV02 (net.petafuel.styx.core.xs2a.utils.sepa.camt052.BankToCustomerAccountReportV02)1 ReportEntry2 (net.petafuel.styx.core.xs2a.utils.sepa.camt052.ReportEntry2)1