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

All Superinterfaces:
ECCommand, 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
           
static java.lang.String NAME
           
 
Fields inherited from interface com.ibm.commerce.command.ECCommand
defaultCommandClassName
 
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.math.BigDecimal getTax(java.lang.String taxtype)
          Obtain the tax calculated for a given taxing authority or jurisdiction.
 java.math.BigDecimal[] getTaxAmounts()
          Obtain the tax amounts calculated for each of the given taxing authority or jurisdiction levels returned from the tax calculation modules
 java.lang.Integer[] getTaxTypes()
          Obtain all the taxing authority or jurisdiction levels where the taxes calculated.
 java.math.BigDecimal getTotalTax()
          Obtain the total tax calculated for this order item for all relevant taxing authorities.
 void setAuditFlag(boolean flag)
          Turn on or off the audit (logging) of tax calculations for this order item.
 void setBusinessName(java.lang.String businessName)
          This method provides the name of the particular business location which sells the order item.
 void setBuyerName(java.lang.String name)
          The name of the purchaser for this item.
 void setCost(java.math.BigDecimal idCost)
          The total cost for this order item.
 void setCurrencyCode(java.lang.String isoCurrency)
          This 3-character ISO currency code identifies the currency in which the transaction is being made.
 void setDiscount(java.math.BigDecimal idDisc)
          The total value of all non-tax-exempt discounts for this line item.
 void setFreight(java.math.BigDecimal idFreight)
          The total sbipping charge for this order item.
 void setInvoiceNumber(java.lang.String invoiceNumber)
          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 itemCnt)
          The number of units of this order item being purchased.
 void setSellerID(java.lang.String sellerId)
          This method is used to set the seller identification.
 void setSellerRegistrationId(java.lang.String sellerRegistrationId)
          This method is used to provide a seller registration identifier.
 void setShipFromAddress(java.lang.String address)
          Set the street address from which the order item will be shipped.
 void setShipFromCity(java.lang.String city)
          Set the city portion of the address from which the order item will be shipped.
 void setShipFromCountry(java.lang.String country)
          Set the country from which the order item will be shipped.
 void setShipFromState(java.lang.String state)
          Set the state portion of the address from which the order item will be shipped.
 void setShipFromTaxGeoCode(java.lang.String geoCode)
          Set the tax jurisdiction code (geoCode) from which the order item will be shipped.
 void setShipFromZip(java.lang.String zipCode)
          Set the zip code or postal code of the address from which the order item will be shipped.
 void setShipToAddress(java.lang.String address)
          Set the street address to which the order item will be shipped.
 void setShipToCity(java.lang.String city)
          Set the city portion of the address to which the order item will be shipped.
 void setShipToCountry(java.lang.String country)
          Set the country to which the order item will be shipped.
 void setShipToState(java.lang.String state)
          Set the state portion of the address to which the order item will be shipped.
 void setShipToTaxGeoCode(java.lang.String geoCode)
          Set the tax jurisdiction code (geoCode) to which the order item will be shipped.
 void setShipToZip(java.lang.String zipCode)
          Set 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 taxCode)
          This method specifies the tax treatment code for this order item.
 void setTransactionType(char type)
          This method is used to tell the tax software the type of transaction.
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

NAME

public static final java.lang.String NAME
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:
BigDecimal cost. 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:
BigDecimal discount. The total value of all discounts.

getTax

public java.math.BigDecimal getTax(java.lang.String taxtype)
Obtain the tax calculated for a given taxing authority or jurisdiction.
Parameters:
String - taxType. The type of tax calculated.
Returns:
BigDecimal tax. The amount of tax calculated for the given tax type.

getTaxAmounts

public java.math.BigDecimal[] getTaxAmounts()
Obtain the tax amounts calculated for each of the given taxing authority or jurisdiction levels returned from the tax calculation modules

getTaxTypes

public java.lang.Integer[] getTaxTypes()
Obtain all the taxing authority or jurisdiction levels where the taxes calculated.

getTotalTax

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

