com.ibm.commerce.isv.kit.tax
Interface TaxOrderItemCmd

All Superinterfaces:
TaskCommand

public interface TaxOrderItemCmd
extends TaskCommand

The TaxOrderItemCmd interface provides an external tax calculation application with access to the tax-related data for an order item.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
static java.lang.String NAME
          The name of this command.
 
Method Summary
 java.math.BigDecimal getCost()
          The total cost for this order item.
 java.math.BigDecimal getDiscount()
          The total value of all non-tax-exempt discounts for this line item.
 java.lang.String[] getJurisdictionCodes()
          Obtains all the jurisdiction levels (codes) where the taxes are being calculated.
 java.lang.String getJurstCode(java.lang.String aJurisdictiontype)
          Obtains the jurisdiction level (code) for a given type of jurisdiction level..
 java.lang.String[] getSecondaryJurisdictionCodes()
          Obtains all the secondary jurisdiction levels (secondary codes) where the taxes are being calculated.
 java.lang.String getSecondaryJurstCode(java.lang.String aJurisdictiontype)
          Obtains the secondary jurisdiction level (code) for a given type of secondary jurisdiction level..
 java.math.BigDecimal getSecondaryTax(java.lang.String aJurisdictiontype)
          Obtains the tax calculated for a given type of secondary jurisdiction level..
 java.math.BigDecimal[] getSecondaryTaxAmounts()
          Obtains the tax amounts calculated for each of the given secondary jurisdiction levels returned from the tax calculation modules.
 java.math.BigDecimal getTax(java.lang.String aJurisdictiontype)
          Obtains the tax calculated for a given type of jurisdiction level..
 java.math.BigDecimal[] getTaxAmounts()
          Obtains the tax amounts calculated for each of the given jurisdiction levels returned from the tax calculation modules.
 java.lang.Integer[] getTaxTypes()
          Obtains all the taxing authority or jurisdiction levels where the taxes calculated.
 java.math.BigDecimal getTotalTax()
          Obtains the total tax calculated for this order item for all relevant taxing authorities.
 void setAuditFlag(boolean aFlag)
          Turns on or off the audit (logging) of tax calculations for this order item.
 void setBusinessName(java.lang.String aBusinessName)
          This method provides the name of the particular business location which sells the order item.
 void setBuyerName(java.lang.String aName)
          The name of the purchaser for this item.
 void setCost(java.math.BigDecimal aItemCost)
          The total cost for this order item.
 void setCurrencyCode(java.lang.String aisoCurrency)
          This 3-character ISO currency code identifies the currency in which the transaction is being made.
 void setDiscount(java.math.BigDecimal aItemDiscount)
          The total value of all non-tax-exempt discounts for this line item.
 void setFreight(java.math.BigDecimal aItemFreight)
          The total sbipping charge for this order item.
 void setInvoiceNumber(java.lang.String aInvoiceNo)
          This method provides the ability to attach an identifier to the order item It is not used in the actual tax calculation.
 void setItemCnt(java.lang.Double aItemCnt)
          The number of units of this order item being purchased.
 void setSellerID(java.lang.String aSellerId)
          This method is used to set the seller identification.
 void setSellerRegistrationId(java.lang.String aSellerRegistrationId)
          This method is used to provide a seller registration identifier.
 void setShipFromAddress(java.lang.String aAddress)
          Sets the street address from which the order item will be shipped.
 void setShipFromCity(java.lang.String aCity)
          Sets the city portion of the address from which the order item will be shipped.
 void setShipFromCountry(java.lang.String aCountry)
          Sets the country from which the order item will be shipped.
 void setShipFromState(java.lang.String aState)
          Sets the state portion of the address from which the order item will be shipped.
 void setShipFromTaxGeoCode(java.lang.String aGeoCode)
          Sets the tax jurisdiction code (geoCode) from which the order item will be shipped.
 void setShipFromZip(java.lang.String aZipCode)
          Sets the zip code or postal code of the address from which the order item will be shipped.
 void setShipToAddress(java.lang.String aAddress)
          Sets the street address to which the order item will be shipped.
 void setShipToCity(java.lang.String aCity)
          Sets the city portion of the address to which the order item will be shipped.
 void setShipToCountry(java.lang.String aCountry)
          Sets the country to which the order item will be shipped.
 void setShipToState(java.lang.String aState)
          Sets the state portion of the address to which the order item will be shipped.
 void setShipToTaxGeoCode(java.lang.String aGeoCode)
          Sets the tax jurisdiction code (geoCode) to which the order item will be shipped.
 void setShipToZip(java.lang.String aZipCode)
          Sets the zip code or postal code of the address to which the order item will be shipped.
 void setStoreId(java.lang.Integer aStoreId)
          Sets the id of the input store to be used for determining the tax types.
 void setTaxCode(java.lang.String aTaxCode)
          This method specifies the tax treatment code for this order item.
 void setTransactionType(char aType)           This method is used to tell the tax software the type of transaction.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name of this command.
