Class TaxDetailRoundingPayload

java.lang.Object
com.broadleafcommerce.orderoperation.service.split.TaxDetailRoundingPayload

public class TaxDetailRoundingPayload extends Object
Class representing information for rounding of tax details across several split fulfillments. Usage:
  1. Instantiate and initialize using init(List, SplitRoundingHelper)
  2. Call performRoundingAndSetValues()
Author:
cschneider
  • Constructor Details

    • TaxDetailRoundingPayload

      public TaxDetailRoundingPayload()
  • Method Details

    • init

      public void init(@NonNull @NonNull @NonNull List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments, SplitRoundingHelper roundingHelper)
      Initializes this tax rounding payload
      Parameters:
      fulfillments - A non-empty list of fulfillments.
      roundingHelper -
    • performRoundingAndSetValues

      public void performRoundingAndSetValues()
      Performs tax detail rounding and sets the appropriate values on the order fulfillments. Rounding is complete after this step.
    • getTaxCalculatedOrZero

      protected javax.money.MonetaryAmount getTaxCalculatedOrZero(@Nullable com.broadleafcommerce.order.client.domain.OrderFulfillmentItemTaxDetail taxDetail)
    • getCurrency

      protected javax.money.CurrencyUnit getCurrency()
      The currency for the fulfillments.
    • getFulfillments

      protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments()
      The fulfillments whose tax details are being rounded.
    • getRoundingHelper

      protected SplitRoundingHelper getRoundingHelper()
      The rounding helper.