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 Summary
ConstructorsConstructorDescriptionRefundEventItem(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 Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe ID of billing event item that this refund item represents.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()The surrogate ID of this refund event item.intThe number of items to refund.The ID of the refund event this refund item belongs to.Deprecated.The amount of tax to refund for this item.The unit amount to refund for this item before tax.inthashCode()voidsetBillingEventItemId(String billingEventItemId) The ID of billing event item that this refund item represents.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidvoidsetQuantity(int quantity) The number of items to refund.voidsetRefundEventId(String refundEventId) The ID of the refund event this refund item belongs to.voidsetRefundEventItemId(String refundEventItemId) voidsetTotalTaxRefundAmount(BigDecimal totalTaxRefundAmount) The amount of tax to refund for this item.voidsetUnitRefundAmount(BigDecimal unitRefundAmount) The unit amount to refund for this item before tax.toString()
-
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
-
setId
-
getRefundEventItemId
Deprecated.UsegetId()field insteadThe surrogate ID of this refund event item. -
getId
The surrogate ID of this refund event item. -
getRefundEventId
The ID of the refund event this refund item belongs to. -
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
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
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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setRefundEventId
The ID of the refund event this refund item belongs to. -
setBillingEventItemId
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
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
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 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
-
getId()field instead