Search in sources :

Example 26 with PortfolioOverview

use of com.github.robozonky.api.strategies.PortfolioOverview in project robozonky by RoboZonky.

the class AbstractEmailingListener method getData.

protected Map<String, Object> getData(final T event) {
    final Map<String, Object> result = new UnifiedMap<>(getBaseData(event));
    if (event instanceof Financial) {
        final PortfolioOverview portfolioOverview = ((Financial) event).getPortfolioOverview();
        result.put("portfolio", Util.summarizePortfolioStructure(portfolioOverview));
    }
    return result;
}
Also used : UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) Financial(com.github.robozonky.api.notifications.Financial) PortfolioOverview(com.github.robozonky.api.strategies.PortfolioOverview)

Aggregations

PortfolioOverview (com.github.robozonky.api.strategies.PortfolioOverview)26 Test (org.junit.jupiter.api.Test)18 Investment (com.github.robozonky.api.remote.entities.sanitized.Investment)11 Restrictions (com.github.robozonky.api.remote.entities.Restrictions)10 Loan (com.github.robozonky.api.remote.entities.sanitized.Loan)9 Collection (java.util.Collection)8 Collections (java.util.Collections)8 LoanDescriptor (com.github.robozonky.api.strategies.LoanDescriptor)7 RecommendedLoan (com.github.robozonky.api.strategies.RecommendedLoan)7 Defaults (com.github.robozonky.internal.api.Defaults)7 Assertions (org.assertj.core.api.Assertions)6 SoftAssertions (org.assertj.core.api.SoftAssertions)6 Mockito (org.mockito.Mockito)6 LoanRepaidEvent (com.github.robozonky.api.notifications.LoanRepaidEvent)5 PaymentStatus (com.github.robozonky.api.remote.enums.PaymentStatus)5 InvestmentStrategy (com.github.robozonky.api.strategies.InvestmentStrategy)5 PurchaseStrategy (com.github.robozonky.api.strategies.PurchaseStrategy)5 RecommendedParticipation (com.github.robozonky.api.strategies.RecommendedParticipation)5 Instant (java.time.Instant)5 LocalDate (java.time.LocalDate)5