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 boolean
boolean
int
The term duration length.The term duration type, e.g.int
hashCode()
boolean
Whether this is the default term configured for aProduct
.void
setDefault
(boolean isDefault) Whether this is the default term configured for aProduct
.void
setDurationLength
(int durationLength) The term duration length.void
setDurationType
(String durationType) The term duration type, e.g.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
. -
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
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-