Class CancellationPolicy

java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.CancellationPolicy
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class CancellationPolicy extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents the cancellation policy for subscriptions.
Author:
Sunny Yu
See Also:
  • Constructor Details

    • CancellationPolicy

      public CancellationPolicy()
  • Method Details

    • getCancellationPolicyDetail

      public CancellationPolicyDetail getCancellationPolicyDetail(String paymentStrategy)
      Gets the appropriate CancellationPolicyDetail based on the payment strategy used.
      Parameters:
      paymentStrategy - The payment strategy used. Can be either of prepaid or postpaid
      Returns:
      A CancellationPolicyDetail corresponding to the paymentStrategy.
    • getId

      public String getId()
      The id of the policy.
    • getName

      public String getName()
      The name of the policy.
    • getDescription

      public String getDescription()
      The description of the policy.
    • getPrepaidPolicyDetail

      public CancellationPolicyDetail getPrepaidPolicyDetail()
      The policy details for items that are using the DefaultSubscriptionPaymentStrategy.PREPAID strategy.
    • getPostpaidPolicyDetail

      public CancellationPolicyDetail getPostpaidPolicyDetail()
      The policy details for items that are using the DefaultSubscriptionPaymentStrategy.POSTPAID strategy.
    • isRequiresDirectReference

      public boolean isRequiresDirectReference()
      Whether the policy requires direct reference via Product or PriceData references.
    • getPolicyRules

      public String getPolicyRules()
      The rules of the policy that are used to matching items.
    • getPriority

      public Integer getPriority()
      The priority of the policy/
    • getAttributes

      public Map<String,Object> getAttributes()
      The additional attributes.
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • setId

      public void setId(String id)
      The id of the policy.
    • setName

      public void setName(String name)
      The name of the policy.
    • setDescription

      public void setDescription(String description)
      The description of the policy.
    • setPrepaidPolicyDetail

      public void setPrepaidPolicyDetail(CancellationPolicyDetail prepaidPolicyDetail)
      The policy details for items that are using the DefaultSubscriptionPaymentStrategy.PREPAID strategy.
    • setPostpaidPolicyDetail

      public void setPostpaidPolicyDetail(CancellationPolicyDetail postpaidPolicyDetail)
      The policy details for items that are using the DefaultSubscriptionPaymentStrategy.POSTPAID strategy.
    • setRequiresDirectReference

      public void setRequiresDirectReference(boolean requiresDirectReference)
      Whether the policy requires direct reference via Product or PriceData references.
    • setPolicyRules

      public void setPolicyRules(String policyRules)
      The rules of the policy that are used to matching items.
    • setPriority

      public void setPriority(Integer priority)
      The priority of the policy/
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      The additional attributes.
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • 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