Class CancellationPolicyDetail

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

public class CancellationPolicyDetail extends Object implements Serializable
Describes properties declaring what to do if the subscription has terms and/or discounts. It also contains information about the grace period properties that dictate how the cancellations are processed.
Author:
karanjariwala
See Also:
  • Constructor Details

    • CancellationPolicyDetail

      public CancellationPolicyDetail()
  • Method Details

    • isAllowCancellation

      public boolean isAllowCancellation()
      Whether the customer can cancel their service before the end of the agreement.
    • getCancellationStrategy

      public String getCancellationStrategy()
      The ways in which a subscription can be cancelled.
      See Also:
    • getChargeStrategy

      public String getChargeStrategy()
      The ways in which a subscription's cancellation charge can be collected.
      See Also:
    • isChargeForRemainderOfTerms

      public boolean isChargeForRemainderOfTerms()
      Whether the customer should be charged for the remainder of the term despite cancelling the subscription.
    • isChargeFullPriceForRemainderOfTerms

      public boolean isChargeFullPriceForRemainderOfTerms()
      Whether the customer should be charged the full, unadjusted (un-discounted) price when cancelling.
    • isChargeForPreviouslyReceivedDiscountAmounts

      public boolean isChargeForPreviouslyReceivedDiscountAmounts()
      Whether the customer should be charged for any discounts he/she received before cancelling the subscription.
    • getCancellationFeeProductId

      public String getCancellationFeeProductId()
      Reference to a product that holds an additional cancellation fee.
    • isGracePeriodSupported

      public boolean isGracePeriodSupported()
      Whether grace period properties are enabled.

      The grace period is a time-window (typically ~7 days) in which the cancellation policy can differ from the normal cancellation policy. This period occurs just after the subscription’s Auto Renewal. For products without a contract, the grace period opens at the beginning of each period. For products with a contract, the grace period opens at the beginning of the contract & each contract renewal.

    • getGracePeriodDurationInDays

      public Integer getGracePeriodDurationInDays()
      Duration of the initial grace period in days.
    • isGracePeriodRecursEachBillingPeriod

      public boolean isGracePeriodRecursEachBillingPeriod()
      Whether the grace period resets after each billing period. If "true", the grace period may be applicable at the beginning of the subscription and if "false" it may recur with each billing cycle.

      For “terms”, this would typically be false.

    • getGracePeriodCancellationStrategy

      public String getGracePeriodCancellationStrategy()
      The CancellationStrategy in grace period context.
    • getGracePeriodChargeStrategy

      public String getGracePeriodChargeStrategy()
      The ChargeStrategy in grace period context.
    • getGracePeriodCancellationFeeProductId

      public String getGracePeriodCancellationFeeProductId()
      The getCancellationFeeProductId() in the grace period context.
    • getAttributes

      public Map<String,Object> getAttributes()
      Contains any additional properties of a permission that do not fit in the above fields.
    • setAllowCancellation

      public void setAllowCancellation(boolean allowCancellation)
      Whether the customer can cancel their service before the end of the agreement.
    • setCancellationStrategy

      public void setCancellationStrategy(String cancellationStrategy)
      The ways in which a subscription can be cancelled.
      See Also:
    • setChargeStrategy

      public void setChargeStrategy(String chargeStrategy)
      The ways in which a subscription's cancellation charge can be collected.
      See Also:
    • setChargeForRemainderOfTerms

      public void setChargeForRemainderOfTerms(boolean chargeForRemainderOfTerms)
      Whether the customer should be charged for the remainder of the term despite cancelling the subscription.
    • setChargeFullPriceForRemainderOfTerms

      public void setChargeFullPriceForRemainderOfTerms(boolean chargeFullPriceForRemainderOfTerms)
      Whether the customer should be charged the full, unadjusted (un-discounted) price when cancelling.
    • setChargeForPreviouslyReceivedDiscountAmounts

      public void setChargeForPreviouslyReceivedDiscountAmounts(boolean chargeForPreviouslyReceivedDiscountAmounts)
      Whether the customer should be charged for any discounts he/she received before cancelling the subscription.
    • setCancellationFeeProductId

      public void setCancellationFeeProductId(String cancellationFeeProductId)
      Reference to a product that holds an additional cancellation fee.
    • setGracePeriodSupported

      public void setGracePeriodSupported(boolean gracePeriodSupported)
      Whether grace period properties are enabled.

      The grace period is a time-window (typically ~7 days) in which the cancellation policy can differ from the normal cancellation policy. This period occurs just after the subscription’s Auto Renewal. For products without a contract, the grace period opens at the beginning of each period. For products with a contract, the grace period opens at the beginning of the contract & each contract renewal.

    • setGracePeriodDurationInDays

      public void setGracePeriodDurationInDays(Integer gracePeriodDurationInDays)
      Duration of the initial grace period in days.
    • setGracePeriodRecursEachBillingPeriod

      public void setGracePeriodRecursEachBillingPeriod(boolean gracePeriodRecursEachBillingPeriod)
      Whether the grace period resets after each billing period. If "true", the grace period may be applicable at the beginning of the subscription and if "false" it may recur with each billing cycle.

      For “terms”, this would typically be false.

    • setGracePeriodCancellationStrategy

      public void setGracePeriodCancellationStrategy(String gracePeriodCancellationStrategy)
      The CancellationStrategy in grace period context.
    • setGracePeriodChargeStrategy

      public void setGracePeriodChargeStrategy(String gracePeriodChargeStrategy)
      The ChargeStrategy in grace period context.
    • setGracePeriodCancellationFeeProductId

      public void setGracePeriodCancellationFeeProductId(String gracePeriodCancellationFeeProductId)
      The getCancellationFeeProductId() in the grace period context.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Contains any additional properties of a permission that do not fit in the above fields.
    • 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