Class SubscriptionItemCreationRequest
java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.SubscriptionItemCreationRequest
- All Implemented Interfaces:
Serializable
Request DTO stored on
SubscriptionCreationRequest that holds fields necessary for
building and creating a subscription- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionItemCreationRequest(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 newSubscriptionItemCreationRequestinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMiscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscriptionItem.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.Item nameReference to the item IDType of item that this object representsUnit price of the item (price of a single unit)Reference to the item underlying the parent subscription item if this is a child subscription itemType of the parent subscription item's backing item if this is a child subscription itemintQuantity purchasedAdjustments for this subscription.Tax category of the iteminthashCode()booleanWhether this item is taxablevoidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscriptionItem.voidsetAddOnKey(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.voidsetItemName(String itemName) Item namevoidsetItemRef(String itemRef) Reference to the item IDvoidsetItemRefType(String itemRefType) Type of item that this object representsvoidsetItemUnitPrice(BigDecimal itemUnitPrice) Unit price of the item (price of a single unit)voidsetParentItemRef(String parentItemRef) Reference to the item underlying the parent subscription 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 itemvoidsetQuantity(int quantity) Quantity purchasedvoidsetSubscriptionItemAdjustments(List<SubscriptionItemAdjustment> subscriptionItemAdjustments) Adjustments for this subscription.voidsetTaxable(boolean taxable) Whether this item is taxablevoidsetTaxCategory(String taxCategory) Tax category of the itemtoString()
-
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 newSubscriptionItemCreationRequestinstance.- Parameters:
itemName- Item nameitemRefType- Type of item that this object representsitemRef- Reference to the item IDparentItemRefType- Type of the parent subscription item's backing item if this is a child subscription itemparentItemRef- Reference to the item underlying the parent subscription item if this is a child subscription itemaddOnKey- 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 purchasedtaxable- Whether this item is taxabletaxCategory- Tax category of the itemsubscriptionItemAdjustments- Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the objectadditionalAttributes- Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscriptionItem.
-
SubscriptionItemCreationRequest
public SubscriptionItemCreationRequest()
-
-
Method Details
-
getItemName
Item name -
getItemRefType
Type of item that this object represents -
getItemRef
Reference to the item ID -
getParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
getParentItemRef
Reference to the item underlying the parent subscription item if this is a child subscription item -
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
public int getQuantity()Quantity purchased -
isTaxable
public boolean isTaxable()Whether this item is taxable -
getTaxCategory
Tax category of the item -
getSubscriptionItemAdjustments
Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object -
getAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscriptionItem. -
setItemName
Item name -
setItemRefType
Type of item that this object represents -
setItemRef
Reference to the item ID -
setParentItemRefType
Type of the parent subscription item's backing item if this is a child subscription item -
setParentItemRef
Reference to the item underlying the parent subscription item if this is a child subscription item -
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
public void setQuantity(int quantity) Quantity purchased -
setTaxable
public void setTaxable(boolean taxable) Whether this item is taxable -
setTaxCategory
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
Miscellaneous attributes that can be set to this request in order to inform business logic for adding aSubscriptionItem. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-