Class BillingEventItem

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

public class BillingEventItem extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents a specific line item of a BillingEvent
  • Constructor Details

  • Method Details

    • getId

      public String getId()
    • getBillingEventId

      public String getBillingEventId()
      References the billing event for this item.
    • getSubscriptionItemRef

      public String getSubscriptionItemRef()
      Reference to the relevant SubscriptionItem
    • getOrderItemRef

      public String getOrderItemRef()
      Reference to the relevant order item
    • getItemRef

      public String getItemRef()
      Reference to the item ID.
    • getItemName

      public String getItemName()
      The item name.
    • getFullSubscriptionPeriodItemUnitPrice

      public BigDecimal getFullSubscriptionPeriodItemUnitPrice()
      The unit price of the item (price of one) for the length of a full subscription period.
    • getItemUnitPrice

      public BigDecimal getItemUnitPrice()
      The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription.
    • getQuantity

      public Integer getQuantity()
      The quantity purchased.
    • getItemSubtotal

      public BigDecimal getItemSubtotal()
      The subtotal price of this BillingEventItem. Typically calculated from getItemUnitPrice() ()} * getQuantity().
      Returns:
      The subtotal price of this BillingEventItem.
    • getTotalTax

      public BigDecimal getTotalTax()
      The total tax for this item.
    • getTotalAmount

      public BigDecimal getTotalAmount()
      Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTax
    • getTaxable

      public Boolean getTaxable()
      Whether this item is taxable.
    • getTaxCategory

      public String getTaxCategory()
      The tax category of the item.
    • getTaxNexus

      public String getTaxNexus()
      Comma separated nexus codes.
    • getAdditionalAttributes

      public Map<@Size(max=255) String,@Size(max=2000) String> getAdditionalAttributes()
      Name/Value pairs of additional attributes.
    • 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)
    • setBillingEventId

      public void setBillingEventId(String billingEventId)
      References the billing event for this item.
    • setSubscriptionItemRef

      public void setSubscriptionItemRef(String subscriptionItemRef)
      Reference to the relevant SubscriptionItem
    • setOrderItemRef

      public void setOrderItemRef(String orderItemRef)
      Reference to the relevant order item
    • setItemRef

      public void setItemRef(String itemRef)
      Reference to the item ID.
    • setItemName

      public void setItemName(String itemName)
      The item name.
    • setFullSubscriptionPeriodItemUnitPrice

      public void setFullSubscriptionPeriodItemUnitPrice(BigDecimal fullSubscriptionPeriodItemUnitPrice)
      The unit price of the item (price of one) for the length of a full subscription period.
    • setItemUnitPrice

      public void setItemUnitPrice(BigDecimal itemUnitPrice)
      The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription.
    • setQuantity

      public void setQuantity(Integer quantity)
      The quantity purchased.
    • setItemSubtotal

      public void setItemSubtotal(BigDecimal itemSubtotal)
      The subtotal price of this BillingEventItem. Typically calculated from getItemUnitPrice() ()} * getQuantity().
      Parameters:
      itemSubtotal - The subtotal price of this BillingEventItem.
    • setTotalTax

      public void setTotalTax(BigDecimal totalTax)
      The total tax for this item.
    • setTotalAmount

      public void setTotalAmount(BigDecimal totalAmount)
      Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTax
    • setTaxable

      public void setTaxable(Boolean taxable)
      Whether this item is taxable.
    • setTaxCategory

      public void setTaxCategory(String taxCategory)
      The tax category of the item.
    • setTaxNexus

      public void setTaxNexus(String taxNexus)
      Comma separated nexus codes.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<@Size(max=255) String,@Size(max=2000) String> additionalAttributes)
      Name/Value pairs of additional attributes.
    • 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