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 Summary
ConstructorsConstructorDescriptionBillingEventItem(String id, String billingEventId, String subscriptionItemRef, String orderItemRef, String itemRef, String itemName, BigDecimal fullSubscriptionPeriodItemUnitPrice, BigDecimal itemUnitPrice, Integer quantity, BigDecimal itemSubtotal, BigDecimal totalTax, BigDecimal totalAmount, Boolean taxable, String taxCategory, String taxNexus, Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanName/Value pairs of additional attributes.References the billing event for this item.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The unit price of the item (price of one) for the length of a full subscription period.getId()The item name.Reference to the item ID.The subtotal price of thisBillingEventItem.The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription.Reference to the relevant order itemThe quantity purchased.Reference to the relevantSubscriptionItemWhether this item is taxable.The tax category of the item.Comma separated nexus codes.Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTaxThe total tax for this item.inthashCode()voidsetAdditionalAttributes(Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes) Name/Value pairs of additional attributes.voidsetBillingEventId(String billingEventId) References the billing event for this item.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetFullSubscriptionPeriodItemUnitPrice(BigDecimal fullSubscriptionPeriodItemUnitPrice) The unit price of the item (price of one) for the length of a full subscription period.voidvoidsetItemName(String itemName) The item name.voidsetItemRef(String itemRef) Reference to the item ID.voidsetItemSubtotal(BigDecimal itemSubtotal) The subtotal price of thisBillingEventItem.voidsetItemUnitPrice(BigDecimal itemUnitPrice) The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription.voidsetOrderItemRef(String orderItemRef) Reference to the relevant order itemvoidsetQuantity(Integer quantity) The quantity purchased.voidsetSubscriptionItemRef(String subscriptionItemRef) Reference to the relevantSubscriptionItemvoidsetTaxable(Boolean taxable) Whether this item is taxable.voidsetTaxCategory(String taxCategory) The tax category of the item.voidsetTaxNexus(String taxNexus) Comma separated nexus codes.voidsetTotalAmount(BigDecimal totalAmount) Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTaxvoidsetTotalTax(BigDecimal totalTax) The total tax for this item.toString()
-
Constructor Details
-
BillingEventItem
public BillingEventItem() -
BillingEventItem
public BillingEventItem(String id, String billingEventId, String subscriptionItemRef, String orderItemRef, String itemRef, String itemName, BigDecimal fullSubscriptionPeriodItemUnitPrice, BigDecimal itemUnitPrice, Integer quantity, BigDecimal itemSubtotal, BigDecimal totalTax, BigDecimal totalAmount, Boolean taxable, String taxCategory, String taxNexus, Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
-
Method Details
-
getId
-
getBillingEventId
References the billing event for this item. -
getSubscriptionItemRef
Reference to the relevantSubscriptionItem -
getOrderItemRef
Reference to the relevant order item -
getItemRef
Reference to the item ID. -
getItemName
The item name. -
getFullSubscriptionPeriodItemUnitPrice
The unit price of the item (price of one) for the length of a full subscription period. -
getItemUnitPrice
The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription. -
getQuantity
The quantity purchased. -
getItemSubtotal
The subtotal price of thisBillingEventItem. Typically calculated fromgetItemUnitPrice()()} *getQuantity().- Returns:
- The subtotal price of this
BillingEventItem.
-
getTotalTax
The total tax for this item. -
getTotalAmount
Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTax -
getTaxable
Whether this item is taxable. -
getTaxCategory
The tax category of the item. -
getTaxNexus
Comma separated nexus codes. -
getAdditionalAttributes
Name/Value pairs of additional attributes. -
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
-
setBillingEventId
References the billing event for this item. -
setSubscriptionItemRef
Reference to the relevantSubscriptionItem -
setOrderItemRef
Reference to the relevant order item -
setItemRef
Reference to the item ID. -
setItemName
The item name. -
setFullSubscriptionPeriodItemUnitPrice
The unit price of the item (price of one) for the length of a full subscription period. -
setItemUnitPrice
The unit price of the item (price of one), possibly prorated for various reasons including a mid-period action on the subscription. -
setQuantity
The quantity purchased. -
setItemSubtotal
The subtotal price of thisBillingEventItem. Typically calculated fromgetItemUnitPrice()()} *getQuantity().- Parameters:
itemSubtotal- The subtotal price of thisBillingEventItem.
-
setTotalTax
The total tax for this item. -
setTotalAmount
Total amount to bill for this item: itemSubtotal - (adjustmentUnitAmount * itemAdjustmentQuantity) + totalTax -
setTaxable
Whether this item is taxable. -
setTaxCategory
The tax category of the item. -
setTaxNexus
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 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
-