Search in sources :

Example 1 with Repayments

use of com.github.robozonky.app.portfolio.Repayments in project robozonky by RoboZonky.

the class PortfolioUpdater method create.

public static PortfolioUpdater create(final Consumer<Throwable> shutdownCall, final Authenticated auth, final StrategyProvider sp, final boolean isDryRun) {
    final RemoteBalance balance = RemoteBalance.create(auth, isDryRun);
    final PortfolioUpdater updater = new PortfolioUpdater(shutdownCall, auth, balance);
    // update loans repaid with every portfolio update
    updater.registerDependant(new Repayments());
    // update delinquents automatically with every portfolio update
    updater.registerDependant((p, a) -> Delinquents.update(a, p));
    // attempt to sell participations after every portfolio update
    updater.registerDependant(new Selling(sp::getToSell, isDryRun));
    return updater;
}
Also used : Repayments(com.github.robozonky.app.portfolio.Repayments) Selling(com.github.robozonky.app.portfolio.Selling) RemoteBalance(com.github.robozonky.app.portfolio.RemoteBalance)

Aggregations

RemoteBalance (com.github.robozonky.app.portfolio.RemoteBalance)1 Repayments (com.github.robozonky.app.portfolio.Repayments)1 Selling (com.github.robozonky.app.portfolio.Selling)1