Class TaxDetailRoundingPayload
java.lang.Object
com.broadleafcommerce.orderoperation.service.split.TaxDetailRoundingPayload
Class representing information for rounding of
tax details
across several split fulfillments. Usage:
- Instantiate and initialize using
init(List, SplitRoundingHelper)
- Call
performRoundingAndSetValues()
- Author:
- cschneider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected javax.money.CurrencyUnit
The currency for the fulfillments.protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
The fulfillments whose tax details are being rounded.protected SplitRoundingHelper
The rounding helper.protected javax.money.MonetaryAmount
getTaxCalculatedOrZero
(com.broadleafcommerce.order.client.domain.OrderFulfillmentItemTaxDetail taxDetail) void
init
(@NonNull List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments, SplitRoundingHelper roundingHelper) Initializes this tax rounding payloadvoid
Performs tax detail rounding and sets the appropriate values on the order fulfillments.
-
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
The fulfillments whose tax details are being rounded. -
getRoundingHelper
The rounding helper.
-