use of com.github.drbookings.model.AirbnbEarningsCalculator in project drbookings by DrBookings.
the class BookingEntries method getEarningsAirbnb.
public static float getEarningsAirbnb(final Collection<? extends BookingEntry> bookings, boolean netEarnings, boolean paymentDone) {
final BookingsByOrigin<BookingEntry> bo = new BookingsByOrigin<>(bookings);
AirbnbEarningsCalculator aec = new AirbnbEarningsCalculator().filterForNetEarnings(netEarnings).filterForPaymentDone(paymentDone);
return aec.calculateEarnings(BookingEntries.toBookings(bo.getAirbnbBookings()));
}
Aggregations