Enum Class DiscountTargetType
java.lang.Object
java.lang.Enum<DiscountTargetType>
com.broadleafcommerce.promotion.offer.domain.type.DiscountTargetType
- All Implemented Interfaces:
Serializable
,Comparable<DiscountTargetType>
,Constable
Enumerates the kinds of entities to which an
Discount.getAmount()
mount offer's discount}
can apply. By default an offer's discount can apply to either the prices of an order or
individual order items or to the fulfillment cost (e.g., shipping cost) of either individual
items or a group of items that share fulfillment info (i.e., a fulfillment group).- Author:
- Chad Harchar (charchar)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDetermines that the offer's discount should apply to the cost of fulfilling a group of items with the same fulfillment info (i.e., fulfillment group).The offer's discount should apply to the cost of fulfilling individual items.Determines that the offer's discount should apply to the order's price as a whole rather than individual items separately.Determines that the offer's discount should apply to individual order items' prices separately.The offer's discount results in a VOUCHER that can be applied to a future offer -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static boolean
static boolean
isOrderItemOffer
(String type) static boolean
isOrderOffer
(String type) static boolean
isVoucherOffer
(String type) static DiscountTargetType
Returns the enum constant of this class with the specified name.static DiscountTargetType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORDER
Determines that the offer's discount should apply to the order's price as a whole rather than individual items separately. That is, it will apply to the order subtotal, excluding no items (contrast withORDER_ITEM
). -
ORDER_ITEM
Determines that the offer's discount should apply to individual order items' prices separately. That is, it will apply only to certain item subtotals and not others (contrast withORDER
). -
FULFILLMENT_GROUP
Determines that the offer's discount should apply to the cost of fulfilling a group of items with the same fulfillment info (i.e., fulfillment group). This means that if a group of items share such info as destination address and payment method, the cost of fulfilling that group of items is discounted as a whole (contrast withFULFILLMENT_GROUP_ITEM
) -
FULFILLMENT_GROUP_ITEM
The offer's discount should apply to the cost of fulfilling individual items. That is and in contrast toFULFILLMENT_GROUP
, only a single item's shipping is discounted rather than a whole group of items being shipped to the same place with the same billing info. -
VOUCHER
The offer's discount results in a VOUCHER that can be applied to a future offer
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isOrderOffer
-
isOrderItemOffer
-
isFulfillmentGroupOffer
-
isFulfillmentGroupItemOffer
-
isVoucherOffer
-