Class TaxPortionImpl
java.lang.Object
com.commercetools.api.models.cart.TaxPortionImpl
- All Implemented Interfaces:
TaxPortion
,io.vrap.rmf.base.client.ModelBase
The tax portions are calculated from the TaxRates. If a Tax Rate has SubRates, they are used and can be identified by name. Tax portions from Line Items with the same rate
and name
are accumulated to the same tax portion.
-
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
Money value of the tax portion.getName()
Name of the tax portion.getRate()
A number in the range 0-1.int
hashCode()
void
setAmount
(CentPrecisionMoney amount) Money value of the tax portion.void
Name of the tax portion.void
A number in the range 0-1.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.cart.TaxPortion
withTaxPortion
-
Constructor Details
-
TaxPortionImpl
public TaxPortionImpl()create empty instance
-
-
Method Details
-
getName
Name of the tax portion.
- Specified by:
getName
in interfaceTaxPortion
- Returns:
- name
-
getRate
A number in the range 0-1.
- Specified by:
getRate
in interfaceTaxPortion
- Returns:
- rate
-
getAmount
Money value of the tax portion.
- Specified by:
getAmount
in interfaceTaxPortion
- Returns:
- amount
-
setName
Description copied from interface:TaxPortion
Name of the tax portion.
- Specified by:
setName
in interfaceTaxPortion
- Parameters:
name
- value to be set
-
setRate
Description copied from interface:TaxPortion
A number in the range 0-1.
- Specified by:
setRate
in interfaceTaxPortion
- Parameters:
rate
- value to be set
-
setAmount
Description copied from interface:TaxPortion
Money value of the tax portion.
- Specified by:
setAmount
in interfaceTaxPortion
- Parameters:
amount
- value to be set
-
equals
-
hashCode
-