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 Details

    • id

      @Null(groups=Create.class) @Size(max=255) protected @Null(groups=Create.class) @Size(max=255) String id
    • billingEventItemId

      @Size(max=255) @NotBlank protected @Size(max=255) @NotBlank String billingEventItemId
      References the billing event item.
    • adjustmentRef

      protected String adjustmentRef
      Reference to the promotion or offer that drives this adjustment
    • subscriptionItemAdjustmentRef

      protected String subscriptionItemAdjustmentRef
    • fullSubscriptionPeriodAdjustmentUnitAmount

      protected BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount
      The unit adjustment amount for this event item for the length of a full subscription period.
    • adjustmentUnitAmount

      protected BigDecimal adjustmentUnitAmount
      The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.
    • proratedFromEventAdjustmentId

      protected String proratedFromEventAdjustmentId
      If this event item adjustment was prorated, this is the reference to the event adjustment from 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

      public String getId()
    • getBillingEventItemId

      public String getBillingEventItemId()
      References the billing event item.
    • getAdjustmentRef

      public String getAdjustmentRef()
      Reference to the promotion or offer that drives this adjustment
    • getSubscriptionItemAdjustmentRef

      public String getSubscriptionItemAdjustmentRef()
    • getFullSubscriptionPeriodAdjustmentUnitAmount

      public BigDecimal getFullSubscriptionPeriodAdjustmentUnitAmount()
      The unit adjustment amount for this event item for the length of a full subscription period.
    • getAdjustmentUnitAmount

      public BigDecimal getAdjustmentUnitAmount()
      The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.
    • getItemAdjustmentQuantity

      public Integer getItemAdjustmentQuantity()
      The quantity of this event item that this adjustment should apply to.
    • getProratedFromEventAdjustmentId

      public String getProratedFromEventAdjustmentId()
      If this event item adjustment was prorated, this is the reference to the event adjustment from which this was prorated to the line item level.
    • getAdditionalAttributes

      public Map<String,Object> 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 of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • setId

      public void setId(String id)
    • setBillingEventItemId

      public void setBillingEventItemId(String billingEventItemId)
      References the billing event item.
    • setAdjustmentRef

      public void setAdjustmentRef(String adjustmentRef)
      Reference to the promotion or offer that drives this adjustment
    • setSubscriptionItemAdjustmentRef

      public void setSubscriptionItemAdjustmentRef(String subscriptionItemAdjustmentRef)
    • setFullSubscriptionPeriodAdjustmentUnitAmount

      public void setFullSubscriptionPeriodAdjustmentUnitAmount(BigDecimal fullSubscriptionPeriodAdjustmentUnitAmount)
      The unit adjustment amount for this event item for the length of a full subscription period.
    • setAdjustmentUnitAmount

      public void setAdjustmentUnitAmount(BigDecimal adjustmentUnitAmount)
      The unit adjustment amount for this event item, possibly prorated for various reasons including a mid-period action on the subscription.
    • setItemAdjustmentQuantity

      public void setItemAdjustmentQuantity(Integer itemAdjustmentQuantity)
      The quantity of this event item that this adjustment should apply to.
    • setProratedFromEventAdjustmentId

      public void setProratedFromEventAdjustmentId(String proratedFromEventAdjustmentId)
      If this event item adjustment was prorated, this is the reference to the event adjustment from which this was prorated to the line item level.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      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 of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object