Class CancellationPolicy
java.lang.Object
com.broadleafcommerce.subscription.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
Describes details for access & charges in the current period in which the cancellation is being
requested/executed.
- Author:
- karanjariwala
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanContains any additional properties of a permission that do not fit in the above fields.getCancellationPolicyDetail(String paymentStrategy) Gets the appropriateCancellationPolicyDetailbased on the payment type used.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The description of the CancellationPolicy.getId()The Id of the CancellationPolicy.getName()The name of the CancellationPolicy.Policy applicability rules to identify the policy that should be used for the subscription.TheCancellationPolicyDetailwith details for targets using a postpaid payment strategy.TheCancellationPolicyDetailwith details for targets using a prepaid payment strategy.The priority of this cancellation policy.inthashCode()booleanWhether the policy is only eligible to be used via Product or PriceData references.voidsetAttributes(Map<String, Object> attributes) Contains any additional properties of a permission that do not fit in the above fields.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 CancellationPolicy.voidThe Id of the CancellationPolicy.voidThe name of the CancellationPolicy.voidsetPolicyRules(String policyRules) Policy applicability rules to identify the policy that should be used for the subscription.voidsetPostpaidPolicyDetail(CancellationPolicyDetail postpaidPolicyDetail) TheCancellationPolicyDetailwith details for targets using a postpaid payment strategy.voidsetPrepaidPolicyDetail(CancellationPolicyDetail prepaidPolicyDetail) TheCancellationPolicyDetailwith details for targets using a prepaid payment strategy.voidsetPriority(Integer priority) The priority of this cancellation policy.voidsetRequiresDirectReference(boolean requiresDirectReference) Whether the policy is only eligible to be used via Product or PriceData references.toString()
-
Constructor Details
-
CancellationPolicy
public CancellationPolicy()
-
-
Method Details
-
getCancellationPolicyDetail
Gets the appropriateCancellationPolicyDetailbased on the payment type used.- Parameters:
paymentStrategy- The payment strategy used. Can be either ofprepaidorpostpaid- Returns:
- A
CancellationPolicyDetailcorresponding to the paymentStrategy.
-
getId
The Id of the CancellationPolicy. -
getName
The name of the CancellationPolicy. -
getDescription
The description of the CancellationPolicy. -
getPrepaidPolicyDetail
TheCancellationPolicyDetailwith details for targets using a prepaid payment strategy. -
getPostpaidPolicyDetail
TheCancellationPolicyDetailwith details for targets using a postpaid payment strategy. -
isRequiresDirectReference
public boolean isRequiresDirectReference()Whether the policy is only eligible to be used via Product or PriceData references. -
getPolicyRules
Policy applicability rules to identify the policy that should be used for the subscription. Utilizes a RuleBuilder. -
getPriority
The priority of this cancellation policy. This is to enforce ordering when a subscription may match with multiple policies. A lower value indicates higher priority. -
getAttributes
Contains any additional properties of a permission that do not fit in the above fields. -
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 CancellationPolicy. -
setName
The name of the CancellationPolicy. -
setDescription
The description of the CancellationPolicy. -
setPrepaidPolicyDetail
TheCancellationPolicyDetailwith details for targets using a prepaid payment strategy. -
setPostpaidPolicyDetail
TheCancellationPolicyDetailwith details for targets using a postpaid payment strategy. -
setRequiresDirectReference
public void setRequiresDirectReference(boolean requiresDirectReference) Whether the policy is only eligible to be used via Product or PriceData references. -
setPolicyRules
Policy applicability rules to identify the policy that should be used for the subscription. Utilizes a RuleBuilder. -
setPriority
The priority of this cancellation policy. This is to enforce ordering when a subscription may match with multiple policies. A lower value indicates higher priority. -
setAttributes
Contains any additional properties of a permission that do not fit in the above fields. -
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
-