Class SubscriptionItemAdjustment
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
Subscription-
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionItemAdjustment(String itemAdjustmentId, String id, String subscriptionItemId, String adjustmentRef, SubscriptionAdjustmentType adjustmentType, String subscriptionAdjustmentType, BigDecimal adjustmentAmount, Integer beginPeriod, Integer endPeriod, String adjustmentName, String adjustmentCartLabel, String adjustmentDescription, String adjustmentProrationType, String adjustmentCodeRef, String adjustmentDiscountMethodType, BigDecimal adjustmentDiscountFactor, String codeUsed, String campaignTrackingId, String discountType, List<OfferItemDetail> qualifierDetails, Integer itemAdjustmentQuantity, Integer freeTrialLength, String freeTrialLengthUnits, CurrencyConversionDetail currencyConversionDetail, Map<String, Object> attributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAmount of the price adjustment.Friendly label to display in the cart or to a customer in general instead of theadjustmentName.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 adjustmentDeprecated.Miscellaneous attributes for this subscription item adjustment.Number 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.Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.Defines the type of the discount, e.g., free trial, order discount, future credit, etc.Number of the billing period this adjustment stops.IfdiscountTypeisFREE_TRIAL, then this defines the free trial's length.IfdiscountTypeisFREE_TRIAL, then this defines the units forfreeTrialLength.getId()Deprecated.UsegetId()field insteadThe quantity of theSubscriptionItemthe adjustment applies to.A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.Type of adjustment that this addsReference to theSubscriptionItemwhose price this adjustsinthashCode()voidsetAdjustmentAmount(BigDecimal adjustmentAmount) Amount of the price adjustment.voidsetAdjustmentCartLabel(String adjustmentCartLabel) Friendly label to display in the cart or to a customer in general instead of theadjustmentName.voidsetAdjustmentCodeRef(String adjustmentCodeRef) A reference to the Offer Code (if any).voidsetAdjustmentDescription(String adjustmentDescription) A description of what benefits the adjustment provides to a customer.voidsetAdjustmentDiscountFactor(BigDecimal adjustmentDiscountFactor) The discount factor by which to discount a target.voidsetAdjustmentDiscountMethodType(String adjustmentDiscountMethodType) Determines the method used to apply the discount.voidsetAdjustmentName(String adjustmentName) Name of the adjustment applied.voidsetAdjustmentProrationType(String adjustmentProrationType) Determines how an adjustment's discount amount is distributed across the adjustment's related item types.voidsetAdjustmentRef(String adjustmentRef) Reference to the promotion or offer that drives this adjustmentvoidsetAdjustmentType(SubscriptionAdjustmentType subscriptionAdjustmentType) voidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this subscription item adjustment.voidsetBeginPeriod(Integer beginPeriod) Number of the billing period this adjustment starts being activevoidsetCampaignTrackingId(String campaignTrackingId) The campaign tracking id (if any) for this adjustment.voidsetCodeUsed(String codeUsed) The code used (if any) that triggered the application of the adjustment for this adjustment.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCurrencyConversionDetail(CurrencyConversionDetail currencyConversionDetail) Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another.voidsetDiscountType(String discountType) Defines the type of the discount, e.g., free trial, order discount, future credit, etc.voidsetEndPeriod(Integer endPeriod) Number of the billing period this adjustment stops.voidsetFreeTrialLength(Integer freeTrialLength) IfdiscountTypeisFREE_TRIAL, then this defines the free trial's length.voidsetFreeTrialLengthUnits(String freeTrialLengthUnits) IfdiscountTypeisFREE_TRIAL, then this defines the units forfreeTrialLength.voidvoidsetItemAdjustmentId(String itemAdjustmentId) voidsetItemAdjustmentQuantity(Integer itemAdjustmentQuantity) The quantity of theSubscriptionItemthe adjustment applies to.voidsetQualifierDetails(List<OfferItemDetail> qualifierDetails) A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.voidsetSubscriptionAdjustmentType(String subscriptionAdjustmentType) voidsetSubscriptionItemId(String subscriptionItemId) Reference to theSubscriptionItemwhose price this adjuststoString()
-
Constructor Details
-
SubscriptionItemAdjustment
public SubscriptionItemAdjustment() -
SubscriptionItemAdjustment
public SubscriptionItemAdjustment(String itemAdjustmentId, String id, String subscriptionItemId, String adjustmentRef, SubscriptionAdjustmentType adjustmentType, String subscriptionAdjustmentType, BigDecimal adjustmentAmount, Integer beginPeriod, Integer endPeriod, String adjustmentName, String adjustmentCartLabel, String adjustmentDescription, String adjustmentProrationType, String adjustmentCodeRef, String adjustmentDiscountMethodType, BigDecimal adjustmentDiscountFactor, String codeUsed, String campaignTrackingId, String discountType, List<OfferItemDetail> qualifierDetails, Integer itemAdjustmentQuantity, Integer freeTrialLength, String freeTrialLengthUnits, CurrencyConversionDetail currencyConversionDetail, Map<String, Object> attributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
-
Method Details
-
setAdjustmentType
-
setSubscriptionAdjustmentType
-
setItemAdjustmentId
-
setId
-
getItemAdjustmentId
Deprecated.UsegetId()field instead -
getId
-
getSubscriptionItemId
Reference to theSubscriptionItemwhose price this adjusts -
getAdjustmentRef
Reference to the promotion or offer that drives this adjustment -
getAdjustmentType
Deprecated.in favor ofgetSubscriptionAdjustmentType() -
getSubscriptionAdjustmentType
Type of adjustment that this adds- See Also:
-
getAdjustmentAmount
Amount of the price adjustment. This could be a percentage, amount off, or fixed price. Use withsubscriptionAdjustmentTypeto determine which option is applicable. -
getBeginPeriod
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 -
getAdjustmentName
Name of the adjustment applied. -
getAdjustmentCartLabel
Friendly label to display in the cart or to a customer in general instead of theadjustmentName. -
getAdjustmentDescription
A description of what benefits the adjustment provides to a customer. -
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. -
getAdjustmentCodeRef
A reference to the Offer Code (if any). -
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. -
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. -
getCodeUsed
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. -
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. -
getQualifierDetails
A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.For example, ItemA and ItemB qualify for a free gift offer, which results Item_FG to be added as a free gift item. These details are used to identify ItemA and ItemB from free gift item Item_FG using its adjustment.
Take another example, ItemA qualifies for a Buy 1 itemA Get 1 itemB free offer. These details are used to identity the qualifier item ItemA from target item ItemB.
-
getItemAdjustmentQuantity
The quantity of theSubscriptionItemthe adjustment applies to. If null, then the full quantity of the item is targeted. -
getFreeTrialLength
IfdiscountTypeisFREE_TRIAL, then this defines the free trial's length.- See Also:
-
freeTrialLengthUnits
-
getFreeTrialLengthUnits
IfdiscountTypeisFREE_TRIAL, then this defines the units forfreeTrialLength.- See Also:
-
freeTrialLength
-
getCurrencyConversionDetail
Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the amount of the adjustment if it was converted from a base currency. This is done when the target item was in a different currency from the offer and was also converted, that is, the item's original currency was the same as that which the offer targets but its price was converted to another currency. -
getAttributes
Miscellaneous attributes for this subscription item adjustment. -
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
-
setSubscriptionItemId
Reference to theSubscriptionItemwhose price this adjusts -
setAdjustmentRef
Reference to the promotion or offer that drives this adjustment -
setAdjustmentAmount
Amount of the price adjustment. This could be a percentage, amount off, or fixed price. Use withsubscriptionAdjustmentTypeto determine which option is applicable. -
setBeginPeriod
Number of the billing period this adjustment starts being active -
setEndPeriod
Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite -
setAdjustmentName
Name of the adjustment applied. -
setAdjustmentCartLabel
Friendly label to display in the cart or to a customer in general instead of theadjustmentName. -
setAdjustmentDescription
A description of what benefits the adjustment provides to a customer. -
setAdjustmentProrationType
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. -
setAdjustmentCodeRef
A reference to the Offer Code (if any). -
setAdjustmentDiscountMethodType
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. -
setAdjustmentDiscountFactor
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. -
setCodeUsed
The code used (if any) that triggered the application of the adjustment for this adjustment. -
setCampaignTrackingId
The campaign tracking id (if any) for this adjustment. -
setDiscountType
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. -
setQualifierDetails
A list ofOfferItemDetailsrepresenting the qualifier items where this adjustment was from.For example, ItemA and ItemB qualify for a free gift offer, which results Item_FG to be added as a free gift item. These details are used to identify ItemA and ItemB from free gift item Item_FG using its adjustment.
Take another example, ItemA qualifies for a Buy 1 itemA Get 1 itemB free offer. These details are used to identity the qualifier item ItemA from target item ItemB.
-
setItemAdjustmentQuantity
The quantity of theSubscriptionItemthe adjustment applies to. If null, then the full quantity of the item is targeted. -
setFreeTrialLength
IfdiscountTypeisFREE_TRIAL, then this defines the free trial's length.- See Also:
-
freeTrialLengthUnits
-
setFreeTrialLengthUnits
IfdiscountTypeisFREE_TRIAL, then this defines the units forfreeTrialLength.- See Also:
-
freeTrialLength
-
setCurrencyConversionDetail
Represents the details of the exchange rate used to convert aMonetaryAmountfrom one currency to another. This is used to describe the amount of the adjustment if it was converted from a base currency. This is done when the target item was in a different currency from the offer and was also converted, that is, the item's original currency was the same as that which the offer targets but its price was converted to another currency. -
setAttributes
Miscellaneous attributes for this subscription item adjustment. -
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
-
getSubscriptionAdjustmentType()