Interface LineItemMode
- All Superinterfaces:
io.vrap.rmf.base.client.JsonEnum
- All Known Implementing Classes:
LineItemMode.LineItemModeEnum
Indicates how a Line Item is added to a Cart.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
possible values of LineItemMode -
Field Summary
Modifier and TypeFieldDescriptionstatic final LineItemMode
The Line Item is added automatically by a Cart Discount with CartDiscountValueGiftLineItem.static final LineItemMode
The Line Item is added during Cart creation or using 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 is added during Cart creation or using the Add LineItem update action. The Line Item quantity can be changed without restriction.
-
GIFT_LINE_ITEM
The Line Item is added automatically by a Cart Discount with CartDiscountValueGiftLineItem.
The quantity cannot be increased, and it won't be merged when the same Line Item is added 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
the JSON value- Specified by:
getJsonName
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- json value
-
name
the enum value- Specified by:
name
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- name
-
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
-