Class SubscriptionItemCreationRequest

java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.SubscriptionItemCreationRequest
All Implemented Interfaces:
Serializable

public class SubscriptionItemCreationRequest extends Object implements Serializable
Request DTO stored on SubscriptionCreationRequest that holds fields necessary for building and creating a subscription
See Also:
  • Constructor Details

    • SubscriptionItemCreationRequest

      public SubscriptionItemCreationRequest(String itemName, String itemRefType, String itemRef, String parentItemRefType, String parentItemRef, String addOnKey, BigDecimal itemUnitPrice, int quantity, boolean taxable, String taxCategory, List<SubscriptionItemAdjustment> subscriptionItemAdjustments, Map<String,Object> additionalAttributes)
      Creates a new SubscriptionItemCreationRequest instance.
      Parameters:
      itemName - Item name
      itemRefType - Type of item that this object represents
      itemRef - Reference to the item ID
      parentItemRefType - Type of the parent subscription item's backing item if this is a child subscription item
      parentItemRef - Reference to the item underlying the parent subscription item if this is a child subscription item
      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.
      itemUnitPrice - Unit price of the item (price of a single unit)
      quantity - Quantity purchased
      taxable - Whether this item is taxable
      taxCategory - Tax category of the item
      subscriptionItemAdjustments - Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object
      additionalAttributes - Miscellaneous attributes that can be set to this request in order to inform business logic for adding a SubscriptionItem.
    • SubscriptionItemCreationRequest

      public SubscriptionItemCreationRequest()
  • Method Details

    • getItemName

      public String getItemName()
      Item name
    • getItemRefType

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

      public String getItemRef()
      Reference to the item ID
    • 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 to the item underlying the parent subscription item if this is a child subscription item
    • 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
    • isTaxable

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

      public String getTaxCategory()
      Tax category of the item
    • 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
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Miscellaneous attributes that can be set to this request in order to inform business logic for adding a SubscriptionItem.
    • setItemName

      public void setItemName(String itemName)
      Item name
    • setItemRefType

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

      public void setItemRef(String itemRef)
      Reference to the item ID
    • 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 to the item underlying the parent subscription item if this is a child subscription item
    • 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
    • setTaxable

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

      public void setTaxCategory(String taxCategory)
      Tax category of the item
    • 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
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Miscellaneous attributes that can be set to this request in order to inform business logic for adding a SubscriptionItem.
    • 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