See Also:
Constant Field Values
Method Detail

getCost

public java.math.BigDecimal getCost()
The total cost for this order item. If the order item is for 4 units at $10 each, then the total cost would be $40.
Returns:
The total price for this line item.

getDiscount

public java.math.BigDecimal getDiscount()
The total value of all non-tax-exempt discounts for this line item.
Returns:
The total value of all discounts.

getJurisdictionCodes

public java.lang.String[] getJurisdictionCodes()
Obtains all the jurisdiction levels (codes) where the taxes are being calculated.
Returns:
The list of jurisdiction codes.

getJurstCode

public java.lang.String getJurstCode(java.lang.String aJurisdictiontype)
Obtains the jurisdiction level (code) for a given type of jurisdiction level..
Parameters:
aJurisdictiontype - the type of jurisdiction level. Accepted types can be "COUNTRY", "TERRITORY", "STATE", "COUNTY", "CITY" and "DISTRICT".
Returns:
The jurisdiction level (code).

getSecondaryJurisdictionCodes

public java.lang.String[] getSecondaryJurisdictionCodes()
Obtains all the secondary jurisdiction levels (secondary codes) where the taxes are being calculated.
Returns:
The list of secondary jurisdiction codes.

getSecondaryJurstCode

public java.lang.String getSecondaryJurstCode(java.lang.String aJurisdictiontype)
Obtains the secondary jurisdiction level (code) for a given type of secondary jurisdiction level..
Parameters:
aJurisdictiontype - the type of jurisdiction level. Accepted types can be "SECONDARYSTATE", "SECONARYCOUNTY", "SECONDARYCITY".
Returns:
The secondary jurisdiction level (code).

getSecondaryTax

public java.math.BigDecimal getSecondaryTax(java.lang.String aJurisdictiontype)
Obtains the tax calculated for a given type of secondary jurisdiction level..
Parameters:
aJurisdictiontype - the type of secondary jurisdiction level. Accepted types can be "SECONDARYSTATE", "SECONARYCOUNTY", "SECONDARYCITY".
Returns:
The amount of tax calculated for the given type of secondary jurisdiction level.

getSecondaryTaxAmounts

public java.math.BigDecimal[] getSecondaryTaxAmounts()
Obtains the tax amounts calculated for each of the given secondary jurisdiction levels returned from the tax calculation modules.
Returns:
The amount of taxes calculated for the list of secondary jurisdiction level types.

getTax

public java.math.BigDecimal getTax(java.lang.String aJurisdictiontype)
Obtains the tax calculated for a given type of jurisdiction level..
Parameters:
aJurisdictiontype - the type of jurisdiction level. Accepted types can be "COUNTRY", "TERRITORY", "STATE", "COUNTY", "CITY" and "DISTRICT".
Returns:
The amount of tax calculated for the given type of jurisdiction level.

getTaxAmounts

public java.math.BigDecimal[] getTaxAmounts()
Obtains the tax amounts calculated for each of the given jurisdiction levels returned from the tax calculation modules.
Returns:
The amount of taxes calculated for the list of jurisdiction level types.

getTaxTypes

public java.lang.Integer[] getTaxTypes()
Obtains all the taxing authority or jurisdiction levels where the taxes calculated.
Returns:
The list of jurisdiction levels.

getTotalTax

public java.math.BigDecimal getTotalTax()
Obtains the total tax calculated for this order item for all relevant taxing authorities.
Returns:
The total tax calculated for this order item.

setAuditFlag

public void setAuditFlag(boolean aFlag)
Turns on or off the audit (logging) of tax calculations for this order item. This is usually turned on only for the actual purchase and left off for all other calculations. It is false by default.

setBusinessName

