Class IncludedProduct
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.domain.IncludedProduct
-
- All Implemented Interfaces:
Serializable
public class IncludedProduct extends Object implements Serializable
- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IncludedProduct()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.Long
getDisplayOrder()
Defines the display position of this included product in relation to other included products.String
getLabel()
The user-facing label that describes this included product.javax.money.MonetaryAmount
getOverridePrice()
String
getPricingKey()
String
getPricingTargetType()
Product
getProduct()
This field contains the specified product if thetype
isIncludedProductType.PRODUCT
.int
getQuantity()
The value of the fixed quantity.String
getType()
String
getValidationKey()
Variant
getVariant()
This field contains the specified variant if thetype
isIncludedProductType.VARIANT
.String
getVariantParentProductId()
This field contains the id of the parent product of the specifiedvariant
if thetype
isIncludedProductType.VARIANT
.int
hashCode()
boolean
isDiscountAllowed()
Dictates whether or not discounts are allowed to be applied to this included product.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 included product.void
setDisplayOrder(Long displayOrder)
Defines the display position of this included product in relation to other included products.void
setLabel(String label)
The user-facing label that describes this included product.void
setOverridePrice(javax.money.MonetaryAmount overridePrice)
void
setPricingKey(String pricingKey)
void
setPricingTargetType(String pricingTargetType)
void
setProduct(Product product)
This field contains the specified product if thetype
isIncludedProductType.PRODUCT
.void
setQuantity(int quantity)
The value of the fixed quantity.void
setType(String type)
void
setVariant(Variant variant)
This field contains the specified variant if thetype
isIncludedProductType.VARIANT
.void
setVariantParentProductId(String variantParentProductId)
This field contains the id of the parent product of the specifiedvariant
if thetype
isIncludedProductType.VARIANT
.String
toString()
-
-
-
Method Detail
-
addAttribute
public void addAttribute(String name, Object value)
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name
- Name of the additional attributevalue
- Value of the additional attribute
-
getAttribute
public Map<String,Object> getAttribute()
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getValidationKey
public String getValidationKey()
-
getType
public String getType()
- Returns:
- the
IncludedProductType
of this included product - See Also:
IncludedProductType
-
getLabel
public String getLabel()
The user-facing label that describes this included product.- Returns:
- the user-facing label that describes this included product
-
getDisplayOrder
public Long getDisplayOrder()
Defines the display position of this included product in relation to other included products.- Returns:
- the order in which this included product should be displayed relative to other included products
-
getProduct
public Product getProduct()
This field contains the specified product if thetype
isIncludedProductType.PRODUCT
.- Returns:
- the product to use if this included product is of type
IncludedProductType.PRODUCT
-
getVariant
public Variant getVariant()
This field contains the specified variant if thetype
isIncludedProductType.VARIANT
.- Returns:
- the variant to use if this included product is of type
IncludedProductType.VARIANT
- See Also:
variantParentProductId
-
getVariantParentProductId
public String getVariantParentProductId()
This field contains the id of the parent product of the specifiedvariant
if thetype
isIncludedProductType.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.
-
getAdditionalItemPricing
public com.broadleafcommerce.cart.client.domain.AdditionalItemPricing getAdditionalItemPricing()
-
isDiscountAllowed
public boolean isDiscountAllowed()
Dictates whether or not discounts are allowed to be applied to this included product.- Returns:
- true if discounts are allowed to be applied to this included product, false otherwise
-
getQuantity
public int getQuantity()
The value of the fixed quantity.- Returns:
- the fixed quantity of the included product's target product(s) that can be added
-
getAttributes
public Map<String,Object> getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.
-
setType
public void setType(String type)
- Parameters:
type
- theIncludedProductType
of this included product- See Also:
IncludedProductType
-
setLabel
public void setLabel(String label)
The user-facing label that describes this included product.- Parameters:
label
- the user-facing label that describes this included product
-
setDisplayOrder
public void setDisplayOrder(Long displayOrder)
Defines the display position of this included product in relation to other included products.- Parameters:
displayOrder
- the order in which this included product should be displayed relative to other included products
-
setProduct
public void setProduct(Product product)
This field contains the specified product if thetype
isIncludedProductType.PRODUCT
.- Parameters:
product
- the product to use if this included product is of typeIncludedProductType.PRODUCT
-
setVariant
public void setVariant(Variant variant)
This field contains the specified variant if thetype
isIncludedProductType.VARIANT
.- Parameters:
variant
- the variant to use if this included product is of typeIncludedProductType.VARIANT
- See Also:
variantParentProductId
-
setVariantParentProductId
public void setVariantParentProductId(String variantParentProductId)
This field contains the id of the parent product of the specifiedvariant
if thetype
isIncludedProductType.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.
-
setAdditionalItemPricing
public void setAdditionalItemPricing(com.broadleafcommerce.cart.client.domain.AdditionalItemPricing additionalItemPricing)
-
setDiscountAllowed
public void setDiscountAllowed(boolean discountAllowed)
Dictates whether or not discounts are allowed to be applied to this included product.- Parameters:
discountAllowed
- true if discounts are allowed to be applied to this included product, false otherwise
-
setQuantity
public void setQuantity(int quantity)
The value of the fixed quantity.- Parameters:
fixedQuantity
- the fixed quantity of the included product's target product(s) that can be added
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.
-
canEqual
protected boolean canEqual(Object other)
-
getOverridePrice
public javax.money.MonetaryAmount getOverridePrice()
-
getPricingKey
public String getPricingKey()
-
getPricingTargetType
public String getPricingTargetType()
-
setOverridePrice
public void setOverridePrice(javax.money.MonetaryAmount overridePrice)
-
setPricingKey
public void setPricingKey(String pricingKey)
-
setPricingTargetType
public void setPricingTargetType(String pricingTargetType)
-
-