Interface FulfillmentSplitRoundingService
- All Known Implementing Classes:
DefaultFulfillmentSplitRoundingService
public interface FulfillmentSplitRoundingService
Responsible for correctly rounding
MonetaryAmounts
which were
split between multiple OrderFulfillments
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
performRounding
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
-