java.lang.Object
com.broadleafcommerce.orderoperation.domain.subscription.SubscriptionPeriod
All Implemented Interfaces:
Serializable

public class SubscriptionPeriod extends Object implements 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 Details

    • SubscriptionPeriod

      public SubscriptionPeriod()
  • Method Details

    • isShortenedPeriod

      public boolean isShortenedPeriod()
    • getPeriod

      public Integer getPeriod()
      The period number
    • getBillDate

      public Date getBillDate()
      The bill date of the period
    • getPeriodStartDate

      public Date getPeriodStartDate()
      The start date of the period
    • getPeriodEndDate

      public Date getPeriodEndDate()
      The end date of the period
    • 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.
    • getAttributes

      public Map<String,Object> getAttributes()
      Any additional attributes used to describe the period
    • setPeriod

      public void setPeriod(Integer period)
      The period number
    • setBillDate

      public void setBillDate(Date billDate)
      The bill date of the period
    • setPeriodStartDate

      public void setPeriodStartDate(Date periodStartDate)
      The start date of the period
    • setPeriodEndDate

      public void setPeriodEndDate(Date periodEndDate)
      The end date of the period
    • 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.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Any additional attributes used to describe the period
    • 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