public class SpecificItemChoice extends Object
ItemChoice
is determined to be a ItemChoiceTargetType.SPECIFIC_PRODUCTS
or
ItemChoiceTargetType.SPECIFIC_VARIANTS
, this holds the relationship that the customer
should select fromConstructor and Description |
---|
SpecificItemChoice() |
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.
|
javax.money.MonetaryAmount |
getOverridePrice() |
String |
getPricingKey() |
String |
getPricingTargetType() |
Product |
getProduct()
If the
type is SpecificItemChoiceType.PRODUCT this holds the product for
this choice |
String |
getType()
Whether or not this item holds a product or a variant that the customer can select from
|
Variant |
getVariant()
If the
type is SpecificItemChoiceType.VARIANT this holds the variant for
this choice |
String |
getVariantParentProductId()
This field contains the id of the parent product of the specified
variant if the
type is SpecificItemChoiceType.VARIANT . |
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 |
setDiscountAllowed(boolean discountAllowed)
Dictates whether or not discounts are allowed to be applied to this add-on.
|
void |
setOverridePrice(javax.money.MonetaryAmount overridePrice) |
void |
setPricingKey(String pricingKey) |
void |
setPricingTargetType(String pricingTargetType) |
void |
setProduct(Product product)
If the
type is SpecificItemChoiceType.PRODUCT this holds the product for
this choice |
void |
setType(String type)
Whether or not this item holds a product or a variant that the customer can select from
|
void |
setVariant(Variant variant)
If the
type is SpecificItemChoiceType.VARIANT this holds the variant for
this choice |
void |
setVariantParentProductId(String variantParentProductId)
This field contains the id of the parent product of the specified
variant if the
type is SpecificItemChoiceType.VARIANT . |
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 getType()
SpecificItemChoiceType
public Product getProduct()
type
is SpecificItemChoiceType.PRODUCT
this holds the product for
this choicetype
is not
SpecificItemChoiceType.PRODUCT
public Variant getVariant()
type
is SpecificItemChoiceType.VARIANT
this holds the variant for
this choicetype
is not
SpecificItemChoiceType.VARIANT
variantParentProductId
public String getVariantParentProductId()
variant
if the
type
is SpecificItemChoiceType.VARIANT
.
This field is necessary because variants are a sub-resource of product and thus API callers cannot fetch them purely by variant id alone.
public boolean isDiscountAllowed()
public com.broadleafcommerce.cart.client.domain.AdditionalItemPricing getAdditionalItemPricing()
public Map<String,Object> getAttributes()
public void setType(String type)
type
- the type of item this is, usually from SpecificItemChoiceType
SpecificItemChoiceType
public void setProduct(Product product)
type
is SpecificItemChoiceType.PRODUCT
this holds the product for
this choiceproduct
- the product representing this choicepublic void setVariant(Variant variant)
type
is SpecificItemChoiceType.VARIANT
this holds the variant for
this choicevariant
- the variant representing this choicevariantParentProductId
public void setVariantParentProductId(String variantParentProductId)
variant
if the
type
is SpecificItemChoiceType.VARIANT
.
This field is necessary because variants are a sub-resource of product and thus API callers cannot fetch them purely by variant id alone.
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 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.