Interface TaxRoundingTarget
- All Superinterfaces:
JsonEnum
- All Known Implementing Classes:
TaxRoundingTarget.TaxRoundingTargetEnum
For a TaxRate that is included in the price, this value determines which of the two derived amounts the RoundingMode set by taxRoundingMode is applied to. The other amount is the exact difference from the gross price, so totalNet plus totalTax on TaxedPrice always equals totalGross.
This field has no effect if includedInPrice is false. In that case, the net price is supplied exactly, so rounding the gross price and rounding the tax amount give the same result.
For more information, see Tax rounding target.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumpossible values of TaxRoundingTarget -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TaxRoundingTargettaxRoundingModeis applied to the net price and the tax amount is the exact remainder.static final TaxRoundingTargettaxRoundingModeis applied to the tax amount and the net price is the exact remainder. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaxRoundingTargetfactory method for a enum value of TaxRoundingTarget if no enum has been found an anonymous instance will be createdstatic Optional<TaxRoundingTarget>findEnumViaJsonName(String jsonName) method to find enum using the JSON valuethe JSON valuename()the enum valuetoString()convert value to stringstatic TaxRoundingTarget[]values()possible enum values
-
Field Details
-
NET
taxRoundingModeis applied to the net price and the tax amount is the exact remainder.For example, with a rate of 20% included in a gross price of 1.23 and
taxRoundingMode: HalfEven, the net price rounds to 1.02 and the tax amount is 0.21.This is the default value for a new Tax Rate.
-
TAX
taxRoundingModeis applied to the tax amount and the net price is the exact remainder.For example, with a rate of 20% included in a gross price of 1.23 and
taxRoundingMode: HalfEven, the tax amount rounds to 0.20 and the net price is 1.03.
-
-
Method Details
-
getJsonName
String getJsonName()the JSON value- Specified by:
getJsonNamein interfaceJsonEnum- Returns:
- json value
-
name
String name()the enum value -
toString
String toString()convert value to string -
findEnum
factory method for a enum value of TaxRoundingTarget if no enum has been found an anonymous instance will be created- Parameters:
value- the enum value to be wrapped- Returns:
- enum instance
-
findEnumViaJsonName
method to find enum using the JSON value- Parameters:
jsonName- the json value to be wrapped- Returns:
- optional of enum instance
-
values
possible enum values- Returns:
- array of possible enum values
-