Interface LineItemMode
- All Superinterfaces:
JsonEnum
- All Known Implementing Classes:
LineItemMode.LineItemModeEnum
Indicates how a Line Item was added to a Cart.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
possible values of LineItemMode -
Field Summary
Modifier and TypeFieldDescriptionstatic final LineItemMode
One Line Item was added automatically to a Cart by a Cart Discount with CartDiscountValueGiftLineItemDraft.static final LineItemMode
The Line Item was added during Cart creation or the Add LineItem update action. -
Method Summary
Modifier and TypeMethodDescriptionstatic LineItemMode
factory method for a enum value of LineItemMode if no enum has been found an anonymous instance will be createdstatic Optional<LineItemMode>
findEnumViaJsonName
(String jsonName) method to find enum using the JSON valuethe JSON valuename()
the enum valuetoString()
convert value to stringstatic LineItemMode[]
values()
possible enum values
-
Field Details
-
STANDARD
The Line Item was added during Cart creation or the Add LineItem update action. The Line Item quantity can be changed without restriction.
-
GIFT_LINE_ITEM
One Line Item was added automatically to a Cart by a Cart Discount with CartDiscountValueGiftLineItemDraft.
The quantity cannot be increased, and it won't be merged when adding the same Line Item to the Cart. If the gift is removed, an entry is added to the
refusedGifts
array and the discount won't be applied to the Cart. The price cannot be changed externally.All other updates, such as the ones related to Custom Fields, can be used.
-
-
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 LineItemMode 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
-