Class PeriodDefinition

java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.PeriodDefinition
All Implemented Interfaces:
Serializable

public class PeriodDefinition extends Object implements Serializable
Describes subscription billing period, including the start date, end date, & when the customer will be billed.
See Also:
  • Constructor Details

    • PeriodDefinition

      public PeriodDefinition()
  • Method Details

    • isShortenedPeriod

      public boolean isShortenedPeriod()
    • getPeriodNumber

      public int getPeriodNumber()
      The period number of the billing period.
    • getBillDate

      public Instant getBillDate()
      The date on which the customer is expected to be billed.
    • getPeriodStartDate

      public Instant getPeriodStartDate()
      The date describing the beginning of the billing period that is being billed for.
    • getPeriodEndDate

      public Instant getPeriodEndDate()
      The date describing the end of the billing period that is being billed for.
    • getShortenedPeriodReason

      public String getShortenedPeriodReason()
      Describes the reason that the period was shortened.
    • getNumberOfDaysInShortenedPeriod

      public Long getNumberOfDaysInShortenedPeriod()
      If a period is shortened (typically by the Subscription.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 with getNumberOfDaysInFullPeriod() to prorate subscription pricing for the subscription period. numberOfDaysInShortenedPeriod divided by getNumberOfDaysInFullPeriod() gives the proration rate.
    • getNumberOfDaysInFullPeriod

      public Long getNumberOfDaysInFullPeriod()
      If a period is shortened (typically by the Subscription.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 with getNumberOfDaysInShortenedPeriod() to prorate subscription pricing for the subscription period. numberOfDaysInShortenedPeriod divided by getNumberOfDaysInFullPeriod() gives the proration rate.
    • setPeriodNumber

      public void setPeriodNumber(int periodNumber)
      The period number of the billing period.
    • setBillDate

      public void setBillDate(Instant billDate)
      The date on which the customer is expected to be billed.
    • setPeriodStartDate

      public void setPeriodStartDate(Instant periodStartDate)
      The date describing the beginning of the billing period that is being billed for.
    • setPeriodEndDate

      public void setPeriodEndDate(Instant periodEndDate)
      The date describing the end of the billing period that is being billed for.
    • setShortenedPeriodReason

      public void setShortenedPeriodReason(String shortenedPeriodReason)
      Describes the reason that the period was shortened.
    • setNumberOfDaysInShortenedPeriod

      public void setNumberOfDaysInShortenedPeriod(Long numberOfDaysInShortenedPeriod)
      If a period is shortened (typically by the Subscription.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 with getNumberOfDaysInFullPeriod() to prorate subscription pricing for the subscription period. numberOfDaysInShortenedPeriod divided by getNumberOfDaysInFullPeriod() gives the proration rate.
    • setNumberOfDaysInFullPeriod

      public void setNumberOfDaysInFullPeriod(Long numberOfDaysInFullPeriod)
      If a period is shortened (typically by the Subscription.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 with getNumberOfDaysInShortenedPeriod() to prorate subscription pricing for the subscription period. numberOfDaysInShortenedPeriod divided by getNumberOfDaysInFullPeriod() gives the proration rate.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object