Class RefundEventItem

java.lang.Object
com.broadleafcommerce.billing.domain.RefundEventItem
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware

public class RefundEventItem extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents an item being refunded. Used to track refunds at the item level.

The total amount refunded for an item should be (unitRefundAmount * quantity) + totalTaxRefundAmount.

Author:
Jacob Mitash
  • Constructor Details

    • RefundEventItem

      public RefundEventItem()
    • RefundEventItem

      public RefundEventItem(String refundEventItemId, String id, String refundEventId, String billingEventItemId, int quantity, BigDecimal unitRefundAmount, BigDecimal totalTaxRefundAmount, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
  • Method Details

    • setRefundEventItemId

      public void setRefundEventItemId(String refundEventItemId)
    • setId

      public void setId(String id)
    • getRefundEventItemId

      @Deprecated public String getRefundEventItemId()
      Deprecated.
      Use getId() field instead
      The surrogate ID of this refund event item.
    • getId

      public String getId()
      The surrogate ID of this refund event item.
    • getRefundEventId

      public String getRefundEventId()
      The ID of the refund event this refund item belongs to.
    • getBillingEventItemId

      public String getBillingEventItemId()
      The ID of billing event item that this refund item represents.
    • getQuantity

      public int getQuantity()
      The number of items to refund. This should be greater than zero and less than or equal to the billing event item's quantity.
    • getUnitRefundAmount

      public BigDecimal getUnitRefundAmount()
      The unit amount to refund for this item before tax. In other words, it is the amount to refund for a quantity of 1 before tax.
    • getTotalTaxRefundAmount

      public BigDecimal getTotalTaxRefundAmount()
      The amount of tax to refund for this item. Note that this is a total and is not per unit.
    • 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
    • setRefundEventId

      public void setRefundEventId(String refundEventId)
      The ID of the refund event this refund item belongs to.
    • setBillingEventItemId

      public void setBillingEventItemId(String billingEventItemId)
      The ID of billing event item that this refund item represents.
    • setQuantity

      public void setQuantity(int quantity)
      The number of items to refund. This should be greater than zero and less than or equal to the billing event item's quantity.
    • setUnitRefundAmount

      public void setUnitRefundAmount(BigDecimal unitRefundAmount)
      The unit amount to refund for this item before tax. In other words, it is the amount to refund for a quantity of 1 before tax.
    • setTotalTaxRefundAmount

      public void setTotalTaxRefundAmount(BigDecimal totalTaxRefundAmount)
      The amount of tax to refund for this item. Note that this is a total and is not per unit.
    • 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