Class ProductTerm

java.lang.Object
com.broadleafcommerce.cartoperation.domain.ProductTerm
All Implemented Interfaces:
Serializable

public class ProductTerm extends Object implements Serializable
Represents one of the possible terms for a Product that impacts pricing, e.g., 12 Months, 24 Months, 36 Months, for which special pricing is available. This is common for more expensive items like phones where someone may pay the full price upfront (no terms) or be offered a contract to pay for the phone over 36 Months.

This is primarily useful for validating the terms chosen in an AddItemRequest.

Since:
Cart Operation Service 2.2.0, Release Train 2.2.0
Author:
Nathan Moore (nathandmoore)
See Also:
  • CartItem.getTermDurationLength()
  • CartItem.getTermDurationType()
  • CartItem.getRecurringPrice()
  • PriceInfo.getRecurringPrice()
  • PriceableTarget.getTermDurationType()
  • PriceableTarget.getTermDurationLength()
  • Serialized Form
  • Constructor Details

    • ProductTerm

      public ProductTerm()
  • Method Details

    • getDurationType

      public String getDurationType()
      The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.
    • getDurationLength

      public int getDurationLength()
      The term duration length.
    • isDefault

      public boolean isDefault()
      Whether this is the default term configured for a Product.
    • getEndOfTermStrategy

      public String getEndOfTermStrategy()
      Indicates the action to be performed at the end of term.
      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
    • getAllowEndOfTermStrategyModification

      public Boolean getAllowEndOfTermStrategyModification()
      This flag indicates whether this subscription's endOfTermStrategy can be modified after declaration on the subscription.
      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
    • setDurationType

      public void setDurationType(String durationType)
      The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.
    • setDurationLength

      public void setDurationLength(int durationLength)
      The term duration length.
    • setDefault

      public void setDefault(boolean isDefault)
      Whether this is the default term configured for a Product.
    • setEndOfTermStrategy

      public void setEndOfTermStrategy(String endOfTermStrategy)
      Indicates the action to be performed at the end of term.
      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
    • setAllowEndOfTermStrategyModification

      public void setAllowEndOfTermStrategyModification(Boolean allowEndOfTermStrategyModification)
      This flag indicates whether this subscription's endOfTermStrategy can be modified after declaration on the subscription.
      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
    • 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