Interface Adjustment
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SubscriptionAdjustment,SubscriptionItemAdjustment
Represents a price adjustment (discount) applied from an offer added to a
Subscription or
SubscriptionItem.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionAdjustment 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 thegetAdjustmentName().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.The quantity of the target item's units the adjustment applies to.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.Defines the type of the discount, e.g., free trial, order discount, future credit, etc.Number of the billing period this adjustment stops.IfgetDiscountType()isFREE_TRIAL, then this defines the free trial's length.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 adds
-
Method Details
-
getOwnerId
String getOwnerId()Identifier for the subscription entity that owns this adjustment, e.g., theSubscription ID.- Returns:
- Identifier for the subscription entity that owns this adjustment, e.g., the
Subscription ID.
-
getOwnerType
String getOwnerType()The type of subscription entity that owns this adjustment, e.g.,DefaultAdjustmentOwnerType.SUBSCRIPTION.- Returns:
- The type of subscription entity that owns this adjustment, e.g.,
DefaultAdjustmentOwnerType.SUBSCRIPTION. - See Also:
-
getAdjustmentRef
String getAdjustmentRef()Reference to the promotion or offer that drives this adjustment- Returns:
- Reference to the promotion or offer that drives this adjustment
-
getSubscriptionAdjustmentType
String getSubscriptionAdjustmentType()Type of adjustment that this adds- Returns:
- Type of adjustment that this adds
- See Also:
-
getAdjustmentAmount
BigDecimal getAdjustmentAmount()Adjustment amount applied to the unit price of the target item.- Returns:
- Amount of the price adjustment
-
getBeginPeriod
Integer getBeginPeriod()Number of the billing period this adjustment starts being active- Returns:
- Number of the billing period this adjustment starts being active
-
getEndPeriod
Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite- Returns:
- Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite
-
getAdjustmentName
String getAdjustmentName()Name of the adjustment applied.- Returns:
- Name of the adjustment applied.
-
getAdjustmentCartLabel
Friendly label to display in the cart or to a customer in general instead of thegetAdjustmentName().- Returns:
- Friendly label to display in the cart or to a customer in general instead of the
getAdjustmentName().
-
getAdjustmentDescription
A description of what benefits the adjustment provides to a customer.- Returns:
- A description of what benefits the adjustment provides to a customer.
-
getAdjustmentProrationType
String getAdjustmentProrationType()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.- 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.
-
getAdjustmentCodeRef
A reference to the Offer Code (if any).- Returns:
- A reference to the Offer Code (if any).
-
getAdjustmentDiscountMethodType
String getAdjustmentDiscountMethodType()Determines the method used to apply the discount. Typically in Broadleaf, thegetSubscriptionAdjustmentType()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.- Returns:
- The type of discount method used for this adjustment.
-
getAdjustmentDiscountFactor
BigDecimal getAdjustmentDiscountFactor()The 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 bygetAdjustmentDiscountMethodType(). This does not represent that actual amount discounted from the target.- Returns:
- The discount factor used for this adjustment.
-
getCodeUsed
The code used (if any) that triggered the application of the adjustment for this adjustment.- Returns:
- The code used (if any) that triggered the application of the adjustment for this adjustment.
-
getCampaignTrackingId
The campaign tracking id (if any) for this adjustment.- Returns:
- The campaign tracking id (if any) for this adjustment.
-
getDiscountType
String getDiscountType()Defines 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.- Returns:
- The type of the discount.
-
getAdjustmentQuantity
The quantity of the target item's units the adjustment applies to. If null, then the full quantity of the item is targeted. Not applicable to all types of adjustments.- Returns:
- The quantity of the adjustment owner the adjustment applies to if applicable.
-
getFreeTrialLength
IfgetDiscountType()isFREE_TRIAL, then this defines the free trial's length.- Returns:
- If
getDiscountType()isFREE_TRIAL, then this defines the free trial's length. - See Also:
-
getFreeTrialLengthUnits
- Returns:
- If
getDiscountType()isFREE_TRIAL, then this defines the units forgetFreeTrialLength(). - See Also:
-