Class ProductTerm
java.lang.Object
com.broadleafcommerce.cartoperation.domain.ProductTerm
- All Implemented Interfaces:
Serializable
Represents one of the possible terms for a
Product that impacts pricing, e.g., 12 Months,
24 Months, 36 Months, for which special pricing is available. This is common for more expensive
items like phones where someone may pay the full price upfront (no terms) or be offered a
contract to pay for the phone over 36 Months.
This is primarily useful for validating the terms chosen in an AddItemRequest.
- Since:
- Cart Operation Service 2.2.0, Release Train 2.2.0
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
CartItem.getTermDurationLength()CartItem.getTermDurationType()CartItem.getRecurringPrice()PriceInfo.getRecurringPrice()PriceableTarget.getTermDurationType()PriceableTarget.getTermDurationLength()- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThis flag indicates whether this subscription'sendOfTermStrategycan be modified after declaration on the subscription.intThe term duration length.The term duration type, e.g.Indicates the action to be performed at the end of term.inthashCode()booleanWhether this is the default term configured for aProduct.voidsetAllowEndOfTermStrategyModification(Boolean allowEndOfTermStrategyModification) This flag indicates whether this subscription'sendOfTermStrategycan be modified after declaration on the subscription.voidsetDefault(boolean isDefault) Whether this is the default term configured for aProduct.voidsetDurationLength(int durationLength) The term duration length.voidsetDurationType(String durationType) The term duration type, e.g.voidsetEndOfTermStrategy(String endOfTermStrategy) Indicates the action to be performed at the end of term.toString()
-
Constructor Details
-
ProductTerm
public ProductTerm()
-
-
Method Details
-
getDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS. -
getDurationLength
public int getDurationLength()The term duration length. -
isDefault
public boolean isDefault()Whether this is the default term configured for aProduct. -
getEndOfTermStrategy
Indicates the action to be performed at the end of term.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
getAllowEndOfTermStrategyModification
This flag indicates whether this subscription'sendOfTermStrategycan be modified after declaration on the subscription.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
setDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS. -
setDurationLength
public void setDurationLength(int durationLength) The term duration length. -
setDefault
public void setDefault(boolean isDefault) Whether this is the default term configured for aProduct. -
setEndOfTermStrategy
Indicates the action to be performed at the end of term.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
setAllowEndOfTermStrategyModification
This flag indicates whether this subscription'sendOfTermStrategycan be modified after declaration on the subscription.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-