Class CancellationPolicyDetail

java.lang.Object
com.broadleafcommerce.cartoperation.domain.subscription.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.
Since:
Cart Operation Service 2.3.0, Release Train 2.3.0
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 strategy to use when cancelling a subscription, e.g. IMMEDIATE, CANCEL_AUTO_RENEWAL.
    • getChargeStrategy

      public String getChargeStrategy()
      The strategy to use when charging a customer for cancelling a subscription, e.g. NO_CHARGE, PRORATED.
    • 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 repeats after each billing period.

      For “terms”, this would typically be false.

    • getGracePeriodCancellationStrategy

      public String getGracePeriodCancellationStrategy()
      The cancellation strategy to use during the grace period.
    • getGracePeriodChargeStrategy

      public String getGracePeriodChargeStrategy()
      The charge strategy to use during the grace period.
    • getGracePeriodCancellationFeeProductId

      public String getGracePeriodCancellationFeeProductId()
      The product id that holds the cancellation fee for the grace period.
    • isChargeForRemainderOfTerms

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

      public boolean isChargeFullPriceForRemainderOfTerms()
      Whether the customer would be charged the full price for the remainder of the term despite cancelling the subscription.
    • isChargeForPreviouslyReceivedDiscountAmounts

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

      public String getCancellationFeeProductId()
      The product id that holds the cancellation fee.
    • getAttributes

      public Map<String,Object> getAttributes()
      The additional attributes.
    • 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 strategy to use when cancelling a subscription, e.g. IMMEDIATE, CANCEL_AUTO_RENEWAL.
    • setChargeStrategy

      public void setChargeStrategy(String chargeStrategy)
      The strategy to use when charging a customer for cancelling a subscription, e.g. NO_CHARGE, PRORATED.
    • 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 repeats after each billing period.

      For “terms”, this would typically be false.

    • setGracePeriodCancellationStrategy

      public void setGracePeriodCancellationStrategy(String gracePeriodCancellationStrategy)
      The cancellation strategy to use during the grace period.
    • setGracePeriodChargeStrategy

      public void setGracePeriodChargeStrategy(String gracePeriodChargeStrategy)
      The charge strategy to use during the grace period.
    • setGracePeriodCancellationFeeProductId

      public void setGracePeriodCancellationFeeProductId(String gracePeriodCancellationFeeProductId)
      The product id that holds the cancellation fee for the grace period.
    • setChargeForRemainderOfTerms

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

      public void setChargeFullPriceForRemainderOfTerms(boolean chargeFullPriceForRemainderOfTerms)
      Whether the customer would be charged the full price for the remainder of the term despite cancelling the subscription.
    • setChargeForPreviouslyReceivedDiscountAmounts

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

      public void setCancellationFeeProductId(String cancellationFeeProductId)
      The product id that holds the cancellation fee.
    • setAttributes

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