Class SubscriptionAdjustment
java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.SubscriptionAdjustment
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Adjustment,Serializable
public class SubscriptionAdjustment
extends Object
implements Adjustment, com.broadleafcommerce.data.tracking.core.ContextStateAware
This is a representation of a price adjustment for a
Subscription- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAdjustment amount applied to the unit price of the target item.Friendly label to display in the cart or to a customer in general instead of theAdjustment.getAdjustmentName().A reference to the Offer Code (if any).A description of what benefits the adjustment provides to a customer.The discount factor by which to discount a target.Determines the method used to apply the discount.Name of the adjustment applied.Determines how an adjustment's discount amount is distributed across the adjustment's related item types.Reference to the promotion or offer that drives this adjustmentNumber of the billing period this adjustment starts being activeThe campaign tracking id (if any) for this adjustment.The code used (if any) that triggered the application of the adjustment for this adjustment.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.Defines the type of the discount, e.g., free trial, order discount, future credit, etc.Number of the billing period this adjustment stops.IfAdjustment.getDiscountType()isFREE_TRIAL, then this defines the free trial's length.IfAdjustment.getDiscountType()isFREE_TRIAL, then this defines the units forAdjustment.getFreeTrialLength().getId()Identifier for the subscription entity that owns this adjustment, e.g., theSubscription ID.The type of subscription entity that owns this adjustment, e.g.,DefaultAdjustmentOwnerType.SUBSCRIPTION.Type of adjustment that this addsReference to theSubscriptionwhose price this adjustsinthashCode()voidsetAdjustmentAmount(BigDecimal adjustmentAmount) voidsetAdjustmentCartLabel(String adjustmentCartLabel) voidsetAdjustmentCodeRef(String adjustmentCodeRef) voidsetAdjustmentDescription(String adjustmentDescription) voidsetAdjustmentDiscountFactor(BigDecimal adjustmentDiscountFactor) voidsetAdjustmentDiscountMethodType(String adjustmentDiscountMethodType) voidsetAdjustmentName(String adjustmentName) voidsetAdjustmentProrationType(String adjustmentProrationType) voidsetAdjustmentRef(String adjustmentRef) voidsetBeginPeriod(Integer beginPeriod) voidsetCampaignTrackingId(String campaignTrackingId) voidsetCodeUsed(String codeUsed) voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDiscountType(String discountType) voidsetEndPeriod(Integer endPeriod) voidsetFreeTrialLength(Integer freeTrialLength) voidsetFreeTrialLengthUnits(String freeTrialLengthUnits) voidvoidsetSubscriptionAdjustmentType(String subscriptionAdjustmentType) voidsetSubscriptionId(String subscriptionId) Reference to theSubscriptionwhose price this adjuststoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.subscriptionoperation.domain.Adjustment
getAdjustmentQuantity
-
Constructor Details
-
SubscriptionAdjustment
public SubscriptionAdjustment()
-
-
Method Details
-
getOwnerId
Description copied from interface:AdjustmentIdentifier for the subscription entity that owns this adjustment, e.g., theSubscription ID.- Specified by:
getOwnerIdin interfaceAdjustment- Returns:
- Identifier for the subscription entity that owns this adjustment, e.g., the
Subscription ID. - See Also:
-
getOwnerType
Description copied from interface:AdjustmentThe type of subscription entity that owns this adjustment, e.g.,DefaultAdjustmentOwnerType.SUBSCRIPTION.- Specified by:
getOwnerTypein interfaceAdjustment- Returns:
- The type of subscription entity that owns this adjustment, e.g.,
DefaultAdjustmentOwnerType.SUBSCRIPTION. - See Also:
-
getId
-
getSubscriptionId
Reference to theSubscriptionwhose price this adjusts -
getAdjustmentRef
Description copied from interface:AdjustmentReference to the promotion or offer that drives this adjustment- Specified by:
getAdjustmentRefin interfaceAdjustment- Returns:
- Reference to the promotion or offer that drives this adjustment
- See Also:
-
getSubscriptionAdjustmentType
Description copied from interface:AdjustmentType of adjustment that this adds- Specified by:
getSubscriptionAdjustmentTypein interfaceAdjustment- Returns:
- Type of adjustment that this adds
- See Also:
-
getAdjustmentAmount
Description copied from interface:AdjustmentAdjustment amount applied to the unit price of the target item.- Specified by:
getAdjustmentAmountin interfaceAdjustment- Returns:
- Amount of the price adjustment
- See Also:
-
getBeginPeriod
Description copied from interface:AdjustmentNumber of the billing period this adjustment starts being active- Specified by:
getBeginPeriodin interfaceAdjustment- Returns:
- Number of the billing period this adjustment starts being active
- See Also:
-
getEndPeriod
Description copied from interface:AdjustmentNumber of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite- Specified by:
getEndPeriodin interfaceAdjustment- Returns:
- Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite
- See Also:
-
getAdjustmentName
Description copied from interface:AdjustmentName of the adjustment applied.- Specified by:
getAdjustmentNamein interfaceAdjustment- Returns:
- Name of the adjustment applied.
- See Also:
-
getAdjustmentCartLabel
Description copied from interface:AdjustmentFriendly label to display in the cart or to a customer in general instead of theAdjustment.getAdjustmentName().- Specified by:
getAdjustmentCartLabelin interfaceAdjustment- Returns:
- Friendly label to display in the cart or to a customer in general instead of the
Adjustment.getAdjustmentName(). - See Also:
-
getAdjustmentDescription
Description copied from interface:AdjustmentA description of what benefits the adjustment provides to a customer.- Specified by:
getAdjustmentDescriptionin interfaceAdjustment- Returns:
- A description of what benefits the adjustment provides to a customer.
- See Also:
-
getAdjustmentProrationType
Description copied from interface:AdjustmentDetermines how an adjustment's discount amount is distributed across the adjustment's related item types. This can either be set to prorate across target items or target and qualifier items.- Specified by:
getAdjustmentProrationTypein interfaceAdjustment- Returns:
- Determines how an adjustment's discount amount is distributed across the adjustment's related item types. This can either be set to prorate across target items or target and qualifier items.
- See Also:
-
getAdjustmentCodeRef
Description copied from interface:AdjustmentA reference to the Offer Code (if any).- Specified by:
getAdjustmentCodeRefin interfaceAdjustment- Returns:
- A reference to the Offer Code (if any).
- See Also:
-
getAdjustmentDiscountMethodType
Description copied from interface:AdjustmentDetermines the method used to apply the discount. Typically in Broadleaf, theAdjustment.getSubscriptionAdjustmentType()ends up asDefaultSubscriptionAdjustmentType.AMOUNT_OFFsince the offer system calculates the actual amount to discount even if the base offer was a percentage off or fixed price. This field then is distinguished as the actual method specified on the offer before it was applied.- Specified by:
getAdjustmentDiscountMethodTypein interfaceAdjustment- Returns:
- The type of discount method used for this adjustment.
- See Also:
-
getAdjustmentDiscountFactor
Description copied from interface:AdjustmentThe discount factor by which to discount a target. If the amount is10, then whether it is calculated as a percentage (10%) or a currency amount ($10) is determined byAdjustment.getAdjustmentDiscountMethodType(). This does not represent that actual amount discounted from the target.- Specified by:
getAdjustmentDiscountFactorin interfaceAdjustment- Returns:
- The discount factor used for this adjustment.
- See Also:
-
getCodeUsed
Description copied from interface:AdjustmentThe code used (if any) that triggered the application of the adjustment for this adjustment.- Specified by:
getCodeUsedin interfaceAdjustment- Returns:
- The code used (if any) that triggered the application of the adjustment for this adjustment.
- See Also:
-
getCampaignTrackingId
Description copied from interface:AdjustmentThe campaign tracking id (if any) for this adjustment.- Specified by:
getCampaignTrackingIdin interfaceAdjustment- Returns:
- The campaign tracking id (if any) for this adjustment.
- See Also:
-
getDiscountType
Description copied from interface:AdjustmentDefines the type of the discount, e.g., free trial, order discount, future credit, etc. This primarily determines when it should be applied to the order or items. This helps distinguish whether the adjustment applies at checkout or later such as for a subscription.- Specified by:
getDiscountTypein interfaceAdjustment- Returns:
- The type of the discount.
- See Also:
-
getFreeTrialLength
Description copied from interface:AdjustmentIfAdjustment.getDiscountType()isFREE_TRIAL, then this defines the free trial's length.- Specified by:
getFreeTrialLengthin interfaceAdjustment- Returns:
- If
Adjustment.getDiscountType()isFREE_TRIAL, then this defines the free trial's length. - See Also:
-
getFreeTrialLengthUnits
Description copied from interface:AdjustmentIfAdjustment.getDiscountType()isFREE_TRIAL, then this defines the units forAdjustment.getFreeTrialLength().- Specified by:
getFreeTrialLengthUnitsin interfaceAdjustment- Returns:
- If
Adjustment.getDiscountType()isFREE_TRIAL, then this defines the units forAdjustment.getFreeTrialLength(). - See Also:
-
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
-
setSubscriptionId
Reference to theSubscriptionwhose price this adjusts -
setAdjustmentRef
- See Also:
-
setSubscriptionAdjustmentType
-
setAdjustmentAmount
- See Also:
-
setBeginPeriod
- See Also:
-
setEndPeriod
- See Also:
-
setAdjustmentName
- See Also:
-
setAdjustmentCartLabel
- See Also:
-
setAdjustmentDescription
- See Also:
-
setAdjustmentProrationType
- See Also:
-
setAdjustmentCodeRef
- See Also:
-
setAdjustmentDiscountMethodType
-
setAdjustmentDiscountFactor
- See Also:
-
setCodeUsed
- See Also:
-
setCampaignTrackingId
- See Also:
-
setDiscountType
- See Also:
-
setFreeTrialLength
- See Also:
-
setFreeTrialLengthUnits
- See Also:
-
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
-