Class TaxDetailRoundingPayload
- java.lang.Object
-
- com.broadleafcommerce.orderoperation.service.split.TaxDetailRoundingPayload
-
public class TaxDetailRoundingPayload extends Object
Class representing information for rounding oftax details
across several split fulfillments. Usage:- Instantiate and initialize using
init(List, SplitRoundingHelper)
- Call
performRoundingAndSetValues()
- Author:
- cschneider
- Instantiate and initialize using
-
-
Constructor Summary
Constructors Constructor Description TaxDetailRoundingPayload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.money.CurrencyUnit
getCurrency()
The currency for the fulfillments.protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
getFulfillments()
The fulfillments whose tax details are being rounded.protected SplitRoundingHelper
getRoundingHelper()
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
performRoundingAndSetValues()
Performs tax detail rounding and sets the appropriate values on the order fulfillments.
-
-
-
Method Detail
-
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.
-
-