Class TaxRateImpl

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

public class TaxRateImpl extends Object implements TaxRate, io.vrap.rmf.base.client.ModelBase
TaxRate
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase

    io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
  • Constructor Summary

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Tax rate.
    Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.
    Present if the TaxRate is part of a TaxCategory.
    If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems.
    User-defined unique identifier of the TaxRate.
    Name of the TaxRate.
    State within the country, such as Texas in the United States.
    Used to calculate the taxPortions field in a Cart or Order.
    int
     
    void
    setAmount(Double amount)
    Tax rate.
    void
    setCountry(String country)
    Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.
    void
    Present if the TaxRate is part of a TaxCategory.
    void
    setIncludedInPrice(Boolean includedInPrice)
    If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems.
    void
    User-defined unique identifier of the TaxRate.
    void
    Name of the TaxRate.
    void
    State within the country, such as Texas in the United States.
    void
    setSubRates(SubRate... subRates)
    Used to calculate the taxPortions field in a Cart or Order.
    void
    Used to calculate the taxPortions field in a Cart or Order.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.vrap.rmf.base.client.ModelBase

    reflectionString, reflectionString

    Methods inherited from interface com.commercetools.api.models.tax_category.TaxRate

    withTaxRate
  • Constructor Details

    • TaxRateImpl

      public TaxRateImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

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

      public String getKey()

      User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

      Specified by:
      getKey in interface TaxRate
      Returns:
      key
    • getName

      public String getName()

      Name of the TaxRate.

      Specified by:
      getName in interface TaxRate
      Returns:
      name
    • getAmount

      public Double getAmount()

      Tax rate. If subrates are used, the amount must be the sum of all subrates.

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

      If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

      Specified by:
      getIncludedInPrice in interface TaxRate
      Returns:
      includedInPrice
    • getCountry

      public String getCountry()

      Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

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

      public String getState()

      State within the country, such as Texas in the United States.

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

      Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes).

      Specified by:
      getSubRates in interface TaxRate
      Returns:
      subRates
    • setId

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

      Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

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

      public void setKey(String key)
      Description copied from interface: TaxRate

      User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

      Specified by:
      setKey in interface TaxRate
      Parameters:
      key - value to be set
    • setName

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

      Name of the TaxRate.

      Specified by:
      setName in interface TaxRate
      Parameters:
      name - value to be set
    • setAmount

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

      Tax rate. If subrates are used, the amount must be the sum of all subrates.

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

      public void setIncludedInPrice(Boolean includedInPrice)
      Description copied from interface: TaxRate

      If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

      Specified by:
      setIncludedInPrice in interface TaxRate
      Parameters:
      includedInPrice - value to be set
    • setCountry

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

      Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

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

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

      State within the country, such as Texas in the United States.

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

      public void setSubRates(SubRate... subRates)
      Description copied from interface: TaxRate

      Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes).

      Specified by:
      setSubRates in interface TaxRate
      Parameters:
      subRates - values to be set
    • setSubRates

      public void setSubRates(List<SubRate> subRates)
      Description copied from interface: TaxRate

      Used to calculate the taxPortions field in a Cart or Order. It is useful if the total tax of a country (such as the US) is a combination of multiple taxes (such as state and local taxes).

      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