Class RecurringPriceDetail
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.RecurringPriceDetail
- All Implemented Interfaces:
Serializable
Represents the details related to a recurring (or subscription) price include the terms.
- Since:
- Offer Client 2.0.2
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
int
Returns the maximum number of periods possible in a year based on theperiodType
.int
Determines the maximum number of periods to recur during, normalized to a period type of "YEARLY".int
The frequency with which the recurringprice
should be charged., e.g., a value of 1 combined withperiodType
of MONTH would indicate to a subscription service that theprice
should be charged every 1 month.Defines the number of periods the price should recur.The period type for the price, e.g.javax.money.MonetaryAmount
getPrice()
The amount of the recurring price.protected int
Determines the factor when trying to determine the number of periods to use in discount calculations in order to normalize the term duration into the number of periods in terms of years.The length of the terms, e.g., if this is 36 andtermDurationType
is MONTHS, then theprice
should be charged for 36 months.The term duration type, e.g.int
hashCode()
void
setPeriodFrequency
(int periodFrequency) The frequency with which the recurringprice
should be charged., e.g., a value of 1 combined withperiodType
of MONTH would indicate to a subscription service that theprice
should be charged every 1 month.void
setPeriodLimit
(Integer periodLimit) Defines the number of periods the price should recur.void
setPeriodType
(String periodType) The period type for the price, e.g.void
setPrice
(javax.money.MonetaryAmount price) The amount of the recurring price.void
setTermDurationLength
(Integer termDurationLength) The length of the terms, e.g., if this is 36 andtermDurationType
is MONTHS, then theprice
should be charged for 36 months.void
setTermDurationType
(String termDurationType) The term duration type, e.g.toString()
-
Constructor Details
-
RecurringPriceDetail
public RecurringPriceDetail()
-
-
Method Details
-
getNumberOfPeriodsInAYear
public int getNumberOfPeriodsInAYear()Determines the maximum number of periods to recur during, normalized to a period type of "YEARLY". A value of0
indicates no limit.- Returns:
- The maximum number of periods to recur during, normalized to a period type of
"YEARLY". A value of
0
indicates no limit. - Since:
- Offer Client 2.0.2
-
getMaxPeriodsInAYear
public int getMaxPeriodsInAYear()Returns the maximum number of periods possible in a year based on theperiodType
.- Returns:
- The maximum number of periods possible in a year based on the
periodType
.
-
getRecurringPeriodNormalizationFactor
protected int getRecurringPeriodNormalizationFactor()Determines the factor when trying to determine the number of periods to use in discount calculations in order to normalize the term duration into the number of periods in terms of years.- Returns:
- The normalization factor
-
getPrice
public javax.money.MonetaryAmount getPrice()The amount of the recurring price. -
getPeriodFrequency
public int getPeriodFrequency()The frequency with which the recurringprice
should be charged., e.g., a value of 1 combined withperiodType
of MONTH would indicate to a subscription service that theprice
should be charged every 1 month.- See Also:
-
periodType
-
getPeriodType
The period type for the price, e.g. DAY, MONTH, YEAR- See Also:
-
periodFrequency
-
getPeriodLimit
Defines the number of periods the price should recur. Only applicable for non-standard price lists, particularly sales where a discount may be applied for the first 'n' periods after which the price reverts to a standard price list's.- See Also:
-
periodFrequency
periodType
-
getTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationType
is MONTHS, then theprice
should be charged for 36 months.- See Also:
-
termDurationType
-
getTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
setPrice
public void setPrice(javax.money.MonetaryAmount price) The amount of the recurring price. -
setPeriodFrequency
public void setPeriodFrequency(int periodFrequency) The frequency with which the recurringprice
should be charged., e.g., a value of 1 combined withperiodType
of MONTH would indicate to a subscription service that theprice
should be charged every 1 month.- See Also:
-
periodType
-
setPeriodType
The period type for the price, e.g. DAY, MONTH, YEAR- See Also:
-
periodFrequency
-
setPeriodLimit
Defines the number of periods the price should recur. Only applicable for non-standard price lists, particularly sales where a discount may be applied for the first 'n' periods after which the price reverts to a standard price list's.- See Also:
-
periodFrequency
periodType
-
setTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationType
is MONTHS, then theprice
should be charged for 36 months.- See Also:
-
termDurationType
-
setTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-