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 Summary
ConstructorsConstructorDescriptionSubscriptionItem(String id, String subscriptionId, String itemRefType, String itemRef, String itemSku, String itemName, Map<String, String> itemDetails, String parentItemRefType, String parentItemRef, String itemSourceType, String itemSourceRef, String secondarySourceType, String secondarySourceRef, String addOnKey, BigDecimal itemUnitPrice, Integer quantity, Boolean taxable, String taxCategory, String taxNexus, boolean archived, String archiveReason, List<SubscriptionItemAdjustment> subscriptionItemAdjustments, String priceDataId, String priceListId, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState, Map<String, Object> internalAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanIf this item was the result of an add-on, then this stores the key of the add-on in the context of its parent.Whether this item is archived.Why this item was archivedcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()Miscellaneous internal attributes for this subscription item.Additional details about the itemItem nameReference to the id of the item represented by this objectType of item that this object representsSKU of the item represented by this object.This field shows the identifier of the process or user action this subscription item originated.This field shows from which process or user action this subscription item originated.Unit price of the item (price of a single unit)Reference of the parent subscription item's backing item if this is a child subscription itemType of the parent subscription item's backing item if this is a child subscription itemThe id of the price data associated with this item.The id of the price list associated with this item.Quantity purchased.The secondary source to reference, e.g, an Order Item on an Order.The type of the secondary source to reference, e.g, an Order Item on an Order.Reference the subscription for this itemAdjustments for this subscription.Whether this item is taxableTax category of the itemComma-separated nexus codesinthashCode()booleanvoidsetAddOnKey(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.voidsetArchived(boolean archived) Whether this item is archivedvoidsetArchiveReason(String archiveReason) Why this item was archivedvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidvoidsetInternalAttributes(Map<String, Object> internalAttributes) Miscellaneous internal attributes for this subscription item.voidsetItemDetails(Map<String, String> itemDetails) Additional details about the itemvoidsetItemName(String itemName) Item namevoidsetItemRef(String itemRef) Reference to the id of the item represented by this objectvoidsetItemRefType(String itemRefType) Type of item that this object representsvoidsetItemSku(String itemSku) SKU of the item represented by this object.voidsetItemSourceRef(String itemSourceRef) This field shows the identifier of the process or user action this subscription item originated.voidsetItemSourceType(String itemSourceType) This field shows from which process or user action this subscription item originated.voidsetItemUnitPrice(BigDecimal itemUnitPrice) Unit price of the item (price of a single unit)voidsetParentItemRef(String parentItemRef) Reference of the parent subscription item's backing item if this is a child subscription itemvoidsetParentItemRefType(String parentItemRefType) Type of the parent subscription item's backing item if this is a child subscription itemvoidsetPriceDataId(String priceDataId) The id of the price data associated with this item.voidsetPriceListId(String priceListId) The id of the price list associated with this item.voidsetQuantity(Integer quantity) Quantity purchased.voidsetSecondarySourceRef(String secondarySourceRef) The secondary source to reference, e.g, an Order Item on an Order.voidsetSecondarySourceType(String secondarySourceType) The type of the secondary source to reference, e.g, an Order Item on an Order.voidsetSubscriptionId(String subscriptionId) Reference the subscription for this itemvoidsetSubscriptionItemAdjustments(List<SubscriptionItemAdjustment> subscriptionItemAdjustments) Adjustments for this subscription.voidsetTaxable(Boolean taxable) Whether this item is taxablevoidsetTaxCategory(String taxCategory) Tax category of the itemvoidsetTaxNexus(String taxNexus) Comma-separated nexus codestoString()
-
Constructor Details
-
SubscriptionItem
public SubscriptionItem() -
SubscriptionItem
public SubscriptionItem(String id, String subscriptionId, String itemRefType, String itemRef, String itemSku, String itemName, Map<String, String> itemDetails, String parentItemRefType, String parentItemRef, String itemSourceType, String itemSourceRef, String secondarySourceType, String secondarySourceRef, String addOnKey, BigDecimal itemUnitPrice, Integer quantity, Boolean taxable, String taxCategory, String taxNexus, boolean archived, String archiveReason, List<SubscriptionItemAdjustment> subscriptionItemAdjustments, String priceDataId, String priceListId, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState, Map<String, Object> internalAttributes)
-
-
Method Details
-
isArchived
public boolean isArchived() -
getArchived
Whether this item is archived. Included for backward compatibility.- Returns:
- Whether this item is archived.
-
getId
-
getSubscriptionId
Reference the subscription for this item -
getItemRefType
Type of item that this object represents -
getItemRef
Reference to the id of the item represented by this object -
getItemSku
SKU of the item represented by this object. -
getItemName
Item name -
getItemDetails
Additional details about the item -
getParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
getParentItemRef
Reference of the parent subscription item's backing item if this is a child subscription item -
getItemSourceType
This field shows from which process or user action this subscription item originated.- See Also:
-
itemSourceRefDefaultSubscriptionSourceType
-
getItemSourceRef
This field shows the identifier of the process or user action this subscription item originated.- See Also:
-
itemSourceType
-
getSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
getSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
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
Unit price of the item (price of a single unit) -
getQuantity
Quantity purchased. Note: this value is scaled by parent item quantity. -
getTaxable
Whether this item is taxable -
getTaxCategory
Tax category of the item -
getTaxNexus
Comma-separated nexus codes -
getArchiveReason
Why this item was archived -
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 aSubscriptionWithItems. -
getPriceDataId
The id of the price data associated with this item. -
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 ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
getInternalAttributes
Miscellaneous internal attributes for this subscription item. -
setId
-
setSubscriptionId
Reference the subscription for this item -
setItemRefType
Type of item that this object represents -
setItemRef
Reference to the id of the item represented by this object -
setItemSku
SKU of the item represented by this object. -
setItemName
Item name -
setItemDetails
Additional details about the item -
setParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
setParentItemRef
Reference of the parent subscription item's backing item if this is a child subscription item -
setItemSourceType
This field shows from which process or user action this subscription item originated.- See Also:
-
itemSourceRefDefaultSubscriptionSourceType
-
setItemSourceRef
This field shows the identifier of the process or user action this subscription item originated.- See Also:
-
itemSourceType
-
setSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
setSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
setAddOnKey
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
Unit price of the item (price of a single unit) -
setQuantity
Quantity purchased. Note: this value is scaled by parent item quantity. -
setTaxable
Whether this item is taxable -
setTaxCategory
Tax category of the item -
setTaxNexus
Comma-separated nexus codes -
setArchived
public void setArchived(boolean archived) Whether this item is archived -
setArchiveReason
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 aSubscriptionWithItems. -
setPriceDataId
The id of the price data associated with this item. -
setPriceListId
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 ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
-
setInternalAttributes
Miscellaneous internal attributes for this subscription item. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-