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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Percentage in the range of 0-1.Country for which the tax applies.If set tofalse
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. If set totrue
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.getName()
Name of the Tax Rate.getState()
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
hashCode()
void
Percentage in the range of 0-1.void
setCountry
(String country) Country for which the tax applies.void
setIncludedInPrice
(Boolean includedInPrice) If set tofalse
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. If set totrue
, the related price is considered the gross price, and the providedamount
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
setSubRates
(List<SubRate> subRates) 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
Name of the Tax Rate.
- Specified by:
getName
in interfaceExternalTaxRateDraft
- Returns:
- name
-
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 allsubRates
amounts.
- Specified by:
getAmount
in interfaceExternalTaxRateDraft
- Returns:
- amount
- If no
-
getIncludedInPrice
- If set to
false
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. - If set to
true
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.
- Specified by:
getIncludedInPrice
in interfaceExternalTaxRateDraft
- Returns:
- includedInPrice
- If set to
-
getCountry
Country for which the tax applies.
- Specified by:
getCountry
in interfaceExternalTaxRateDraft
- Returns:
- country
-
getState
State within the specified country.
- Specified by:
getState
in interfaceExternalTaxRateDraft
- Returns:
- state
-
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 interfaceExternalTaxRateDraft
- Returns:
- subRates
-
setName
Description copied from interface:ExternalTaxRateDraft
Name of the Tax Rate.
- Specified by:
setName
in interfaceExternalTaxRateDraft
- Parameters:
name
- value to be set
-
setAmount
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 allsubRates
amounts.
- Specified by:
setAmount
in interfaceExternalTaxRateDraft
- Parameters:
amount
- value to be set
- If no
-
setIncludedInPrice
Description copied from interface:ExternalTaxRateDraft
- If set to
false
, the related price is considered the net price and the providedamount
is applied to calculate the gross price. - If set to
true
, the related price is considered the gross price, and the providedamount
is applied to calculate the net price.
- Specified by:
setIncludedInPrice
in interfaceExternalTaxRateDraft
- Parameters:
includedInPrice
- value to be set
- If set to
-
setCountry
Description copied from interface:ExternalTaxRateDraft
Country for which the tax applies.
- Specified by:
setCountry
in interfaceExternalTaxRateDraft
- Parameters:
country
- value to be set
-
setState
Description copied from interface:ExternalTaxRateDraft
State within the specified country.
- Specified by:
setState
in interfaceExternalTaxRateDraft
- Parameters:
state
- value to be set
-
setSubRates
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 interfaceExternalTaxRateDraft
- Parameters:
subRates
- values to be set
-
setSubRates
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 interfaceExternalTaxRateDraft
- Parameters:
subRates
- values to be set
-
equals
-
hashCode
-