Class BillingEventItemAdjustment
java.lang.Object
com.broadleafcommerce.billing.domain.BillingEventItemAdjustment
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
public class BillingEventItemAdjustment
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents a price adjustment to a
line item. While this could be a
prorated amount from an event-level BillingEventAdjustment, it may also represent an
independent discount to a specific line item.
Out of box, event-level adjustments are prorated into
item adjustments upon Billing Event creation in
DefaultBillingEventService.generateProratedEventItemAdjustments(List, List).
As such, only item adjustments are used for further pricing and tax calculations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringReference to the promotion or offer that drives this adjustmentprotected BigDecimalThe unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.protected @Size(max=255) @NotBlank StringReferences the billing event item.protected BigDecimalThe unit adjustment amount for this event item for the length of a full subscription period.protected @Null(groups=Create.class) @Size(max=255) Stringprotected StringIf this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level.protected StringReference to theSubscriptionItemAdjustment -
Constructor Summary
ConstructorsConstructorDescriptionBillingEventItemAdjustment(String id, String billingEventItemId, String adjustmentRef, String subscriptionItemAdjustmentRef, BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount, BigDecimal adjustmentUnitAmount, Integer itemAdjustmentQuantity, String proratedFromEventAdjustmentId, Map<String, Object> additionalAttributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMap holding any additional attributes passed in the request not matching any defined properties.Reference to the promotion or offer that drives this adjustmentThe unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.References the billing event item.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The unit adjustment amount for this event item for the length of a full subscription period.getId()The quantity of this event item that this adjustment should apply to.If this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level.Reference to theSubscriptionItemAdjustmentinthashCode()voidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetAdjustmentRef(String adjustmentRef) Reference to the promotion or offer that drives this adjustmentvoidsetAdjustmentUnitAmount(BigDecimal adjustmentUnitAmount) The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.voidsetBillingEventItemId(String billingEventItemId) References the billing event item.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetFullSubscriptionPeriodAdjustmentUnitAmount(BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount) The unit adjustment amount for this event item for the length of a full subscription period.voidvoidsetItemAdjustmentQuantity(Integer itemAdjustmentQuantity) The quantity of this event item that this adjustment should apply to.voidsetProratedFromEventAdjustmentId(String proratedFromEventAdjustmentId) If this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level.voidsetSubscriptionItemAdjustmentRef(String subscriptionItemAdjustmentRef) Reference to theSubscriptionItemAdjustmenttoString()
-
Field Details
-
id
@Null(groups=Create.class) @Size(max=255) protected @Null(groups=Create.class) @Size(max=255) String id -
billingEventItemId
References the billing event item. -
adjustmentRef
Reference to the promotion or offer that drives this adjustment -
subscriptionItemAdjustmentRef
Reference to theSubscriptionItemAdjustment -
fullSubscriptionPeriodAdjustmentUnitAmount
The unit adjustment amount for this event item for the length of a full subscription period. -
adjustmentUnitAmount
The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription. -
proratedFromEventAdjustmentId
If this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level.
-
-
Constructor Details
-
BillingEventItemAdjustment
public BillingEventItemAdjustment() -
BillingEventItemAdjustment
public BillingEventItemAdjustment(String id, String billingEventItemId, String adjustmentRef, String subscriptionItemAdjustmentRef, BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount, BigDecimal adjustmentUnitAmount, Integer itemAdjustmentQuantity, String proratedFromEventAdjustmentId, Map<String, Object> additionalAttributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
-
Method Details
-
getId
-
getBillingEventItemId
References the billing event item. -
getAdjustmentRef
Reference to the promotion or offer that drives this adjustment -
getSubscriptionItemAdjustmentRef
Reference to theSubscriptionItemAdjustment -
getFullSubscriptionPeriodAdjustmentUnitAmount
The unit adjustment amount for this event item for the length of a full subscription period. -
getAdjustmentUnitAmount
The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription. -
getItemAdjustmentQuantity
The quantity of this event item that this adjustment should apply to. -
getProratedFromEventAdjustmentId
If this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level. -
getAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
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
-
setBillingEventItemId
References the billing event item. -
setAdjustmentRef
Reference to the promotion or offer that drives this adjustment -
setSubscriptionItemAdjustmentRef
Reference to theSubscriptionItemAdjustment -
setFullSubscriptionPeriodAdjustmentUnitAmount
public void setFullSubscriptionPeriodAdjustmentUnitAmount(BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount) The unit adjustment amount for this event item for the length of a full subscription period. -
setAdjustmentUnitAmount
The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription. -
setItemAdjustmentQuantity
The quantity of this event item that this adjustment should apply to. -
setProratedFromEventAdjustmentId
If this event item adjustment was prorated, this is the reference to theevent adjustmentfrom which this was prorated to the line item level. -
setAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
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
-