com.ibm.commerce.isv.kit.tax

Interface TaxIntegrationOrderItemCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    TaxIntegrationOrderItemCmdImpl


    public interface TaxIntegrationOrderItemCmd
    extends TaskCommand
    The TaxOrderItemCmd interface provides an external tax calculation application with access to the tax-related data for an order item.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      static java.lang.String defaultCommandClassName
      Default command class name.
      static java.lang.String NAME
      The name of this command.
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      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.math.BigDecimal getRecyclingFee()
      Obtains the recycling fee for this order item
      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 getSecondaryTaxRate(java.lang.String aJurisdictiontype)
      Obtains the tax rate for a given type of secondary jurisdiction level.
      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.math.BigDecimal getTaxRate(java.lang.String aJurisdictiontype)
      Obtains the tax rate for a given type of jurisdiction level.
      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.
      java.math.BigDecimal getTotalTaxRate()
      Obtains the total tax rate 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 setTimeShipped(java.sql.Timestamp aTime)
      Sets the time and date the order item shipped.
      void setTransactionType(char aType)
      This method is used to tell the tax software the type of transaction.
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.websphere.command.CacheableCommand

        executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, performExecute, setCommandTarget, setCommandTargetName, setOutputProperties
      • Methods inherited from interface com.ibm.websphere.command.Command

        isReadyToCallExecute, reset
      • Methods inherited from interface com.ibm.websphere.command.CommandCaller

        unionDependencies
    • Field Detail

      • COPYRIGHT

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

        static final java.lang.String defaultCommandClassName
        Default command class name.
        See Also:
        Constant Field Values
    • Method Detail

      • getCost

        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

        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

        java.lang.String[] getJurisdictionCodes()
        Obtains all the jurisdiction levels (codes) where the taxes are being calculated.

        Returns:
        The list of jurisdiction codes.
      • getJurstCode

        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

        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

        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

        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

        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

        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

        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

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

        Returns:
        The list of jurisdiction levels.
      • getTotalTax

        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.
      • getTaxRate

        java.math.BigDecimal getTaxRate(java.lang.String aJurisdictiontype)
        Obtains the tax rate 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 tax rate for the given type of jurisdiction level.
      • getSecondaryTaxRate

        java.math.BigDecimal getSecondaryTaxRate(java.lang.String aJurisdictiontype)
        Obtains the tax rate for a given type of secondary jurisdiction level.

        Parameters:
        aJurisdictiontype - the type of jurisdiction level. Accepted types can be "SECONDARYSTATE", "SECONDARYCITY", "SECONDARYCOUNTY"

        Returns:
        The tax rate for the given type of secondary jurisdiction level.
      • getTotalTaxRate

        java.math.BigDecimal getTotalTaxRate()
        Obtains the total tax rate for this order item for all relevant taxing authorities.

        Returns:
        The total tax rate for this order item.
      • setAuditFlag

        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.

        Parameters:
        aFlag - Setting the flag to 'true' turns on auditing, 'false'turns it off.
      • setBusinessName

        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.

        Parameters:
        aBusinessName - Identifies the name of the business location.
      • setBuyerName

        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.

        Parameters:
        aName - The name of the buyer.
      • setCost

        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.

        Parameters:
        aItemCost - The total price for this line item.
      • setCurrencyCode

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

        Parameters:
        aisoCurrency - The 3-character string representing the currency type being used for this order item.
      • setDiscount

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

        Parameters:
        aItemDiscount - The total value of all discounts.
      • setFreight

        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

        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.

        Parameters:
        aInvoiceNo - A unique string representing the Sales invoice.
      • setItemCnt

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

        Parameters:
        aItemCnt - A count of the total number of units for this order item.
      • setSellerID

        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.

        Parameters:
        aSellerId - A store or business identifier.
      • setSellerRegistrationId

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

        Parameters:
        aSellerRegistrationId - A business registration identifier.
      • setShipFromAddress

        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.

        Parameters:
        aAddress - The street address from which the order item will be shipped.
      • setShipFromCity

        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.

        Parameters:
        aCity - The city from which the order item will be shipped.
      • setShipFromCountry

        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.

        Parameters:
        aCountry - The country from which the order item will be shipped.
      • setShipFromState

        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.

        Parameters:
        aState - The state from which the order item will be shipped.
      • setShipFromTaxGeoCode

        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.

        Parameters:
        aGeoCode - The tax jurisdiction geoCode from which the order item will be shipped.
      • setShipFromZip

        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.

        Parameters:
        aZipCode - The zip code or postal code from which the order item will be shipped.
      • setShipToAddress

        void setShipToAddress(java.lang.String aAddress)
        Sets the street address to which the order item will be shipped.
        Parameters:
        aAddress - The street address to which the order item will be shipped.
      • setShipToCity

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

        Parameters:
        aCity - The city to which the order item will be shipped.
      • setShipToCountry

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

        Parameters:
        aCountry - The country to which the order item will be shipped.
      • setShipToState

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

        Parameters:
        aState - The state to which the order item will be shipped.
      • setShipToTaxGeoCode

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

        Parameters:
        aGeoCode - The tax jurisdiction geoCode to which the order item will be shipped.
      • setShipToZip

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

        Parameters:
        aZipCode - The zip code or postal code to which the order item will be shipped.
      • setStoreId

        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

        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.

        Parameters:
        aTaxCode - The taxCode for this product.
      • setTransactionType

        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
      • setTimeShipped

        void setTimeShipped(java.sql.Timestamp aTime)
        Sets the time and date the order item shipped.

        Parameters:
        aTime - The time and date the order item was shipped
      • getRecyclingFee

        java.math.BigDecimal getRecyclingFee()
        Obtains the recycling fee for this order item
        Returns:
        the recycling fee for this order item