use of com.github.robozonky.app.portfolio.RemoteBalance 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;
}
Aggregations