Class ExternalTaxRateDraftImpl

java.lang.Object
com.commercetools.api.models.cart.ExternalTaxRateDraftImpl
All Implemented Interfaces:
ExternalTaxRateDraft, io.vrap.rmf.base.client.Draft<ExternalTaxRateDraft>, io.vrap.rmf.base.client.ModelBase

public class ExternalTaxRateDraftImpl extends Object implements ExternalTaxRateDraft, io.vrap.rmf.base.client.ModelBase

Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in Cart tax calculation.

  • 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
     
    Percentage in the range of 0-1.
    Country for which the tax applies.
    If set to false, the related price is considered the net price and the provided amount is applied to calculate the gross price. If set to true, the related price is considered the gross price, and the provided amount is applied to calculate the net price.
    Name of the Tax Rate.
    State within the specified country.
    For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).
    int
     
    void
    setAmount(Double amount)
    Percentage in the range of 0-1.
    void
    setCountry(String country)
    Country for which the tax applies.
    void
    setIncludedInPrice(Boolean includedInPrice)
    If set to false, the related price is considered the net price and the provided amount is applied to calculate the gross price. If set to true, the related price is considered the gross price, and the provided amount is applied to calculate the net price.
    void
    Name of the Tax Rate.
    void
    State within the specified country.
    void
    setSubRates(SubRate... subRates)
    For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).
    void
    For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.commercetools.api.models.cart.ExternalTaxRateDraft

    withExternalTaxRateDraft

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

    reflectionString, reflectionString
  • Constructor Details

    • ExternalTaxRateDraftImpl

      public ExternalTaxRateDraftImpl()
      create empty instance
  • Method Details

    • getName

      public String getName()

      Name of the Tax Rate.

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

      public Double getAmount()

      Percentage in the range of 0-1.

      • If no subRates are specified, a value must be defined.
      • If subRates are specified, this can be omitted or its value must be the sum of all subRates amounts.
      Specified by:
      getAmount in interface ExternalTaxRateDraft
      Returns:
      amount
    • getIncludedInPrice

      public Boolean getIncludedInPrice()
      • If set to false, the related price is considered the net price and the provided amount is applied to calculate the gross price.
      • If set to true, the related price is considered the gross price, and the provided amount is applied to calculate the net price.
      Specified by:
      getIncludedInPrice in interface ExternalTaxRateDraft
      Returns:
      includedInPrice
    • getCountry

      public String getCountry()

      Country for which the tax applies.

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

      public String getState()

      State within the specified country.

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

      public List<SubRate> getSubRates()

      For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).

      Specified by:
      getSubRates in interface ExternalTaxRateDraft
      Returns:
      subRates
    • setName

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

      Name of the Tax Rate.

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

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

      Percentage in the range of 0-1.

      • If no subRates are specified, a value must be defined.
      • If subRates are specified, this can be omitted or its value must be the sum of all subRates amounts.
      Specified by:
      setAmount in interface ExternalTaxRateDraft
      Parameters:
      amount - value to be set
    • setIncludedInPrice

      public void setIncludedInPrice(Boolean includedInPrice)
      Description copied from interface: ExternalTaxRateDraft
      • If set to false, the related price is considered the net price and the provided amount is applied to calculate the gross price.
      • If set to true, the related price is considered the gross price, and the provided amount is applied to calculate the net price.
      Specified by:
      setIncludedInPrice in interface ExternalTaxRateDraft
      Parameters:
      includedInPrice - value to be set
    • setCountry

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

      Country for which the tax applies.

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

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

      State within the specified country.

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

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

      For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).

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

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

      For countries (such as the US) where the total tax is a combination of multiple taxes (such as state and local taxes).

      Specified by:
      setSubRates in interface ExternalTaxRateDraft
      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