class TransactionAspectService extends BaseAspectService<AccountController> {

    public ResponseObject<Xs2aTransactionsReport> getTransactionsReportByPeriod(ResponseObject<Xs2aTransactionsReport> result,
                                                                                Xs2aTransactionsReportByPeriodRequest request) {
        if (!result.hasError()) {
            Xs2aTransactionsReport transactionsReport = result.getBody();
            transactionsReport.setLinks(new TransactionsReportDownloadLinks(getHttpUrl(), request.getAccountId(), request.isWithBalance(), transactionsReport.getDownloadId()));
            Xs2aAccountReport accountReport = transactionsReport.getAccountReport();

            if (transactionsReport.getAccountReport() != null) {
                accountReport.setLinks(new TransactionsReportAccountLinks(getHttpUrl(), request.getAccountId(), request.isWithBalance()));
            }

        }
        return result;
    }

    @Autowired public  TransactionAspectService(AspspProfileServiceWrapper aspspProfileServiceWrapper);

}