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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe additional attributes.getCancellationPolicyDetail(String paymentStrategy) Gets the appropriateCancellationPolicyDetailbased on the payment strategy used.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The description of the policy.getId()The id of the policy.getName()The name of the policy.The rules of the policy that are used to matching items.The policy details for items that are using theDefaultSubscriptionPaymentStrategy.POSTPAIDstrategy.The policy details for items that are using theDefaultSubscriptionPaymentStrategy.PREPAIDstrategy.The priority of the policy/inthashCode()booleanWhether the policy requires direct reference via Product or PriceData references.voidsetAttributes(Map<String, Object> attributes) The additional attributes.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDescription(String description) The description of the policy.voidThe id of the policy.voidThe name of the policy.voidsetPolicyRules(String policyRules) The rules of the policy that are used to matching items.voidsetPostpaidPolicyDetail(CancellationPolicyDetail postpaidPolicyDetail) The policy details for items that are using theDefaultSubscriptionPaymentStrategy.POSTPAIDstrategy.voidsetPrepaidPolicyDetail(CancellationPolicyDetail prepaidPolicyDetail) The policy details for items that are using theDefaultSubscriptionPaymentStrategy.PREPAIDstrategy.voidsetPriority(Integer priority) The priority of the policy/voidsetRequiresDirectReference(boolean requiresDirectReference) Whether the policy requires direct reference via Product or PriceData references.toString()
-
Constructor Details
-
CancellationPolicy
public CancellationPolicy()
-
-
Method Details
-
getCancellationPolicyDetail
Gets the appropriateCancellationPolicyDetailbased on the payment strategy used.- Parameters:
paymentStrategy- The payment strategy used. Can be either ofprepaidorpostpaid- Returns:
- A
CancellationPolicyDetailcorresponding to the paymentStrategy.
-
getId
The id of the policy. -
getName
The name of the policy. -
getDescription
The description of the policy. -
getPrepaidPolicyDetail
The policy details for items that are using theDefaultSubscriptionPaymentStrategy.PREPAIDstrategy. -
getPostpaidPolicyDetail
The policy details for items that are using theDefaultSubscriptionPaymentStrategy.POSTPAIDstrategy. -
isRequiresDirectReference
public boolean isRequiresDirectReference()Whether the policy requires direct reference via Product or PriceData references. -
getPolicyRules
The rules of the policy that are used to matching items. -
getPriority
The priority of the policy/ -
getAttributes
The additional attributes. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setId
The id of the policy. -
setName
The name of the policy. -
setDescription
The description of the policy. -
setPrepaidPolicyDetail
The policy details for items that are using theDefaultSubscriptionPaymentStrategy.PREPAIDstrategy. -
setPostpaidPolicyDetail
The policy details for items that are using theDefaultSubscriptionPaymentStrategy.POSTPAIDstrategy. -
setRequiresDirectReference
public void setRequiresDirectReference(boolean requiresDirectReference) Whether the policy requires direct reference via Product or PriceData references. -
setPolicyRules
The rules of the policy that are used to matching items. -
setPriority
The priority of the policy/ -
setAttributes
The additional attributes. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-