Class TaxPortionImpl

java.lang.Object
com.commercetools.api.models.cart.TaxPortionImpl
All Implemented Interfaces:
TaxPortion, io.vrap.rmf.base.client.ModelBase

public class TaxPortionImpl extends Object implements TaxPortion, io.vrap.rmf.base.client.ModelBase

The tax portions are calculated from the TaxRates. If a Tax Rate has SubRates, they are used and can be identified by name. Tax portions from Line Items with the same rate and name are accumulated to the same tax portion.

  • Constructor Details

    • TaxPortionImpl

      public TaxPortionImpl()
      create empty instance
  • Method Details

    • getName

      public String getName()

      Name of the tax portion.

      Specified by:
      getName in interface TaxPortion
      Returns:
      name
    • getRate

      public Double getRate()

      A number in the range 0-1.

      Specified by:
      getRate in interface TaxPortion
      Returns:
      rate
    • getAmount

      public CentPrecisionMoney getAmount()

      Money value of the tax portion.

      Specified by:
      getAmount in interface TaxPortion
      Returns:
      amount
    • setName

      public void setName(String name)
      Description copied from interface: TaxPortion

      Name of the tax portion.

      Specified by:
      setName in interface TaxPortion
      Parameters:
      name - value to be set
    • setRate

      public void setRate(Double rate)
      Description copied from interface: TaxPortion

      A number in the range 0-1.

      Specified by:
      setRate in interface TaxPortion
      Parameters:
      rate - value to be set
    • setAmount

      public void setAmount(CentPrecisionMoney amount)
      Description copied from interface: TaxPortion

      Money value of the tax portion.

      Specified by:
      setAmount in interface TaxPortion
      Parameters:
      amount - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object