public void setBusinessName(java.lang.String aBusinessName)
This method provides the name of the particular business location which sells the order item. In WCS we set this to the same value as the sellerId.

setBuyerName

public void setBuyerName(java.lang.String aName)
The name of the purchaser for this item. This field is typically used to determine if the purchaser has a tax exempt status or any other pertanent information.

setCost

public void setCost(java.math.BigDecimal aItemCost)
The total cost for this order item. If the order item is for 4 units at $10 each, then the total cost would be $40.

setCurrencyCode

public void setCurrencyCode(java.lang.String aisoCurrency)
This 3-character ISO currency code identifies the currency in which the transaction is being made.

setDiscount

public void setDiscount(java.math.BigDecimal aItemDiscount)
The total value of all non-tax-exempt discounts for this line item.

setFreight

public void setFreight(java.math.BigDecimal aItemFreight)
The total sbipping charge for this order item.
Parameters:
aItemFreight - The cost of shipping for this order item.

setInvoiceNumber

public void setInvoiceNumber(java.lang.String aInvoiceNo)
This method provides the ability to attach an identifier to the order item It is not used in the actual tax calculation. It is typically used to track orders between systems.

setItemCnt

public void setItemCnt(java.lang.Double aItemCnt)
The number of units of this order item being purchased.

setSellerID

public void setSellerID(java.lang.String aSellerId)
This method is used to set the seller identification. For WCS this is the Store Identifier. This is assigned when the store is initially created and cannot be changed.

setSellerRegistrationId

public void setSellerRegistrationId(java.lang.String aSellerRegistrationId)
This method is used to provide a seller registration identifier. This value is needed for international taxation.

setShipFromAddress

public void setShipFromAddress(java.lang.String aAddress)
Sets the street address from which the order item will be shipped. This is either the address of the store or the fulfillment center address.

setShipFromCity

public void setShipFromCity(java.lang.String aCity)
Sets the city portion of the address from which the order item will be shipped. This is either the address of the store or the fulfillment center address.

setShipFromCountry

public void setShipFromCountry(java.lang.String aCountry)
Sets the country from which the order item will be shipped. This is from either the address of the store or the fulfillment center address.

setShipFromState

public void setShipFromState(java.lang.String aState)
Sets the state portion of the address from which the order item will be shipped. This is either the address of the store or the fulfillment center address.

setShipFromTaxGeoCode

public void setShipFromTaxGeoCode(java.lang.String aGeoCode)
Sets the tax jurisdiction code (geoCode) from which the order item will be shipped. This is either the address of the store or the fulfillment center address.

setShipFromZip

public void setShipFromZip(java.lang.String aZipCode)
Sets the zip code or postal code of the address from which the order item will be shipped. This is either the address of the store or the fulfillment center address.

setShipToAddress

public void setShipToAddress(java.lang.String aAddress)
Sets the street address to which the order item will be shipped.

setShipToCity

public void setShipToCity(java.lang.String aCity)
Sets the city portion of the address to which the order item will be shipped.

setShipToCountry

public void setShipToCountry(java.lang.String aCountry)
Sets the country to which the order item will be shipped.

setShipToState

public void setShipToState(java.lang.String aState)
Sets the state portion of the address to which the order item will be shipped.

setShipToTaxGeoCode

public void setShipToTaxGeoCode(java.lang.String aGeoCode)
Sets the tax jurisdiction code (geoCode) to which the order item will be shipped. T

setShipToZip

public void setShipToZip(java.lang.String aZipCode)
Sets the zip code or postal code of the address to which the order item will be shipped.

setStoreId

public void setStoreId(java.lang.Integer aStoreId)
Sets the id of the input store to be used for determining the tax types.
Parameters:
aStoreId - The reference number of a store

setTaxCode

public void setTaxCode(java.lang.String aTaxCode)
This method specifies the tax treatment code for this order item. In WebSphere Commerce Suite this maps to the tax calculation code. This is usually associated with a group of products that are taxed the same. i.e. groceries, clothing, automobiles, etc.

setTransactionType

public void setTransactionType(char aType)
This method is used to tell the tax software the type of transaction. The default type is a Sale.
Parameters:
aType - representing the type of transaction - valid values are
  • 'B' - Backout a previous sale
  • 'C' - Credit
  • 'P' - Purchase
  • 'R' - Return
  • 'S' - Sale