public enum LineItemMode extends Enum<LineItemMode> implements SphereEnumeration
| Enum Constant and Description |
|---|
GIFT_LINE_ITEM
The line item was added automatically, because a
GiftLineItemCartDiscountValue has added a free gift to the cart. |
STANDARD
The line item was added during cart creation
CartCreateCommand
or with the update action AddLineItem. |
| Modifier and Type | Method and Description |
|---|---|
static LineItemMode |
ofSphereValue(String value) |
static LineItemMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LineItemMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOffindBySphereName, name, toSphereNamepublic static final LineItemMode STANDARD
CartCreateCommand
or with the update action AddLineItem.
Its quantity can be changed without restrictions.public static final LineItemMode GIFT_LINE_ITEM
GiftLineItemCartDiscountValue has added a free gift to the cart.
The quantity can not be increased and it won't be merged when the same product variant is added.
If the gift is removed RemoveLineItem, an entry is added to the Cart.getRefusedGifts()
and the discount won't be applied again to the cart. The price can not be externally changed via SetLineItemTotalPrice.public static LineItemMode[] values()
for (LineItemMode c : LineItemMode.values()) System.out.println(c);
public static LineItemMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static LineItemMode ofSphereValue(String value)