Interface FulfillmentSplitRoundingService
-
- All Known Implementing Classes:
DefaultFulfillmentSplitRoundingService
public interface FulfillmentSplitRoundingService
Responsible for correctly roundingMonetaryAmounts
which were split between multipleOrderFulfillments
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 givenOrderFulfillmentItems
based on the amount getter and setter.void
performRounding(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 givenOrderFulfillmentItems
based on the amount getter and setter.- Parameters:
orderFulfillmentItems
- theOrderFulfillmentItems
to roundgetter
- the getter for theMonetaryAmount
field to roundsetter
- the setter for theMonetaryAmount
field to roundoriginalTotal
- the original total
-
-