Class DefaultTaxService<F extends com.broadleafcommerce.cart.client.domain.FulfillmentGroup,TREQ extends com.broadleafcommerce.tax.domain.TaxRequest,TRES extends com.broadleafcommerce.tax.domain.TaxResponse,TI extends com.broadleafcommerce.tax.domain.TaxItem>
java.lang.Object
com.broadleafcommerce.cartoperation.service.pricing.DefaultTaxService<F,TREQ,TRES,TI>
- All Implemented Interfaces:
TaxService
@Deprecated
public class DefaultTaxService<F extends com.broadleafcommerce.cart.client.domain.FulfillmentGroup,TREQ extends com.broadleafcommerce.tax.domain.TaxRequest,TRES extends com.broadleafcommerce.tax.domain.TaxResponse,TI extends com.broadleafcommerce.tax.domain.TaxItem>
extends Object
implements TaxService
Deprecated.
The default
TaxService which integrates with TaxProviders. This
service connects to an actualTaxProvider for accurate actual tax amounts and an optional
estimatedTaxProvider for quick estimated tax amounts. Callers of this class can choose to
get taxes for either or both actual and estimated. A typical scenario would be to use a quick
synchronous call for estimated taxes when performing cart operations and then get the actual
taxes through a 3rd party provider once the cart is finalized in checkout and ready for the
customer to review final pricing.- Author:
- Chad Harchar (charchar)
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTaxService(com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> estimatedTaxProvider, com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> actualTaxProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) Deprecated.DefaultTaxService(com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> estimatedTaxProvider, com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> actualTaxProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory, List<TaxAddressSourceHandler> handlers) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFulfillmentItemTaxDetails(@NonNull com.broadleafcommerce.tax.domain.TaxResponse taxResponse, @NonNull com.broadleafcommerce.tax.domain.TaxInfo taxInfo, @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Deprecated.This takes the total from theFulfillmentGroup.getFulfillmentTaxableAmount().protected voidaddFulfillmentItemTaxDetails(@NonNull com.broadleafcommerce.tax.domain.TaxResponse taxResponse, @NonNull com.broadleafcommerce.tax.domain.TaxInfo taxInfo, @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated.AddFulfillmentItemTaxDetailsto the fulfillment item.voidapplyTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, boolean actual, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates and applies taxes to a cart.voidapplyTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates and applies taxes to a cart.protected voidapplyTaxesForGroup(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, F fulfillmentGroup, @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.protected voidapplyTaxesForGroups(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull List<F> fulfillmentGroups, @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates and setsFulfillmentItem.getMerchandiseTotalTax()andFulfillmentGroup.getTotalTax().protected voidapplyTaxesInternal(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Performs the bulk of the tax calculations and application for a givenTaxProvider.protected voidapplyTaxResponse(TRES taxResponse, F fulfillmentGroup, @NonNull javax.money.CurrencyUnit expectedCurrency) Deprecated.In favor ofapplyTaxResponses(List, List, CurrencyUnit)protected voidapplyTaxResponses(@NonNull List<TRES> taxResponses, @NonNull List<F> fulfillmentGroups, @NonNull javax.money.CurrencyUnit expectedCurrency) Deprecated.protected TIbuildTaxItemForFeeItem(@NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem) Deprecated.protected TIbuildTaxItemForLineItem(F fulfillmentGroup, @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated.Since 1.2.buildTaxItemsForFulfillment(F fulfillmentGroup) Deprecated.buildTaxItemsForLineItems(F fulfillmentGroup) Deprecated.Since 1.2.protected Collection<? extends TI>buildTaxItemsForLineItems(F fulfillmentGroup, @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated.protected voidcalculateActualTaxesForCart(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.protected voidcalculateEstimatedTaxesForCart(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.calculateFeeItemsTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates the taxes for the fee items.protected voidcalculateIncludedTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull javax.money.CurrencyUnit expectedCurrency, @NonNull List<TRES> taxResponse) Deprecated.Set VAT properties onCartPricing.booleancanCalculateTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Whether the cart contains the information required to calculate taxes.protected TaxAddressSourceHandlerfindTaxAddressSourceHandler(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, F fulfillmentGroup, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.protected booleanfulfillmentGroupHasSufficientAddress(F fg, @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determines if the givenFulfillmentGrouphas sufficient address to calculate taxes.Deprecated.protected Optional<TaxAddressSourceHandler>getAddressSourceForFeeTaxCalculation(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, F fulfillmentGroup, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsDeprecated.protected CustomerProviderDeprecated.Deprecated.getFulfillmentGroupForCOD(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated.getFulfillmentGroups(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated.protected <T> TgetInstance(Class<?> clazz) Deprecated.protected StringgetProductDescription(@NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem) Deprecated.Retrieves the description of the product represented by theCartItem.protected List<TaxAddressSourceHandler>Deprecated.protected javax.money.MonetaryAmountgetTaxesForFeeItems(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Instead of calculating the total taxes for fee items separately, calculate incalculateFeeItemsTaxes(Cart, TaxProvider, ContextInfo)and process all thetax responsestogether.protected StringgetTaxId(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.protected StringgetTaxItemIdForFulfillment(F fulfillmentGroup) Deprecated.Extension point to modify theTaxItem.getItemId()for fulfillment tax items.protected StringgetTaxItemIdForLineItem(F fulfillmentGroup, @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated.getTaxProvider(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determine which tax provider to use for calculating taxes for the cartprotected TREQgetTaxRequest(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, F fulfillmentGroup, @NonNull TaxAddressSourceHandler handler, @NonNull List<TI> taxItems, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.getTaxResponseMap(@NonNull List<TRES> taxResponses) Deprecated.Returns a map of tax responses, with the key as theTaxResponse.getFulfillmentGroupReferenceNumber()protected com.broadleafcommerce.common.extension.TypeFactoryDeprecated.protected booleanisCODSelected(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Deprecated.protected booleanisEstimatedProvider(@NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determine if the given provider calculates estimated taxes or actual taxes.protected voidsetAllTaxToZero(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated.voidsetAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) Deprecated.voidsetCustomerProvider(CustomerProvider customerProvider) Deprecated.protected booleanshouldCalculateItemTaxes(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated.protected booleanshouldTaxFulfillment(F fulfillmentGroup, @NonNull javax.money.CurrencyUnit currencyUnit) Deprecated.
-
Field Details
-
COD_REFERENCE_NUMBER
Deprecated.The reference number used for COD Fee Items'tax request.- See Also:
-
DEFAULT_FULFILLMENT_TAX_NAME
Deprecated.Default name for theTaxDetailfor taxes associated with fulfillment, shipping, and handling.- See Also:
-
-
Constructor Details
-
DefaultTaxService
public DefaultTaxService(@Nullable com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> estimatedTaxProvider, com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> actualTaxProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory, List<TaxAddressSourceHandler> handlers) Deprecated. -
DefaultTaxService
public DefaultTaxService(com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> estimatedTaxProvider, com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> actualTaxProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) Deprecated.
-
-
Method Details
-
setAuthenticationUtils
@Autowired public void setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) Deprecated. -
setCustomerProvider
Deprecated. -
canCalculateTaxes
public boolean canCalculateTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Description copied from interface:TaxServiceWhether the cart contains the information required to calculate taxes.- Specified by:
canCalculateTaxesin interfaceTaxService- Parameters:
cart- The cart to determine whether taxes can be calculated for.contextInfo- Additional sandbox and tenant info- Returns:
- Whether the cart contains the information required to calculate taxes.
-
fulfillmentGroupHasSufficientAddress
protected boolean fulfillmentGroupHasSufficientAddress(@NonNull F fg, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determines if the givenFulfillmentGrouphas sufficient address to calculate taxes.By default, for an address to be sufficient, it must have
TaxAddress.getCountry()andTaxAddress.getStateProvinceRegion()at the very least.For different address requirements, customization should be added here
- Parameters:
fg- theFulfillmentGroupto check the address forcart- theCartthat theFulfillmentGroupbelongs tocontextInfo- the contextInfo for this request- Returns:
- true if the given
FulfillmentGrouphas sufficient address to calculate taxes, otherwise false
-
applyTaxes
public void applyTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Description copied from interface:TaxServiceCalculates and applies taxes to a cart.- Specified by:
applyTaxesin interfaceTaxService- Parameters:
cart- The cart to apply taxes against.estimated- Hint indicating whether to try to provide only an estimate, possibly for better performancecontextInfo- (Optional) Additional sandbox, tenant, and application info
-
applyTaxes
public void applyTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, boolean actual, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Description copied from interface:TaxServiceCalculates and applies taxes to a cart.- Specified by:
applyTaxesin interfaceTaxService- Parameters:
cart- The cart to apply taxes against.estimated- Whether to provide an estimateactual- Whether to provide the actualcontextInfo- (Optional) Additional sandbox, tenant, and application info- See Also:
-
calculateActualTaxesForCart
protected void calculateActualTaxesForCart(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
calculateEstimatedTaxesForCart
protected void calculateEstimatedTaxesForCart(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
applyTaxesInternal
protected void applyTaxesInternal(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Performs the bulk of the tax calculations and application for a givenTaxProvider.- Parameters:
cart- Cart to be taxedtaxProvider- TheTaxProviderto facilitate tax calculations
-
getTaxesForFeeItems
@Deprecated(forRemoval=true) protected javax.money.MonetaryAmount getTaxesForFeeItems(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Instead of calculating the total taxes for fee items separately, calculate incalculateFeeItemsTaxes(Cart, TaxProvider, ContextInfo)and process all thetax responsestogether. -
buildTaxItemForFeeItem
protected TI buildTaxItemForFeeItem(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem) Deprecated. -
getFulfillmentGroupForCOD
protected Optional<F> getFulfillmentGroupForCOD(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated. -
isCODSelected
protected boolean isCODSelected(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Deprecated. -
getAddressSourceForFeeTaxCalculation
protected Optional<TaxAddressSourceHandler> getAddressSourceForFeeTaxCalculation(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull F fulfillmentGroup, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
applyTaxesForGroups
protected void applyTaxesForGroups(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull List<F> fulfillmentGroups, @NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates and setsFulfillmentItem.getMerchandiseTotalTax()andFulfillmentGroup.getTotalTax().- Parameters:
cart- The cart with items to be taxedfulfillmentGroups- The group to be taxed with items to be taxedtaxProvider- TheTaxProviderthat calculates the tax
-
calculateFeeItemsTaxes
protected List<TRES> calculateFeeItemsTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates the taxes for the fee items.- Parameters:
cart- The cart with items to be taxedtaxProvider- TheTaxProviderthat calculates the taxcontextInfo- Context information around sandbox and multitenant state- Returns:
- the
tax responsesfor the fee items
-
getTaxId
@Nullable protected String getTaxId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
calculateIncludedTaxes
protected void calculateIncludedTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull javax.money.CurrencyUnit expectedCurrency, @NonNull @NonNull List<TRES> taxResponse) Deprecated.Set VAT properties onCartPricing. Determine how much of the total tax amount is included in the subtotal.- Parameters:
cart- Cart to be taxedexpectedCurrency- The currency to usetaxResponse- TheTaxResponseresponse containing calculated taxes.
-
buildTaxItemsForLineItems
protected Collection<? extends TI> buildTaxItemsForLineItems(@NonNull F fulfillmentGroup, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated. -
getProductDescription
protected String getProductDescription(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem) Deprecated.Retrieves the description of the product represented by theCartItem.- Parameters:
cartItem- theCartItem- Returns:
- The description of the product that was added to the cart.
-
getTaxRequest
protected TREQ getTaxRequest(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull F fulfillmentGroup, @NonNull @NonNull TaxAddressSourceHandler handler, @NonNull @NonNull List<TI> taxItems, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
applyTaxResponses
protected void applyTaxResponses(@NonNull @NonNull List<TRES> taxResponses, @NonNull @NonNull List<F> fulfillmentGroups, @NonNull @NonNull javax.money.CurrencyUnit expectedCurrency) Deprecated. -
addFulfillmentItemTaxDetails
protected void addFulfillmentItemTaxDetails(@NonNull @NonNull com.broadleafcommerce.tax.domain.TaxResponse taxResponse, @NonNull @NonNull com.broadleafcommerce.tax.domain.TaxInfo taxInfo, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) Deprecated.This takes the total from theFulfillmentGroup.getFulfillmentTaxableAmount(). That should have generated aTaxInfo. We createFulfillmentItemTaxDetailsfor each item, prorated based on merchandise value of each item, with the remainder arbitrarily going to the last item. The assumption is thatTaxInfo.getTaxCalculated()is exactly equal to the sum of allTaxDetail.getTaxCalculated(). This also assumes thatTaxInfo.getTaxableAmount()is exactly equal to the sum of allTaxDetail.getTaxableAmount(). By default, no rounding is performed in this method.- Parameters:
taxResponse-taxInfo-fulfillmentGroup-
-
addFulfillmentItemTaxDetails
protected void addFulfillmentItemTaxDetails(@NonNull @NonNull com.broadleafcommerce.tax.domain.TaxResponse taxResponse, @NonNull @NonNull com.broadleafcommerce.tax.domain.TaxInfo taxInfo, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated.AddFulfillmentItemTaxDetailsto the fulfillment item.- Parameters:
taxResponse- The tax responsetaxInfo- The tax infofulfillmentItem- The fulfillment item
-
getTaxResponseMap
Deprecated.Returns a map of tax responses, with the key as theTaxResponse.getFulfillmentGroupReferenceNumber()- Parameters:
taxResponses- A list of tax responses- Returns:
- A map of tax responses.
-
applyTaxesForGroup
@Deprecated protected void applyTaxesForGroup(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull F fulfillmentGroup, @NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Calculates and setsFulfillmentItem.getMerchandiseTotalTax()andFulfillmentGroup.getTotalTax().- Parameters:
cart- The cart with items to be taxedfulfillmentGroup- The group to be taxed with items to be taxedtaxProvider- TheTaxProviderthat facilitates calculating the tax
-
getTaxItemIdForLineItem
protected String getTaxItemIdForLineItem(@NonNull F fulfillmentGroup, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated. -
buildTaxItemForLineItem
@Deprecated protected TI buildTaxItemForLineItem(@NonNull F fulfillmentGroup, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) Deprecated.Since 1.2. UsebuildTaxItemsForLineItems(FulfillmentGroup, Cart)- Parameters:
fulfillmentGroup-fulfillmentItem-- Returns:
-
buildTaxItemsForFulfillment
Deprecated. -
getTaxItemIdForFulfillment
Deprecated.Extension point to modify theTaxItem.getItemId()for fulfillment tax items. For someTaxProviders, there may be a affix likeFR(for freight) to add to theFulfillmentGroup.getReferenceNumber().- Parameters:
fulfillmentGroup- Fulfillment group from which to derive an id- Returns:
TaxItem.getItemId()for fulfillment tax items
-
applyTaxResponse
@Deprecated protected void applyTaxResponse(@NonNull TRES taxResponse, @NonNull F fulfillmentGroup, @NonNull @NonNull javax.money.CurrencyUnit expectedCurrency) Deprecated.In favor ofapplyTaxResponses(List, List, CurrencyUnit)Takes theTaxResponseand applies the results to theFulfillmentGroupand its items.- Parameters:
taxResponse- Tax response to applyfulfillmentGroup- Group to which to apply the response
-
setAllTaxToZero
protected void setAllTaxToZero(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated. -
shouldCalculateItemTaxes
protected boolean shouldCalculateItemTaxes(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated. -
buildTaxItemsForLineItems
Deprecated.Since 1.2. UsebuildTaxItemsForLineItems(FulfillmentGroup, Cart)- Parameters:
fulfillmentGroup-- Returns:
-
shouldTaxFulfillment
protected boolean shouldTaxFulfillment(@NonNull F fulfillmentGroup, @NonNull @NonNull javax.money.CurrencyUnit currencyUnit) Deprecated. -
findTaxAddressSourceHandler
@Nullable protected TaxAddressSourceHandler findTaxAddressSourceHandler(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull F fulfillmentGroup, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated. -
getInstance
Deprecated. -
getFulfillmentGroups
protected List<F> getFulfillmentGroups(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart) Deprecated. -
getTaxProvider
@Nullable protected com.broadleafcommerce.tax.TaxProvider<TREQ,TRES> getTaxProvider(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean estimated, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determine which tax provider to use for calculating taxes for the cart- Parameters:
cart- The cart to be taxed.estimated- Whether the calculated tax is an estimate.contextInfo- Context information around sandbox and multitenant state.- Returns:
- A
TaxProviderthat can be used to calculate taxes for the cart.
-
isEstimatedProvider
protected boolean isEstimatedProvider(@NonNull @NonNull com.broadleafcommerce.tax.TaxProvider<TREQ, TRES> taxProvider, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated.Determine if the given provider calculates estimated taxes or actual taxes.- Parameters:
taxProvider- TheTaxProviderused to calculate taxes for the cart.cart- The cart to be taxed.contextInfo- Context information around sandbox and multitenant state.- Returns:
- True if the given
TaxProvidercalculates estimated taxes.
-
getEstimatedTaxProvider
Deprecated. -
getActualTaxProvider
Deprecated. -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()Deprecated. -
getTaxAddressSourceHandlers
Deprecated. -
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()Deprecated. -
getCustomerProvider
Deprecated.
-
applyTaxesForGroups(Cart, List, TaxProvider, ContextInfo)