Interface FulfillmentSplitRoundingService
-
- All Known Implementing Classes:
DefaultFulfillmentSplitRoundingService
public interface FulfillmentSplitRoundingServiceResponsible for correctly roundingMonetaryAmountswhich were split between multipleOrderFulfillments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidperformIndividualItemRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> orderFulfillmentItems, Function<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem,javax.money.MonetaryAmount> getter, BiConsumer<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem,javax.money.MonetaryAmount> setter, javax.money.MonetaryAmount originalTotal)Rounds the amounts of the givenOrderFulfillmentItemsbased on the amount getter and setter.voidperformRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)Rounds any partial amounts split between the givenOrderFulfillments.
-
-
-
Method Detail
-
performRounding
void performRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
Rounds any partial amounts split between the givenOrderFulfillments.- Parameters:
fulfillments- the fulfillments which were split
-
performIndividualItemRounding
void performIndividualItemRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> orderFulfillmentItems, Function<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem,javax.money.MonetaryAmount> getter, BiConsumer<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem,javax.money.MonetaryAmount> setter, javax.money.MonetaryAmount originalTotal)
Rounds the amounts of the givenOrderFulfillmentItemsbased on the amount getter and setter.- Parameters:
orderFulfillmentItems- theOrderFulfillmentItemsto roundgetter- the getter for theMonetaryAmountfield to roundsetter- the setter for theMonetaryAmountfield to roundoriginalTotal- the original total
-
-