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 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 given OrderFulfillmentItems based on the amount getter and setter.
    void
    performRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
    Rounds any partial amounts split between the given OrderFulfillments.
  • Method Details

    • performRounding

      void performRounding(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
      Rounds any partial amounts split between the given OrderFulfillments.
      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 given OrderFulfillmentItems based on the amount getter and setter.
      Parameters:
      orderFulfillmentItems - the OrderFulfillmentItems to round
      getter - the getter for the MonetaryAmount field to round
      setter - the setter for the MonetaryAmount field to round
      originalTotal - the original total