Class TaxRateImpl

java.lang.Object
com.commercetools.history.models.common.TaxRateImpl
All Implemented Interfaces:
TaxRate, io.vrap.rmf.base.client.ModelBase

public class TaxRateImpl extends Object implements TaxRate, io.vrap.rmf.base.client.ModelBase

Shape of the value for addTaxRate and removeTaxRate actions

  • Constructor Details

    • TaxRateImpl

      public TaxRateImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

      Specified by:
      getId in interface TaxRate
      Returns:
      id
    • getName

      public String getName()
      Specified by:
      getName in interface TaxRate
      Returns:
      name
    • getAmount

      public Integer getAmount()

      Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

      Specified by:
      getAmount in interface TaxRate
      Returns:
      amount
    • getIncludedInPrice

      public Boolean getIncludedInPrice()
      Specified by:
      getIncludedInPrice in interface TaxRate
      Returns:
      includedInPrice
    • getCountry

      public String getCountry()

      Two-digit country code as per ISO 3166-1 alpha-2.

      Specified by:
      getCountry in interface TaxRate
      Returns:
      country
    • getState

      public String getState()

      The state in the country

      Specified by:
      getState in interface TaxRate
      Returns:
      state
    • getSubRates

      public List<SubRate> getSubRates()
      Specified by:
      getSubRates in interface TaxRate
      Returns:
      subRates
    • setId

      public void setId(String id)
      Description copied from interface: TaxRate

      The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

      Specified by:
      setId in interface TaxRate
      Parameters:
      id - value to be set
    • setName

      public void setName(String name)
      Description copied from interface: TaxRate
      set name
      Specified by:
      setName in interface TaxRate
      Parameters:
      name - value to be set
    • setAmount

      public void setAmount(Integer amount)
      Description copied from interface: TaxRate

      Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

      Specified by:
      setAmount in interface TaxRate
      Parameters:
      amount - value to be set
    • setIncludedInPrice

      public void setIncludedInPrice(Boolean includedInPrice)
      Description copied from interface: TaxRate
      set includedInPrice
      Specified by:
      setIncludedInPrice in interface TaxRate
      Parameters:
      includedInPrice - value to be set
    • setCountry

      public void setCountry(String country)
      Description copied from interface: TaxRate

      Two-digit country code as per ISO 3166-1 alpha-2.

      Specified by:
      setCountry in interface TaxRate
      Parameters:
      country - value to be set
    • setState

      public void setState(String state)
      Description copied from interface: TaxRate

      The state in the country

      Specified by:
      setState in interface TaxRate
      Parameters:
      state - value to be set
    • setSubRates

      public void setSubRates(SubRate... subRates)
      Description copied from interface: TaxRate
      set subRates
      Specified by:
      setSubRates in interface TaxRate
      Parameters:
      subRates - values to be set
    • setSubRates

      public void setSubRates(List<SubRate> subRates)
      Description copied from interface: TaxRate
      set subRates
      Specified by:
      setSubRates in interface TaxRate
      Parameters:
      subRates - values to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object