Class TaxPortionDraftImpl
java.lang.Object
com.commercetools.api.models.cart.TaxPortionDraftImpl
- All Implemented Interfaces:
TaxPortionDraft
,io.vrap.rmf.base.client.Draft<TaxPortionDraft>
,io.vrap.rmf.base.client.ModelBase
public class TaxPortionDraftImpl
extends Object
implements TaxPortionDraft, io.vrap.rmf.base.client.ModelBase
Represents the portions that sum up to the totalGross
field of a TaxedPrice.
The 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
will be 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
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.TaxPortionDraft
withTaxPortionDraft
-
Constructor Details
-
TaxPortionDraftImpl
public TaxPortionDraftImpl()create empty instance
-
-
Method Details
-
getName
Name of the tax portion.
- Specified by:
getName
in interfaceTaxPortionDraft
- Returns:
- name
-
getRate
A number in the range 0-1.
- Specified by:
getRate
in interfaceTaxPortionDraft
- Returns:
- rate
-
getAmount
Money value for the tax portion.
- Specified by:
getAmount
in interfaceTaxPortionDraft
- Returns:
- amount
-
setName
Description copied from interface:TaxPortionDraft
Name of the tax portion.
- Specified by:
setName
in interfaceTaxPortionDraft
- Parameters:
name
- value to be set
-
setRate
Description copied from interface:TaxPortionDraft
A number in the range 0-1.
- Specified by:
setRate
in interfaceTaxPortionDraft
- Parameters:
rate
- value to be set
-
setAmount
Description copied from interface:TaxPortionDraft
Money value for the tax portion.
- Specified by:
setAmount
in interfaceTaxPortionDraft
- Parameters:
amount
- value to be set
-
equals
-
hashCode
-