Class PeriodDefinition
java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.PeriodDefinition
- All Implemented Interfaces:
Serializable
Describes subscription billing period, including the start date, end date, & when the customer
will be billed.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe date on which the customer is expected to be billed.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.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 date describing the end of the billing period that is being billed for.intThe period number of the billing period.The date describing the beginning of the billing period that is being billed for.Describes the reason that the period was shortened.inthashCode()booleanvoidsetBillDate(Instant billDate) The date on which the customer is expected to be billed.voidsetNumberOfDaysInFullPeriod(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.voidsetPeriodEndDate(Instant periodEndDate) The date describing the end of the billing period that is being billed for.voidsetPeriodNumber(int periodNumber) The period number of the billing period.voidsetPeriodStartDate(Instant periodStartDate) The date describing the beginning of the billing period that is being billed for.voidsetShortenedPeriodReason(String shortenedPeriodReason) Describes the reason that the period was shortened.toString()
-
Constructor Details
-
PeriodDefinition
public PeriodDefinition()
-
-
Method Details
-
isShortenedPeriod
public boolean isShortenedPeriod() -
getPeriodNumber
public int getPeriodNumber()The period number of the billing period. -
getBillDate
The date on which the customer is expected to be billed. -
getPeriodStartDate
The date describing the beginning of the billing period that is being billed for. -
getPeriodEndDate
The date describing the end of the billing period that is being billed for. -
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. -
setPeriodNumber
public void setPeriodNumber(int periodNumber) The period number of the billing period. -
setBillDate
The date on which the customer is expected to be billed. -
setPeriodStartDate
The date describing the beginning of the billing period that is being billed for. -
setPeriodEndDate
The date describing the end of the billing period that is being billed for. -
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. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-