Class SubscriptionPeriod
java.lang.Object
com.broadleafcommerce.orderoperation.domain.subscription.SubscriptionPeriod
- All Implemented Interfaces:
Serializable
Simple object describing the start, end, & bill dates of a subscription period.
- Since:
- Order Operation Service 2.2.0, Release Train 2.3.0
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAny additional attributes used to describe the periodThe bill date of the periodIf a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the full period - i.e.If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the shortened period.The period numberThe end date of the periodThe start date of the periodDescribes the reason that the period was shortened.inthashCode()booleanvoidsetAttributes(Map<String, Object> attributes) Any additional attributes used to describe the periodvoidsetBillDate(Date billDate) The bill date of the periodvoidsetNumberOfDaysInFullPeriod(Long numberOfDaysInFullPeriod) If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the full period - i.e.voidsetNumberOfDaysInShortenedPeriod(Long numberOfDaysInShortenedPeriod) If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the shortened period.voidThe period numbervoidsetPeriodEndDate(Date periodEndDate) The end date of the periodvoidsetPeriodStartDate(Date periodStartDate) The start date of the periodvoidsetShortenedPeriodReason(String shortenedPeriodReason) Describes the reason that the period was shortened.toString()
-
Constructor Details
-
SubscriptionPeriod
public SubscriptionPeriod()
-
-
Method Details
-
isShortenedPeriod
public boolean isShortenedPeriod() -
getPeriod
The period number -
getBillDate
The bill date of the period -
getPeriodStartDate
The start date of the period -
getPeriodEndDate
The end date of the period -
getShortenedPeriodReason
Describes the reason that the period was shortened. -
getNumberOfDaysInShortenedPeriod
If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the shortened period. Otherwise, this value will be null. If the period is shortened, this value should be used in combination withgetNumberOfDaysInFullPeriod()to prorate subscription pricing for the subscription period.numberOfDaysInShortenedPerioddivided bygetNumberOfDaysInFullPeriod()gives the proration rate. -
getNumberOfDaysInFullPeriod
If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the full period - i.e. the length of the period if it had not been shortened. Otherwise, this value will be null. If the period is shortened, this value should be used in combination withgetNumberOfDaysInShortenedPeriod()to prorate subscription pricing for the subscription period.numberOfDaysInShortenedPerioddivided bygetNumberOfDaysInFullPeriod()gives the proration rate. -
getAttributes
Any additional attributes used to describe the period -
setPeriod
The period number -
setBillDate
The bill date of the period -
setPeriodStartDate
The start date of the period -
setPeriodEndDate
The end date of the period -
setShortenedPeriodReason
Describes the reason that the period was shortened. -
setNumberOfDaysInShortenedPeriod
If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the shortened period. Otherwise, this value will be null. If the period is shortened, this value should be used in combination withgetNumberOfDaysInFullPeriod()to prorate subscription pricing for the subscription period.numberOfDaysInShortenedPerioddivided bygetNumberOfDaysInFullPeriod()gives the proration rate. -
setNumberOfDaysInFullPeriod
If a period is shortened (typically by theSubscription.getEndOfTermDate()occurring before the end of the period), then this value will describe the number of days in the full period - i.e. the length of the period if it had not been shortened. Otherwise, this value will be null. If the period is shortened, this value should be used in combination withgetNumberOfDaysInShortenedPeriod()to prorate subscription pricing for the subscription period.numberOfDaysInShortenedPerioddivided bygetNumberOfDaysInFullPeriod()gives the proration rate. -
setAttributes
Any additional attributes used to describe the period -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-