Class SpecificItemChoiceVariantPricingOverride
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.SpecificItemChoiceVariantPricingOverride
- All Implemented Interfaces:
Priceable,Serializable
public class SpecificItemChoiceVariantPricingOverride
extends Object
implements Serializable, Priceable
Represents a pricing override to be used for a dependent item (like a warranty) if a specific
variant of the parent product is added as the dependent's parent. For instance, this could be a
pricing override for a warranty where the price is increased if a more expensive variant is
selected than the default or base variant.
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe price to use for this item when the related variant is selected.com.broadleafcommerce.pricing.client.domain.PriceInfoSummary of thepricing informationfor this pricing override.System-wide unique identifier to configure specific pricing for the choice.ID of the variant this pricing should be used with.inthashCode()voidsetOverridePrice(javax.money.MonetaryAmount overridePrice) The price to use for this item when the related variant is selected.voidsetPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo) Summary of thepricing informationfor this pricing override.voidsetPricingKey(String pricingKey) System-wide unique identifier to configure specific pricing for the choice.voidsetVariantId(String variantId) ID of the variant this pricing should be used with.toString()
-
Constructor Details
-
SpecificItemChoiceVariantPricingOverride
public SpecificItemChoiceVariantPricingOverride()
-
-
Method Details
-
getVariantId
ID of the variant this pricing should be used with.- Returns:
- ID of the variant this pricing should be used with.
-
getPricingKey
System-wide unique identifier to configure specific pricing for the choice. Relevant if pricing data is managed in a separate system or data store, like the Broadleaf pricing services.- Returns:
- a unique key to identify this choice
-
getOverridePrice
public javax.money.MonetaryAmount getOverridePrice()The price to use for this item when the related variant is selected.- Returns:
- The price to use for this item when the related variant is selected.
-
getPriceInfo
public com.broadleafcommerce.pricing.client.domain.PriceInfo getPriceInfo()Summary of thepricing informationfor this pricing override. This is more detailed thanoverridePricesince it includes the price type and potentially other prices or cost.- Specified by:
getPriceInfoin interfacePriceable- Returns:
- Summary of the
pricing informationfor this pricing override.
-
setVariantId
ID of the variant this pricing should be used with.- Parameters:
variantId- ID of the variant this pricing should be used with.
-
setPricingKey
System-wide unique identifier to configure specific pricing for the choice. Relevant if pricing data is managed in a separate system or data store, like the Broadleaf pricing services.- Parameters:
pricingKey- a unique key to identify this choice (usually a UUID)
-
setOverridePrice
public void setOverridePrice(javax.money.MonetaryAmount overridePrice) The price to use for this item when the related variant is selected.- Parameters:
The- price to use for this item when the related variant is selected.
-
setPriceInfo
public void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo) Summary of thepricing informationfor this pricing override. This is more detailed thanoverridePricesince it includes the price type and potentially other prices or cost.- Specified by:
setPriceInfoin interfacePriceable- Parameters:
price- Summary of thepricing informationfor this pricing override.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-