|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.integrations.cybersource.CyberSourceTax
public class CyberSourceTax
This class manages the communications to a CyberSource tax system
Field Summary | |
---|---|
static java.lang.String |
AcceptanceCity
|
static java.lang.String |
AcceptanceCountry
|
static java.lang.String |
AcceptanceState
|
static java.lang.String |
AcceptanceZip
|
static java.lang.String |
CLASS_VERSION
|
CyberSourceConnection |
mCsCon
CyberSourceConnection module that contains the merchant related data |
java.lang.String |
mNoNexus
No Nexus field specifies states/provinces excluded from tax responsibilities (the list is delimited by comma: NY,NJ,MA) |
protected java.lang.String |
mOriginCity
|
protected java.lang.String |
mOriginCountry
|
protected java.lang.String |
mOriginState
|
protected java.lang.String |
mOriginZip
|
protected java.lang.String |
mSellerRegistrationNumber
|
protected java.lang.String |
mShipFromCity
|
protected java.lang.String |
mShipFromCountry
|
protected java.lang.String |
mShipFromState
|
protected java.lang.String |
mShipFromZip
|
boolean |
mUseProductCode
This property defines a pre-taxableItem request rather than a pre-shipping group request |
static java.lang.String |
NoNexus
|
static java.lang.String |
SellerRegistration
|
static java.lang.String |
ShipFromCity
|
static java.lang.String |
ShipFromCountry
|
static java.lang.String |
ShipFromState
|
static java.lang.String |
ShipFromZip
|
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 | |
---|---|
CyberSourceTax()
Default constructor |
Method Summary | |
---|---|
void |
assignTaxProductCode(TaxableItem pItem,
com.cybersource.ics.client.message.ICSClientOffer pOffer)
This method may be overidden by a subclass to set the product code for each offer. |
TaxStatus |
calculate(TaxRequestInfo ccinfo,
int i)
|
TaxStatus |
calculateAllTax(TaxStatus[] taxstatus)
|
TaxStatus |
calculateTax(TaxRequestInfo ccinfo)
Calculate tax on the information specified in TaxRequestInfo |
TaxStatus[] |
calculateTaxByShipping(TaxRequestInfo ccinfo)
Calculate tax on the information specified in TaxRequestInfo. |
void |
doStartService()
Initialize the service |
CyberSourceConnection |
getCsCon()
|
java.lang.String |
getNoNexus()
|
java.lang.String |
getOriginCity()
Get OriginCity used for tax calculations. |
java.lang.String |
getOriginCountry()
Get OriginCountry used for tax calculations. |
java.lang.String |
getOriginState()
Get OriginState used for tax calculations. |
java.lang.String |
getOriginZip()
Get OriginZip used for tax calculations. |
java.lang.String |
getSellerRegistrationNumber()
|
java.lang.String |
getShipFromCity()
Get ShipFromCity used for tax calculations. |
java.lang.String |
getShipFromCountry()
Get ShipFromCountry used for tax calculations. |
java.lang.String |
getShipFromState()
Get ShipFromState used for tax calculations. |
java.lang.String |
getShipFromZip()
Get ShipFromZip/PostalCode used for tax calculations. |
boolean |
getUseProductCode()
|
static void |
main(java.lang.String[] args)
Run some simple tests |
TaxStatus[] |
performTax(TaxRequestInfo ccinfo)
Makes a call to cybersource for each shipping destination |
void |
setCsCon(CyberSourceConnection pCsCon)
|
void |
setNoNexus(java.lang.String pNoNexus)
|
void |
setOriginCity(java.lang.String pOriginCity)
Set OriginCity used for tax calculations. |
void |
setOriginCountry(java.lang.String pOriginCountry)
Set 2 character OriginCountry used for tax calculations. |
void |
setOriginState(java.lang.String pOriginState)
Set OriginState/Province used for tax calculations. |
void |
setOriginZip(java.lang.String pOriginZip)
Set OriginZip/PostalCode used for tax calculations. |
void |
setSellerRegistrationNumber(java.lang.String pSellerRegistrationNumber)
|
void |
setShipFromCity(java.lang.String pShipFromCity)
Set ShipFromCity used for tax calculations. |
void |
setShipFromCountry(java.lang.String pShipFromCountry)
Set ShipFromCountry used for tax calculations. |
void |
setShipFromState(java.lang.String pShipFromState)
Set ShipFromState/Province used for tax calculations. |
void |
setShipFromZip(java.lang.String pShipFromZip)
Set ShipFromZip/PostalCode used for tax calculations. |
void |
setUseProductCode(boolean pUseProductCode)
|
boolean |
TaxProductCodeSetting(TaxableItem pItem)
This function simply checks the taxStatus property in the taxableItem |
java.lang.String |
toString()
|
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, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
public static final java.lang.String NoNexus
public static final java.lang.String SellerRegistration
public static final java.lang.String ShipFromCity
public static final java.lang.String ShipFromState
public static final java.lang.String ShipFromZip
public static final java.lang.String ShipFromCountry
public static final java.lang.String AcceptanceCity
public static final java.lang.String AcceptanceState
public static final java.lang.String AcceptanceZip
public static final java.lang.String AcceptanceCountry
protected java.lang.String mShipFromCountry
protected java.lang.String mShipFromCity
protected java.lang.String mShipFromState
protected java.lang.String mShipFromZip
protected java.lang.String mOriginCountry
protected java.lang.String mOriginCity
protected java.lang.String mOriginState
protected java.lang.String mOriginZip
protected java.lang.String mSellerRegistrationNumber
public CyberSourceConnection mCsCon
public java.lang.String mNoNexus
public boolean mUseProductCode
Constructor Detail |
---|
public CyberSourceTax()
Method Detail |
---|
public void setShipFromCountry(java.lang.String pShipFromCountry)
public java.lang.String getShipFromCountry()
public void setShipFromCity(java.lang.String pShipFromCity)
public java.lang.String getShipFromCity()
public void setShipFromState(java.lang.String pShipFromState)
public java.lang.String getShipFromState()
public void setShipFromZip(java.lang.String pShipFromZip)
public java.lang.String getShipFromZip()
public void setOriginCountry(java.lang.String pOriginCountry)
public java.lang.String getOriginCountry()
public void setOriginCity(java.lang.String pOriginCity)
public java.lang.String getOriginCity()
public void setOriginState(java.lang.String pOriginState)
public java.lang.String getOriginState()
public void setOriginZip(java.lang.String pOriginZip)
public java.lang.String getOriginZip()
public void setSellerRegistrationNumber(java.lang.String pSellerRegistrationNumber)
public java.lang.String getSellerRegistrationNumber()
public void setCsCon(CyberSourceConnection pCsCon)
public CyberSourceConnection getCsCon()
public void setNoNexus(java.lang.String pNoNexus)
public java.lang.String getNoNexus()
public void setUseProductCode(boolean pUseProductCode)
public boolean getUseProductCode()
public TaxStatus calculateTax(TaxRequestInfo ccinfo)
TaxProcessor
calculateTax
in interface TaxProcessor
ccinfo
- the TaxInfo reference which contains all the tax calculation data
public TaxStatus[] calculateTaxByShipping(TaxRequestInfo ccinfo)
TaxProcessor
calculateTaxByShipping
in interface TaxProcessor
ccinfo
- the TaxInfo reference which contains all the tax calculation data
public TaxStatus[] performTax(TaxRequestInfo ccinfo) throws com.cybersource.ics.base.exception.ICSException
com.cybersource.ics.base.exception.ICSException
public TaxStatus calculateAllTax(TaxStatus[] taxstatus)
public TaxStatus calculate(TaxRequestInfo ccinfo, int i) throws com.cybersource.ics.base.exception.ICSException
com.cybersource.ics.base.exception.ICSException
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic boolean TaxProductCodeSetting(TaxableItem pItem)
pItem
- An object that represents an item or a bunch of items of the same category
TaxableItem
public void assignTaxProductCode(TaxableItem pItem, com.cybersource.ics.client.message.ICSClientOffer pOffer) throws CyberSourceException
pItem
- An object in the destination group that represents an item or
a bunch of items of the same catergorypOffer
- Offer object to set data for the taxable item
CyberSourceException
TaxableItem
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |