Class AccountancyOrderEventListener
java.lang.Object
org.salespointframework.accountancy.AccountancyOrderEventListener
@Component public class AccountancyOrderEventListener extends Object
An
ApplicationListener
for OrderEvents.OrderCompleted
events to create ProductPaymentEntry
for the
Order
.- Author:
- Oliver Gierke
-
Constructor Summary
Constructors Constructor Description AccountancyOrderEventListener(@NonNull Accountancy accountancy)
-
Method Summary
Modifier and Type Method Description void
on(OrderEvents.OrderCanceled event)
Creates a counterProductPaymentEntry
for the order that is cancelled if there's a revenue entry for the given order already, i.e. the order has been paid before.void
on(OrderEvents.OrderPaid event)
Creates a new revenueProductPaymentEntry
for the order that has been paid.
-
Constructor Details
-
Method Details
-
on
Creates a new revenueProductPaymentEntry
for the order that has been paid.- Parameters:
event
- must not be null.
-
on
Creates a counterProductPaymentEntry
for the order that is cancelled if there's a revenue entry for the given order already, i.e. the order has been paid before.- Parameters:
event
- must not be null.- Since:
- 7.1
-