setAuditFlag

public void setAuditFlag(boolean flag)
Turn 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 calcuations. It is false by default.
Parameters:
boolean - flag. Setting the flag to 'true' turns on auditing, 'false'turns it off.

setBusinessName

public void setBusinessName(java.lang.String businessName)
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.
Parameters:
String - businessName. Identifies the name of the business location.

setBuyerName

public void setBuyerName(java.lang.String name)
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.
Parameters:
String - name. The name of the buyer.

setCost

public void setCost(java.math.BigDecimal idCost)
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.
Parameters:
BigDecimal - idCost. The total price for this line item.

setCurrencyCode

public void setCurrencyCode(java.lang.String isoCurrency)
This 3-character ISO currency code identifies the currency in which the transaction is being made.
Parameters:
String - currency. The 3-character string representing the currency type being used for this order item.

setDiscount

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

setFreight

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

setInvoiceNumber

public void setInvoiceNumber(java.lang.String invoiceNumber)
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.
Parameters:
String - invoiceNumber. A unique string representing the Sales invoice.

setItemCnt

public void setItemCnt(java.lang.Double itemCnt)
The number of units of this order item being purchased.
Parameters:
Double - itemCnt. A count of the total number of units for this order item.

setSellerID

public void setSellerID(java.lang.String sellerId)
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.
Parameters:
String - sellerID. A store or business identifier.

setSellerRegistrationId

public void setSellerRegistrationId(java.lang.String sellerRegistrationId)
This method is used to provide a seller registration identifier. This value is needed for international taxation.
Parameters:
String - sellerRegistrationId. A business registration identifier.

setShipFromAddress

public void setShipFromAddress(java.lang.String address)
Set the street address from which the order item will be shipped. This is either the address of the store or the fulfillment center address.
Parameters:
String - address. The street address from which the order item will be shipped.

setShipFromCity

public void setShipFromCity(java.lang.String city)
Set 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.
Parameters:
String - city. The city from which the order item will be shipped.

setShipFromCountry

public void setShipFromCountry(java.lang.String country)
Set the country from which the order item will be shipped. This is from either the address of the store or the fulfillment center address.
Parameters:
String - country. The country from which the order item will be shipped.

setShipFromState

public void setShipFromState(java.lang.String state)
Set 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.
Parameters:
String - state. The state from which the order item will be shipped.

setShipFromTaxGeoCode

public void setShipFromTaxGeoCode(java.lang.String geoCode)
Set 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.
Parameters:
String - geoCode. The tax jurisdiction geoCode from which the order item will be shipped.

setShipFromZip

public void setShipFromZip(java.lang.String zipCode)
Set 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.
Parameters:
String - zipCode. The zip code or postal code from which the order item will be shipped.

setShipToAddress

public void setShipToAddress(java.lang.String address)
Set the street address to which the order item will be shipped.
Parameters:
String - address. The street address to which the order item will be shipped.

setShipToCity

public void setShipToCity(java.lang.String city)
Set the city portion of the address to which the order item will be shipped.
Parameters:
String - city. The city to which the order item will be shipped.

setShipToCountry

public void setShipToCountry(java.lang.String country)
Set the country to which the order item will be shipped.
Parameters:
String - country. The country to which the order item will be shipped.

setShipToState

public void setShipToState(java.lang.String state)
Set the state portion of the address to which the order item will be shipped.
Parameters:
String - state. The state to which the order item will be shipped.

setShipToTaxGeoCode

public void setShipToTaxGeoCode(java.lang.String geoCode)
Set the tax jurisdiction code (geoCode) to which the order item will be shipped. T
Parameters:
String - geoCode. The tax jurisdiction geoCode to which the order item will be shipped.

setShipToZip

public void setShipToZip(java.lang.String zipCode)
Set the zip code or postal code of the address to which the order item will be shipped.
Parameters:
String - zipCode. The zip code or postal code 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 taxCode)
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.
Parameters:
String - taxCode. The taxCode for this product.

setTransactionType

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