Class SubscriptionItem

java.lang.Object
com.broadleafcommerce.subscription.domain.SubscriptionItem
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class SubscriptionItem extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
This represents a line item for a Subscription
See Also:
  • Constructor Details

  • Method Details

    • isArchived

      public boolean isArchived()
    • getArchived

      public Boolean getArchived()
      Whether this item is archived.

      Included for backward compatibility.

      Returns:
      Whether this item is archived.
    • getId

      public String getId()
    • getSubscriptionId

      public String getSubscriptionId()
      Reference the subscription for this item
    • getItemRefType

      public String getItemRefType()
      Type of item that this object represents
    • getItemRef

      public String getItemRef()
      Reference to the id of the item represented by this object
    • getItemSku

      public String getItemSku()
      SKU of the item represented by this object.
    • getItemName

      public String getItemName()
      Item name
    • getItemDetails

      public Map<String,String> getItemDetails()
      Additional details about the item
    • getParentItemRefType

      public String getParentItemRefType()
      Type of the parent subscription item's backing item if this is a child subscription item
    • getParentItemRef

      public String getParentItemRef()
      Reference of the parent subscription item's backing item if this is a child subscription item
    • getItemSourceType

      public String getItemSourceType()
      This field shows from which process or user action this subscription item originated.
      See Also:
    • getItemSourceRef

      public String getItemSourceRef()
      This field shows the identifier of the process or user action this subscription item originated.
      See Also:
      • itemSourceType
    • getSecondarySourceType

      public String getSecondarySourceType()
      The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.
      See Also:
    • getSecondarySourceRef

      public String getSecondarySourceRef()
      The secondary source to reference, e.g, an Order Item on an Order. Optional.
      See Also:
      • secondarySourceType
    • getAddOnKey

      public String getAddOnKey()
      If this item was the result of an add-on, then this stores the key of the add-on in the context of its parent. This is important when editing a subscription in order to recreate the original cart item.
    • getItemUnitPrice

      public BigDecimal getItemUnitPrice()
      Unit price of the item (price of a single unit)
    • getQuantity

      public Integer getQuantity()
      Quantity purchased. Note: this value is scaled by parent item quantity.
    • getTaxable

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

      public String getTaxCategory()
      Tax category of the item
    • getTaxNexus

      public String getTaxNexus()
      Comma-separated nexus codes
    • getArchiveReason

      public String getArchiveReason()
      Why this item was archived
    • getSubscriptionItemAdjustments

      public List<SubscriptionItemAdjustment> getSubscriptionItemAdjustments()
      Adjustments for this subscription. This may be present on incoming API requests such as when creating a subscription with its items, but otherwise is only populated in responses when part of a SubscriptionWithItems.
    • getPriceDataId

      public String getPriceDataId()
      The id of the price data associated with this item.
    • getPriceListId

      public String getPriceListId()
      The id of the price list associated with this item.
    • 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
    • getInternalAttributes

      public Map<String,Object> getInternalAttributes()
      Miscellaneous internal attributes for this subscription item.
    • setId

      public void setId(String id)
    • setSubscriptionId

      public void setSubscriptionId(String subscriptionId)
      Reference the subscription for this item
    • setItemRefType

      public void setItemRefType(String itemRefType)
      Type of item that this object represents
    • setItemRef

      public void setItemRef(String itemRef)
      Reference to the id of the item represented by this object
    • setItemSku

      public void setItemSku(String itemSku)
      SKU of the item represented by this object.
    • setItemName

      public void setItemName(String itemName)
      Item name
    • setItemDetails

      public void setItemDetails(Map<String,String> itemDetails)
      Additional details about the item
    • setParentItemRefType

      public void setParentItemRefType(String parentItemRefType)
      Type of the parent subscription item's backing item if this is a child subscription item
    • setParentItemRef

      public void setParentItemRef(String parentItemRef)
      Reference of the parent subscription item's backing item if this is a child subscription item
    • setItemSourceType

      public void setItemSourceType(String itemSourceType)
      This field shows from which process or user action this subscription item originated.
      See Also:
    • setItemSourceRef

      public void setItemSourceRef(String itemSourceRef)
      This field shows the identifier of the process or user action this subscription item originated.
      See Also:
      • itemSourceType
    • setSecondarySourceType

      public void setSecondarySourceType(String secondarySourceType)
      The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.
      See Also:
    • setSecondarySourceRef

      public void setSecondarySourceRef(String secondarySourceRef)
      The secondary source to reference, e.g, an Order Item on an Order. Optional.
      See Also:
      • secondarySourceType
    • setAddOnKey

      public void setAddOnKey(String addOnKey)
      If this item was the result of an add-on, then this stores the key of the add-on in the context of its parent. This is important when editing a subscription in order to recreate the original cart item.
    • setItemUnitPrice

      public void setItemUnitPrice(BigDecimal itemUnitPrice)
      Unit price of the item (price of a single unit)
    • setQuantity

      public void setQuantity(Integer quantity)
      Quantity purchased. Note: this value is scaled by parent item quantity.
    • setTaxable

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

      public void setTaxCategory(String taxCategory)
      Tax category of the item
    • setTaxNexus

      public void setTaxNexus(String taxNexus)
      Comma-separated nexus codes
    • setArchived

      public void setArchived(boolean archived)
      Whether this item is archived
    • setArchiveReason

      public void setArchiveReason(String archiveReason)
      Why this item was archived
    • setSubscriptionItemAdjustments

      public void setSubscriptionItemAdjustments(List<SubscriptionItemAdjustment> subscriptionItemAdjustments)
      Adjustments for this subscription. This may be present on incoming API requests such as when creating a subscription with its items, but otherwise is only populated in responses when part of a SubscriptionWithItems.
    • setPriceDataId

      public void setPriceDataId(String priceDataId)
      The id of the price data associated with this item.
    • setPriceListId

      public void setPriceListId(String priceListId)
      The id of the price list associated with this item.
    • 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
    • setInternalAttributes

      public void setInternalAttributes(Map<String,Object> internalAttributes)
      Miscellaneous internal attributes for this subscription item.
    • 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