|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.integrations.taxware.TaxService
public abstract class TaxService
TaxService provides a simpler interface for creating TaxRequest objects. This class will be subclassed by an actual service (domestic or international) which will provide the impl to the abstract createRequest method and additional properties for making a valid taxware request
TaxRequest
,
SalesTaxCaller
,
TaxResult
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected java.lang.String |
mCompanyId
|
protected boolean |
mFailedToInitialize
|
protected java.util.Set |
mNonFatalCompCodes
|
static atg.payment.Message |
msg
|
protected java.lang.String |
mShipFromCountry
|
static java.lang.String |
Resource_Name
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
TaxService()
|
Method Summary | |
---|---|
TaxResult[] |
calculateSalesTax(TaxRequest[] request)
Actually calculate the sales tax. |
protected abstract TaxRequest |
createRequest(java.lang.String strDstCountry,
java.lang.String strDstCity,
java.lang.String strDstProvince,
java.lang.String strDstZip,
java.lang.String strPOACountry,
java.lang.String strPOACity,
java.lang.String strPOAProvince,
java.lang.String strPOAZip,
java.lang.String strCurrencyCode,
long centsPrice,
long centsDiscountPrice,
long centsFreight,
java.util.Date dateTax)
Create a new TaxRequest, filling in Destination and Point of Acceptance information from our member variables. |
void |
doStartService()
Initialize data structures when service is started. |
void |
doStopService()
Un-initialize data structures when service is stopped. |
java.lang.String |
getCompanyId()
Get CompanyId for whom the taxes will be calculated. |
boolean |
getFailedToInitialize()
Return whether the service failed to initialize |
long[] |
getNonFatalCompletionCodes()
Get the list of non-fatal general completion codes. |
java.lang.String |
getShipFromCountry()
Get ShipFromCountry used for tax calculations. |
void |
setCompanyId(java.lang.String pCompanyId)
Set CompanyId for whom the taxes will be calculated. |
void |
setNonFatalCompletionCodes(long[] pNonFatalCompCodes)
Set the list of non-fatal general completion codes. |
void |
setShipFromCountry(java.lang.String pShipFromCountry)
Set 2 character ShipFromCountry used for tax calculations. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String Resource_Name
public static atg.payment.Message msg
protected boolean mFailedToInitialize
protected java.lang.String mCompanyId
protected java.lang.String mShipFromCountry
protected java.util.Set mNonFatalCompCodes
Constructor Detail |
---|
public TaxService()
Method Detail |
---|
public boolean getFailedToInitialize()
public void setNonFatalCompletionCodes(long[] pNonFatalCompCodes)
public long[] getNonFatalCompletionCodes()
public void setCompanyId(java.lang.String pCompanyId)
public java.lang.String getCompanyId()
public void setShipFromCountry(java.lang.String pShipFromCountry)
public java.lang.String getShipFromCountry()
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- throws if we cannot open TaxWare.protected abstract TaxRequest createRequest(java.lang.String strDstCountry, java.lang.String strDstCity, java.lang.String strDstProvince, java.lang.String strDstZip, java.lang.String strPOACountry, java.lang.String strPOACity, java.lang.String strPOAProvince, java.lang.String strPOAZip, java.lang.String strCurrencyCode, long centsPrice, long centsDiscountPrice, long centsFreight, java.util.Date dateTax)
public TaxResult[] calculateSalesTax(TaxRequest[] request) throws TaxwareMinorException, TaxwareCriticalException
TaxwareCriticalException
- Thrown if installation problem.
TaxwareMinorException
- Thrown on bad data or other problem.public void doStopService() throws ServiceException
doStopService
in class GenericService
ServiceException
- throws if we cannot shutdown TaxWare.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |