Class TaxRateDraftImpl

java.lang.Object
com.commercetools.api.models.tax_category.TaxRateDraftImpl
All Implemented Interfaces:
TaxRateDraft, io.vrap.rmf.base.client.Draft<TaxRateDraft>, io.vrap.rmf.base.client.ModelBase

public class TaxRateDraftImpl extends Object implements TaxRateDraft, io.vrap.rmf.base.client.ModelBase
TaxRateDraft
  • 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.
    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
    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.TaxRateDraft

    withTaxRateDraft
  • Constructor Details

  • Method Details

    • getName

      public String getName()

      Name of the TaxRate.

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

      public Double getAmount()

      Tax rate. Must be supplied if no subRates are specified. If subRates are specified, this field can be omitted or it must be the sum of amounts of all subRates.

      Specified by:
      getAmount in interface TaxRateDraft
      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 TaxRateDraft
      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 TaxRateDraft
      Returns:
      country
    • getState

      public String getState()

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

      Specified by:
      getState in interface TaxRateDraft
      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 TaxRateDraft
      Returns:
      subRates
    • getKey

      public String getKey()

      User-defined unique identifier of the TaxRate.

      Specified by:
      getKey in interface TaxRateDraft
      Returns:
      key
    • setName

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

      Name of the TaxRate.

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

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

      Tax rate. Must be supplied if no subRates are specified. If subRates are specified, this field can be omitted or it must be the sum of amounts of all subRates.

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

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

      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 TaxRateDraft
      Parameters:
      includedInPrice - value to be set
    • setCountry

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

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

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

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

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

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

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

      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 TaxRateDraft
      Parameters:
      subRates - values to be set
    • setSubRates

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

      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 TaxRateDraft
      Parameters:
      subRates - values to be set
    • setKey

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

      User-defined unique identifier of the TaxRate.

      Specified by:
      setKey in interface TaxRateDraft
      Parameters:
      key - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object