Interface TaxCalculationMode
- All Superinterfaces:
io.vrap.rmf.base.client.JsonEnum
- All Known Implementing Classes:
TaxCalculationMode.TaxCalculationModeEnum
public interface TaxCalculationMode
extends io.vrap.rmf.base.client.JsonEnum
Determines in which Tax calculation mode taxed prices are calculated.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
possible values of TaxCalculationMode -
Field Summary
Modifier and TypeFieldDescriptionstatic final TaxCalculationMode
Taxes are calculated after the unit price is multiplied by the quantity.static final TaxCalculationMode
Taxes are calculated on the unit price before multiplying by the quantity. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaxCalculationMode
factory method for a enum value of TaxCalculationMode if no enum has been found an anonymous instance will be createdstatic Optional<TaxCalculationMode>
findEnumViaJsonName
(String jsonName) method to find enum using the JSON valuethe JSON valuename()
the enum valuetoString()
convert value to stringstatic TaxCalculationMode[]
values()
possible enum values
-
Field Details
-
LINE_ITEM_LEVEL
Taxes are calculated after the unit price is multiplied by the quantity. This is the default mode.
For example,
($1.08 * 3 = $3.24) * 1.19 = $3.8556 -> $3.86 rounded
-
UNIT_PRICE_LEVEL
Taxes are calculated on the unit price before multiplying by the quantity.
For example,
($1.08 * 1.19 = $1.2852 -> $1.29 rounded) * 3 = $3.87
-
-
Method Details
-
getJsonName
String getJsonName()the JSON value- Specified by:
getJsonName
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- json value
-
name
String name()the enum value- Specified by:
name
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- name
-
toString
String toString()convert value to string -
findEnum
factory method for a enum value of TaxCalculationMode 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
-