public class AddressVerificationTaxProcessorTaxCalculator extends TaxProcessorTaxCalculator
TaxProcessorTaxCalculator
which optionally verifies
the shipping address about to be taxed, the billing address about to be taxed,
or both. In determining whether shipping and billing addresses are valid,
The AddressVerificationTaxProcessorTaxCalculator
tests to see whether there is any
billing/shipping address at all, and then whether any of the required properties
(as defined in requiredBillingAddressProperties
and
requiredShippingAddressProperties
) is null.
An AddressVerificationTaxProcessorTaxCalculator defines the following properties:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
DETAILED_ITEM_PRICE_TAX_PROPERTY
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
AddressVerificationTaxProcessorTaxCalculator() |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateTax(TaxRequestInfo pTRI,
TaxPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Given the input TaxRequestInfo object, modify the input pPriceQuote object
to reflect the current tax.
|
protected void |
calculateTaxByShipping(TaxRequestInfo pTRI,
TaxPriceInfo pPriceQuote,
Order pOrder,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Given the input TaxRequestInfo object, modify the input pPriceQuote object
to reflect the current tax.
|
java.lang.String[] |
getRequiredBillingAddressProperties()
the properties of a billing address which are required to not be null
|
java.lang.String[] |
getRequiredShippingAddressProperties()
the properties of a shipping address which are required to not be null
|
boolean |
getThrowVerificationException()
flag that determines whether this calculator should throw a descriptive exception upon address verification failure.
|
boolean |
isThrowVerificationException()
Test property ThrowVerificationException
|
boolean |
isVerifyBillingAddress()
Test property VerifyBillingAddress
|
boolean |
isVerifyShippingAddress()
Test property VerifyShippingAddress
|
void |
setRequiredBillingAddressProperties(java.lang.String[] pRequiredBillingAddressProperties)
the properties of a billing address which are required to not be null
|
void |
setRequiredShippingAddressProperties(java.lang.String[] pRequiredShippingAddressProperties)
the properties of a shipping address which are required to not be null
|
void |
setThrowVerificationException(boolean pThrowVerificationException)
flag that determines whether this calculator should throw a descriptive exception upon address verification failure.
|
void |
setVerifyBillingAddress(boolean pVerifyBillingAddress)
flag that determines whether this calculator should verify the billing address before asking the taxprocessor to tax it.
|
void |
setVerifyShippingAddress(boolean pVerifyShippingAddress)
flag that determines whether this calculator should verify the shipping address before asking the taxprocessor to tax it.
|
protected boolean |
verifyBillingAddress(TaxRequestInfo pTRI)
verifies that the billing address is not null, and that no
crucial properties of the billing address are null.
|
protected boolean |
verifyShippingAddress(TaxRequestInfo pTRI)
verifies that each shipping address is not null, and that no
crucial properties of any shipping address are null.
|
assignItemTaxAmounts, assignItemTaxAmounts, createTaxableItemForRelationship, createTaxableItemForRelationship, createTaxableItemForRelationshipByAverage, createTaxableItemForRelationshipByAverage, determineShippingAddress, doStartService, getBillingAddressPropertyName, getCalculateTaxByShipping, getOrderManager, getPricingTools, getRelationshipsToAssignTaxTo, getTaxProcessor, getTaxStatusProperty, isVerifyAddresses, priceTax, setBillingAddressPropertyName, setCalculateTaxByShipping, setOrderManager, setPricingTools, setTaxProcessor, setTaxStatusProperty, setVerifyAddresses
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public AddressVerificationTaxProcessorTaxCalculator()
public void setVerifyBillingAddress(boolean pVerifyBillingAddress)
pVerifyBillingAddress
- new value to setpublic boolean isVerifyBillingAddress()
public void setVerifyShippingAddress(boolean pVerifyShippingAddress)
pVerifyShippingAddress
- new value to setpublic boolean isVerifyShippingAddress()
public void setThrowVerificationException(boolean pThrowVerificationException)
pThrowVerificationException
- new value to setpublic boolean getThrowVerificationException()
public boolean isThrowVerificationException()
public void setRequiredBillingAddressProperties(java.lang.String[] pRequiredBillingAddressProperties)
pRequiredBillingAddressProperties
- new value to setpublic java.lang.String[] getRequiredBillingAddressProperties()
public void setRequiredShippingAddressProperties(java.lang.String[] pRequiredShippingAddressProperties)
pRequiredShippingAddressProperties
- new value to setpublic java.lang.String[] getRequiredShippingAddressProperties()
protected void calculateTax(TaxRequestInfo pTRI, TaxPriceInfo pPriceQuote, Order pOrder, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
super.calculateTax()
calculateTax
in class TaxProcessorTaxCalculator
pTRI
- the TaxRequestInfo object which represents a request from a TaxProcessor
for a tax calculation. Required.pPriceQuote
- the TaxPriceInfo to modify to reflect the calculated tax. Required.pOrder
- the order for which tax is being calculated. Optional.pPricingModel
- the pricing model which is modifying the tax total. Optional.
Not used in DCS at this time.pLocale
- the local in which the tax should be calculated. Optional.pProfile
- the person for whom the tax is being calculated. Optional.pExtraParameters
- any extra information needed to calculate tax. Optional.PricingException
- if there was a problem determining the taxprotected void calculateTaxByShipping(TaxRequestInfo pTRI, TaxPriceInfo pPriceQuote, Order pOrder, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
super.calculateTaxByShipping()
calculateTaxByShipping
in class TaxProcessorTaxCalculator
pTRI
- the TaxRequestInfo object which represents a request from a TaxProcessor
for a tax calculation. Required.pPriceQuote
- the TaxPriceInfo to modify to reflect the calculated tax. Required.pOrder
- the order for which tax is being calculated. Optional.pPricingModel
- the pricing model which is modifying the tax total. Optional.
Not used in DCS at this time.pLocale
- the local in which the tax should be calculated. Optional.pProfile
- the person for whom the tax is being calculated. Optional.pExtraParameters
- any extra information needed to calculate tax. Optional.PricingException
protected boolean verifyBillingAddress(TaxRequestInfo pTRI) throws PricingException
pTRI
- the TaxRequestInfo containing the billing address to verifyPricingException
- if there was a problem verifying the billing addressprotected boolean verifyShippingAddress(TaxRequestInfo pTRI) throws PricingException
pTRI
- the TaxRequestInfo containing the shipping address to verifyPricingException
- if there was a problem verifying the shipping address