public class ItemChoice extends Object implements Serializable
ProductOptionType.ITEM_CHOICE.ProductOption,
Serialized Form| Constructor and Description |
|---|
ItemChoice() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
Object value)
Takes in any additional attributes passed in the request not matching any defined properties.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
com.broadleafcommerce.cart.client.domain.AdditionalItemPricing |
getAdditionalItemPricing() |
Map<String,Object> |
getAttribute()
Return any additional attributes passed in the request not matching any defined properties.
|
Map<String,Object> |
getAttributes()
Map holding any additional attributes passed in the request not matching any defined
properties.
|
Category |
getCategory()
The
Category which the add-on will be chosen from by the customer if the
selection is ItemChoiceTargetType.CATEGORY. |
String |
getChoiceKey()
The key to use to relate to this
ItemChoice when configuring cart items. |
Integer |
getMaximumQuantity()
The maximum amount of this item that a customer can purchase at a time.
|
Integer |
getMinimumQuantity()
The minimum amount of the item that a customer must purchase.
|
javax.money.MonetaryAmount |
getOverridePrice() |
String |
getPricingKey() |
String |
getPricingTargetType() |
String |
getSelectionType()
Describes restrictions placed on the customer's ability to select items from the targeted
set.
|
List<SpecificItemChoice> |
getSpecificChoices()
If the
selectionType is ItemChoiceTargetType.SPECIFIC_PRODUCTS or
ItemChoiceTargetType.SPECIFIC_VARIANTS this holds the manually-curated options that
the customer can choose from. |
SpecificItemChoice |
getSpecificItemChoice() |
String |
getTargetType()
Identifies the type of items that a customer can choose from, whether specific products,
specific variants, or products from a specific category.
|
int |
hashCode() |
boolean |
isDiscountAllowed()
Dictates whether or not discounts are allowed to be applied to this add-on.
|
void |
setAdditionalItemPricing(com.broadleafcommerce.cart.client.domain.AdditionalItemPricing additionalItemPricing) |
void |
setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined
properties.
|
void |
setCategory(Category category)
The
Category which the add-on will be chosen from by the customer if the
selection is ItemChoiceTargetType.CATEGORY. |
void |
setChoiceKey(String choiceKey)
The key to use to relate to this
ItemChoice when configuring cart items. |
void |
setDiscountAllowed(boolean discountAllowed)
Dictates whether or not discounts are allowed to be applied to this add-on.
|
void |
setMaximumQuantity(Integer maximumQuantity)
The maximum amount of this item that a customer can purchase at a time.
|
void |
setMinimumQuantity(Integer minimumQuantity)
The minimum amount of the item that a customer must purchase.
|
void |
setOverridePrice(javax.money.MonetaryAmount overridePrice) |
void |
setPricingKey(String pricingKey) |
void |
setPricingTargetType(String pricingTargetType) |
void |
setSelectionType(String selectionType)
Describes restrictions placed on the customer's ability to select items from the targeted
set.
|
void |
setSpecificChoices(List<SpecificItemChoice> specificChoices)
If the
selectionType is ItemChoiceTargetType.SPECIFIC_PRODUCTS or
ItemChoiceTargetType.SPECIFIC_VARIANTS this holds the manually-curated options that
the customer can choose from. |
void |
setSpecificItemChoice(SpecificItemChoice specificItemChoice) |
void |
setTargetType(String targetType)
Identifies the type of items that a customer can choose from, whether specific products,
specific variants, or products from a specific category.
|
String |
toString() |
public void addAttribute(String name, Object value)
name - Name of the additional attributevalue - Value of the additional attributepublic Map<String,Object> getAttribute()
public String getChoiceKey()
ItemChoice when configuring cart items.ItemChoice when configuring cart items.public String getTargetType()
ItemChoiceTargetType of this add-onItemChoiceTargetTypepublic String getSelectionType()
ItemChoiceSelectionType of this item choiceItemChoiceSelectionTypepublic Integer getMaximumQuantity()
public Integer getMinimumQuantity()
IncludedProduct.public boolean isDiscountAllowed()
public com.broadleafcommerce.cart.client.domain.AdditionalItemPricing getAdditionalItemPricing()
public Category getCategory()
Category which the add-on will be chosen from by the customer if the
selection is ItemChoiceTargetType.CATEGORY.null if
getSelectionType() is not ItemChoiceTargetType.CATEGORYpublic List<SpecificItemChoice> getSpecificChoices()
selectionType is ItemChoiceTargetType.SPECIFIC_PRODUCTS or
ItemChoiceTargetType.SPECIFIC_VARIANTS this holds the manually-curated options that
the customer can choose from. This also allows for specific override pricing on an
item-by-item basisItemChoiceTargetType.SPECIFIC_PRODUCTS or
ItemChoiceTargetType.SPECIFIC_VARIANTS value of the selectionTypepublic SpecificItemChoice getSpecificItemChoice()
public Map<String,Object> getAttributes()
public void setChoiceKey(String choiceKey)
ItemChoice when configuring cart items.choiceKey - The key to use to relate to this ItemChoice when configuring cart
items.public void setTargetType(String targetType)
type - the ItemChoiceTargetType of this add-onItemChoiceTargetTypepublic void setSelectionType(String selectionType)
selectionType - the ItemChoiceSelectionType of this item choiceItemChoiceSelectionTypepublic void setMaximumQuantity(Integer maximumQuantity)
maximumQuantity - the maximum quantity of the add-on's target product(s) that can be
addedpublic void setMinimumQuantity(Integer minimumQuantity)
IncludedProduct.minimumQuantity - the minimum quantity of the add-on's target product(s)public void setDiscountAllowed(boolean discountAllowed)
discountAllowed - true if discounts are allowed to be applied to this add-on, false
otherwisepublic void setAdditionalItemPricing(com.broadleafcommerce.cart.client.domain.AdditionalItemPricing additionalItemPricing)
public void setCategory(Category category)
Category which the add-on will be chosen from by the customer if the
selection is ItemChoiceTargetType.CATEGORY.category - the category from which the add-on will be chosen frompublic void setSpecificChoices(List<SpecificItemChoice> specificChoices)
selectionType is ItemChoiceTargetType.SPECIFIC_PRODUCTS or
ItemChoiceTargetType.SPECIFIC_VARIANTS this holds the manually-curated options that
the customer can choose from. This also allows for specific override pricing on an
item-by-item basisspecificChoices - manually-curated options for the user to choose from for this addonpublic void setSpecificItemChoice(SpecificItemChoice specificItemChoice)
public void setAttributes(Map<String,Object> attributes)
protected boolean canEqual(Object other)
public javax.money.MonetaryAmount getOverridePrice()
public String getPricingKey()
public String getPricingTargetType()
public void setOverridePrice(javax.money.MonetaryAmount overridePrice)
public void setPricingKey(String pricingKey)
public void setPricingTargetType(String pricingTargetType)
Copyright © 2021. All rights reserved.