Interface TaxMode
- All Superinterfaces:
JsonEnum
- All Known Implementing Classes:
TaxMode.TaxModeEnum
Indicates how taxes are set on the Cart.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaxMode
factory method for a enum value of TaxMode if no enum has been found an anonymous instance will be createdfindEnumViaJsonName
(String jsonName) method to find enum using the JSON valuethe JSON valuename()
the enum valuetoString()
convert value to stringstatic TaxMode[]
values()
possible enum values
-
Field Details
-
PLATFORM
Tax Rates are selected automatically from the TaxCategories based on the Cart
shippingAddress
. This is the default tax mode for a new Cart.The
totalNet
,totalGross
, andtaxPortions
fields are calculated based on thetaxRoundingMode
.
-
EXTERNAL
Tax Rates are set externally with ExternalTaxRateDraft. A Cart can be ordered only if all Line Items, Custom Line Items, and the Shipping Method have an external Tax Rate set.
The
totalNet
,totalGross
, andtaxPortions
fields are calculated based on thetaxRoundingMode
.
-
EXTERNAL_AMOUNT
Tax amounts, Tax Rates, and tax portions are set externally with ExternalTaxAmountDraft. A Cart can be ordered only if the Cart and all Line Items, Custom Line Items, and the Shipping Method have an external tax amount and rate set.
The Cart
taxedPrice
field must be set using Set Cart Total Tax. The CarttaxedShippingPrice
field is always empty in this tax mode.Price-affecting update actions on Carts require external recalculation of the total gross price. In these cases,
taxedPrice
andtaxRate
are removed and must be set again. The order in which the individual update actions are issued is important:Issue the price-affecting update action(s).
Update the tax amounts using Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount.
If the update action changes the Line Item price, for Line Items with
Platform
LineItemPriceMode, you must issue Set LineItem TaxAmount in a separate request.If the update action removes the externally set tax amount for the Shipping Method, you must issue Set ShippingMethod TaxAmount in a separate request.
Update the
taxedPrice
on Cart using Set Cart Total Tax.
Tax-inclusive pricing should be avoided when using TaxMode
ExternalAmount
becausetaxedItemPrice.totalNet
is automatically set by the platform to the Line Item'stotalPrice
.
-
DISABLED
- No taxes are added to the Cart.
- This tax mode cannot be set on the My Carts API.
-
-
Method Details
-
getJsonName
String getJsonName()the JSON value- Specified by:
getJsonName
in 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 TaxMode 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
-