Class Product
java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.Product
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.money.CurrencyConsumer,SubscriptionReferencedItem,Serializable,javax.money.CurrencySupplier
public class Product
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer, SubscriptionReferencedItem
The product containing the details related to subscriptions.
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.javax.money.CurrencyUnitCurrency for all of the prices on this productList of references (usually IDs) to items that this can downgrade to.The list of ids of the product that this product can downgrade to.getId()The id of the product.The maximum count of this product that must be added in a cart.The max number of active subscriptions that can be created for this product.The minimum count of this product that must be added in a cart.getName()Name of this product.Drives additional information that the customer should enter when purchasing this product.The number of days after which a downgrade is not allowed, until the window re-opens at the next billing cycle.List of references (usually IDs) to items that this can upgrade to.The list of ids of the product that this product can upgrade to.inthashCode()booleanWhether the billing frequency can be changed after initial purchase.booleanWhether quantity can be edited after initial purchase.voidsetAllowChangingBillingFrequency(boolean allowChangingBillingFrequency) Whether the billing frequency can be changed after initial purchase.voidsetAllowQtyEditAfterInitialPurchase(boolean allowQtyEditAfterInitialPurchase) Whether quantity can be edited after initial purchase.voidsetAttributes(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrency(javax.money.CurrencyUnit currency) Currency for all of the prices on this productvoidsetDowngradeProductIds(List<String> downgradeProductIds) The list of ids of the product that this product can downgrade to.voidThe id of the product.voidsetMaximumThreshold(Integer maximumThreshold) The maximum count of this product that must be added in a cart.voidsetMaxNumberOfActiveSubscriptions(Integer maxNumberOfActiveSubscriptions) The max number of active subscriptions that can be created for this product.voidsetMinimumThreshold(Integer minimumThreshold) The minimum count of this product that must be added in a cart.voidName of this product.voidsetOptions(List<ProductOption> options) Drives additional information that the customer should enter when purchasing this product.voidsetRestrictDowngradeAfterDays(Integer restrictDowngradeAfterDays) The number of days after which a downgrade is not allowed, until the window re-opens at the next billing cycle.voidsetUpgradeProductIds(List<String> upgradeProductIds) The list of ids of the product that this product can upgrade to.toString()
-
Constructor Details
-
Product
public Product()
-
-
Method Details
-
addAttribute
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
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.
-
getUpgradeOptionReferences
Description copied from interface:SubscriptionReferencedItemList of references (usually IDs) to items that this can upgrade to.- Specified by:
getUpgradeOptionReferencesin interfaceSubscriptionReferencedItem- Returns:
- List of references (usually IDs) to items that this can upgrade to.
-
getDowngradeOptionReferences
Description copied from interface:SubscriptionReferencedItemList of references (usually IDs) to items that this can downgrade to.- Specified by:
getDowngradeOptionReferencesin interfaceSubscriptionReferencedItem- Returns:
- List of references (usually IDs) to items that this can downgrade to.
-
getId
The id of the product.- Specified by:
getIdin interfaceSubscriptionReferencedItem- Returns:
- The ID used by the system to identify this item
-
getName
Name of this product. -
getCurrency
public javax.money.CurrencyUnit getCurrency()Currency for all of the prices on this product- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier
-
getMinimumThreshold
The minimum count of this product that must be added in a cart.- Specified by:
getMinimumThresholdin interfaceSubscriptionReferencedItem- Returns:
- the minimum count of this item that must be added in a cart
-
getMaximumThreshold
The maximum count of this product that must be added in a cart.- Specified by:
getMaximumThresholdin interfaceSubscriptionReferencedItem- Returns:
- the maximum count of this item that must be added in a cart
-
getOptions
Drives additional information that the customer should enter when purchasing this product. This can be in the form of additional variations, additional items that can be bundled with this product or simply more information that the customer needs to enter about what they are purchasing (like a personalized message).- Returns:
- different options that the user can configure to further refine their purchase.
-
getUpgradeProductIds
The list of ids of the product that this product can upgrade to. -
getDowngradeProductIds
The list of ids of the product that this product can downgrade to. -
getRestrictDowngradeAfterDays
The number of days after which a downgrade is not allowed, until the window re-opens at the next billing cycle.nullmeans no restriction.- Specified by:
getRestrictDowngradeAfterDaysin interfaceSubscriptionReferencedItem- Returns:
- The number of days after which a downgrade is not allowed.
-
getMaxNumberOfActiveSubscriptions
The max number of active subscriptions that can be created for this product.nullmeans no restriction.- Specified by:
getMaxNumberOfActiveSubscriptionsin interfaceSubscriptionReferencedItem- Returns:
- The max number of active subscriptions that can be created for this item.
-
isAllowQtyEditAfterInitialPurchase
public boolean isAllowQtyEditAfterInitialPurchase()Whether quantity can be edited after initial purchase. -
isAllowChangingBillingFrequency
public boolean isAllowChangingBillingFrequency()Whether the billing frequency can be changed after initial purchase. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setId
The id of the product. -
setName
Name of this product. -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) Currency for all of the prices on this product- Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer
-
setMinimumThreshold
The minimum count of this product that must be added in a cart. -
setMaximumThreshold
The maximum count of this product that must be added in a cart. -
setOptions
Drives additional information that the customer should enter when purchasing this product. This can be in the form of additional variations, additional items that can be bundled with this product or simply more information that the customer needs to enter about what they are purchasing (like a personalized message).- Parameters:
options- the options for this product
-
setUpgradeProductIds
The list of ids of the product that this product can upgrade to. -
setDowngradeProductIds
The list of ids of the product that this product can downgrade to. -
setRestrictDowngradeAfterDays
The number of days after which a downgrade is not allowed, until the window re-opens at the next billing cycle.nullmeans no restriction. -
setMaxNumberOfActiveSubscriptions
The max number of active subscriptions that can be created for this product.nullmeans no restriction. -
setAllowQtyEditAfterInitialPurchase
public void setAllowQtyEditAfterInitialPurchase(boolean allowQtyEditAfterInitialPurchase) Whether quantity can be edited after initial purchase. -
setAllowChangingBillingFrequency
public void setAllowChangingBillingFrequency(boolean allowChangingBillingFrequency) Whether the billing frequency can be changed after initial purchase. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-