Class TaxDelegateProperties
java.lang.Object
com.broadleafcommerce.tax.autoconfigure.DiscriminatedProperties<TaxDelegateProperties>
com.broadleafcommerce.tax.delegate.TaxDelegateProperties
@ConfigurationProperties("broadleaf.tax.delegate")
public class TaxDelegateProperties
extends DiscriminatedProperties<TaxDelegateProperties>
Properties to support the
TaxDelegate
configuration, especially the
DefaultTaxDelegate
.- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFallbackTaxProviderId
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) The fallback tax provider for the givenContextInfo
.getPreferredTaxProviderId
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) The preferred tax provider for the givenContextInfo
.void
setFallbackTaxProviderId
(String fallbackTaxProviderId) If the preferred tax provider fails for any reason, a fallback may be used instead.void
setPreferredTaxProviderId
(String preferredTaxProviderId) The preferred tax provider.Methods inherited from class com.broadleafcommerce.tax.autoconfigure.DiscriminatedProperties
getApplication, getField, getField, getTenant, setApplication, setTenant
-
Constructor Details
-
TaxDelegateProperties
public TaxDelegateProperties()
-
-
Method Details
-
getPreferredTaxProviderId
public String getPreferredTaxProviderId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) The preferred tax provider for the givenContextInfo
.- Parameters:
contextInfo
-- Returns:
- See Also:
-
getFallbackTaxProviderId
public String getFallbackTaxProviderId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) The fallback tax provider for the givenContextInfo
. If configured, this will inform theTaxDelegate
that a fallback should be used in case of an error resulting from the default. This If this is the same as the default, the fallback will not be executed.- Parameters:
contextInfo
-- See Also:
-
setPreferredTaxProviderId
The preferred tax provider.- See Also:
-
setFallbackTaxProviderId
If the preferred tax provider fails for any reason, a fallback may be used instead.- See Also:
-