Class ExistingAdjustmentDetail

java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.ExistingAdjustmentDetail
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExistingSubscriptionAdjustmentDetail, ExistingSubscriptionItemAdjustmentDetail

public class ExistingAdjustmentDetail extends Object implements Serializable
Contains details describing an existing adjustment when entering a modify-subscription flow such as for edit, upgrade, or downgrade.

This is helpful to avoid any existing adjustments from being lost after modifying a subscription.

Author:
Sunny Yu
See Also:
  • Constructor Details

    • ExistingAdjustmentDetail

      public ExistingAdjustmentDetail()
  • Method Details

    • getId

      public String getId()
    • getAdjustmentRef

      public String getAdjustmentRef()
      See Also:
    • getAdjustmentName

      public String getAdjustmentName()
      See Also:
    • getDiscountType

      public String getDiscountType()
      See Also:
    • getBeginPeriod

      public Integer getBeginPeriod()
      See Also:
    • getEndPeriod

      @Nullable public Integer getEndPeriod()
      See Also:
    • getFreeTrialEndDate

      @Nullable public Instant getFreeTrialEndDate()
      The end date of the free trial for this subscription, if applicable, null if none applied.

      This is an easy way to determine if a subscription is in a free trial period without having to calculate from the adjustment.

    • getPeriodsAlreadyUsed

      public int getPeriodsAlreadyUsed()
      Represents the number of periods this adjustment has already been used. This is helpful to determine if the adjustment has any remaining periods.
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional attributes to include.
    • setId

      public void setId(String id)
    • setAdjustmentRef

      public void setAdjustmentRef(String adjustmentRef)
      See Also:
    • setAdjustmentName

      public void setAdjustmentName(String adjustmentName)
      See Also:
    • setDiscountType

      public void setDiscountType(String discountType)
      See Also:
    • setBeginPeriod

      public void setBeginPeriod(Integer beginPeriod)
      See Also:
    • setEndPeriod

      public void setEndPeriod(@Nullable Integer endPeriod)
      See Also:
    • setFreeTrialEndDate

      public void setFreeTrialEndDate(@Nullable Instant freeTrialEndDate)
      The end date of the free trial for this subscription, if applicable, null if none applied.

      This is an easy way to determine if a subscription is in a free trial period without having to calculate from the adjustment.

    • setPeriodsAlreadyUsed

      public void setPeriodsAlreadyUsed(int periodsAlreadyUsed)
      Represents the number of periods this adjustment has already been used. This is helpful to determine if the adjustment has any remaining periods.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional attributes to include.
    • 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