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 TypeMethodDescriptionvoidperformIndividualItemRounding(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 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 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
-