java.lang.Object
com.broadleafcommerce.orderoperation.domain.subscription.SubscriptionItem
All Implemented Interfaces:
Serializable

public class SubscriptionItem extends Object implements Serializable
This represents a line item for a Subscription.
Since:
Order Operation Service 2.2.0, Release Train 2.3.0
See Also:
  • Constructor Details

    • SubscriptionItem

      public SubscriptionItem()
  • Method Details

    • addAttribute

      public void addAttribute(String name, Object value)
      Takes in any additional attributes passed in the request not matching any defined properties.
      Parameters:
      name - Name of the additional attribute
      value - Value of the additional attribute
    • getAttribute

      public Map<String,Object> getAttribute()
      Return any additional attributes passed in the request not matching any defined properties.
      Returns:
      any additional attributes passed in the request not matching any defined properties.
    • getId

      public String getId()
    • getSubscriptionId

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

      public String getItemName()
      Item name
    • getItemRefType

      public String getItemRefType()
      Type of item that this object represents. For example, BLC_PRODUCT.
    • getItemRef

      public String getItemRef()
      Reference to the id of the item represented by this object. For example, the product id.
    • getItemSku

      public String getItemSku()
      SKU of the item represented by this object.
    • 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 int getQuantity()
      Quantity purchased. Note: this value is scaled by parent item quantity.
    • isTaxable

      public boolean isTaxable()
      Whether this item is taxable
    • getTaxCategory

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

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

      public boolean isArchived()
      Whether this item is archived
    • getArchiveReason

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

      public List<SubscriptionItemAdjustment> getSubscriptionItemAdjustments()
      Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object
    • getAttributes

      public Map<String,Object> getAttributes()
      Map holding any additional attributes passed in the request not matching any defined properties.
    • setId

      public void setId(String id)
    • setSubscriptionId

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

      public void setItemName(String itemName)
      Item name
    • setItemRefType

      public void setItemRefType(String itemRefType)
      Type of item that this object represents. For example, BLC_PRODUCT.
    • setItemRef

      public void setItemRef(String itemRef)
      Reference to the id of the item represented by this object. For example, the product id.
    • setItemSku

      public void setItemSku(String itemSku)
      SKU of the item represented by this object.
    • 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(int 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 field is used for creation from an API request and is not persisted with the object
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Map holding any additional attributes passed in the request not matching any defined properties.
    • 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