Class UpdateItemRequest
java.lang.Object
com.broadleafcommerce.cartoperation.web.endpoint.domain.CartItemModifyingRequest
com.broadleafcommerce.cartoperation.web.endpoint.domain.UpdateItemRequest
- All Implemented Interfaces:
CartVersionedRequest,Serializable
A request DTO for updating a cart item. This is passed through
CartOperationService.updateItemInCart(Cart, UpdateItemRequest, boolean, ContextInfo) and
is used to inform the update of a CartItem.- Author:
- Chris Kittrell (ckittrell), Chad Harchar (charchar)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanMiscellaneous attributes that can be set to this request in order to inform business logic for updating aCartItem.Attributes that should be copied to theCart.getAttributes()for this request.ID of theCartItemto update.A list of additionalAddItemRequeststhat should be added as children items of the resulting parent item of this currentUpdateItemRequest.A list of additionalcartItemIdsthat should be removed as children items of the resulting parent item of this currentUpdateItemRequest.A list of additionalAddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.Attribute choices that should be copied toCartItem.getAttributeChoices()for this request.Attributes that should be copied to theCartItem.getAttributes()for this request.The id of the parentCartItemfor this add item request.intThe amount of this item to be added to theCart.The frequency of the recurring period, e.g., if this is 1 andrecurringPeriodTypeis MONTHLY, then the recurring price should be charged every 1 month.The period type for the recurring price, e.g.The id of the variant for this add item request.inthashCode()voidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Miscellaneous attributes that can be set to this request in order to inform business logic for updating aCartItem.voidsetCartAttributes(Map<String, Object> cartAttributes) Attributes that should be copied to theCart.getAttributes()for this request.voidsetCartItemId(String cartItemId) ID of theCartItemto update.voidsetDependentItemsToAdd(List<AddItemRequest> dependentItemsToAdd) A list of additionalAddItemRequeststhat should be added as children items of the resulting parent item of this currentUpdateItemRequest.voidsetDependentItemsToRemove(List<String> dependentItemsToRemove) A list of additionalcartItemIdsthat should be removed as children items of the resulting parent item of this currentUpdateItemRequest.voidsetDependentItemUpdates(List<UpdateItemRequest> dependentItemUpdates) A list of additionalAddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.voidsetItemAttributeChoices(Map<String, String> itemAttributeChoices) Attribute choices that should be copied toCartItem.getAttributeChoices()for this request.voidsetItemAttributes(Map<String, Object> itemAttributes) Attributes that should be copied to theCartItem.getAttributes()for this request.voidsetParentCartItemId(String parentCartItemId) The id of the parentCartItemfor this add item request.voidsetQuantity(int quantity) The amount of this item to be added to theCart.voidsetRecurringPeriodFrequency(Integer recurringPeriodFrequency) The frequency of the recurring period, e.g., if this is 1 andrecurringPeriodTypeis MONTHLY, then the recurring price should be charged every 1 month.voidsetRecurringPeriodType(String recurringPeriodType) The period type for the recurring price, e.g.voidsetVariantId(String variantId) The id of the variant for this add item request.toString()Methods inherited from class com.broadleafcommerce.cartoperation.web.endpoint.domain.CartItemModifyingRequest
getCartVersion, setCartVersion
-
Constructor Details
-
UpdateItemRequest
public UpdateItemRequest()
-
-
Method Details
-
getCartItemId
ID of theCartItemto update.- Returns:
- ID of the
CartItemto update.
-
getVariantId
The id of the variant for this add item request. Used to retrieve variant information for the cart item.- Returns:
- The id of the variant for this add item request. Used to retrieve variant information for the cart item.
-
getQuantity
public int getQuantity()The amount of this item to be added to theCart.- Returns:
- The amount of this item to be added to the
Cart.
-
getItemAttributes
Attributes that should be copied to theCartItem.getAttributes()for this request.- Returns:
- Attributes that should be copied to the
CartItem.getAttributes()for this request.
-
getItemAttributeChoices
Attribute choices that should be copied toCartItem.getAttributeChoices()for this request.- Returns:
- Attribute choices that should be copied to
CartItem.getAttributeChoices()for this request.
-
getCartAttributes
Attributes that should be copied to theCart.getAttributes()for this request.- Returns:
- Attributes that should be copied to the
Cart.getAttributes()for this request.
-
getDependentItemUpdates
A list of additionalAddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.- Returns:
- A list of additional
AddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.
-
getDependentItemsToAdd
A list of additionalAddItemRequeststhat should be added as children items of the resulting parent item of this currentUpdateItemRequest.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
getDependentItemsToRemove
A list of additionalcartItemIdsthat should be removed as children items of the resulting parent item of this currentUpdateItemRequest.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
getParentCartItemId
The id of the parentCartItemfor this add item request. This would create a childCartItemof the parent.- Returns:
- The id of the parent
CartItemfor this add item request. This would create a childCartItemof the parent.
-
getRecurringPeriodFrequency
The frequency of the recurring period, e.g., if this is 1 andrecurringPeriodTypeis MONTHLY, then the recurring price should be charged every 1 month.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
recurringPeriodType
-
getRecurringPeriodType
The period type for the recurring price, e.g. MONTHLY, QUARTERLY, ANNUALLY.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
recurringPeriodFrequency
-
getAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic for updating aCartItem.- Returns:
- Miscellaneous attributes that can be set to this request in order to inform business
logic for updating a
CartItem.
-
setCartItemId
ID of theCartItemto update.- Parameters:
cartItemId- ID of theCartItemto update.
-
setVariantId
The id of the variant for this add item request. Used to retrieve variant information for the cart item.- Parameters:
variantId- The id of the variant for this add item request. Used to retrieve variant information for the cart item.
-
setQuantity
public void setQuantity(int quantity) The amount of this item to be added to theCart.- Parameters:
quantity- The amount of this item to be added to theCart.
-
setItemAttributes
Attributes that should be copied to theCartItem.getAttributes()for this request.- Parameters:
itemAttributes- Attributes that should be copied to theCartItem.getAttributes()for this request.
-
setItemAttributeChoices
Attribute choices that should be copied toCartItem.getAttributeChoices()for this request.- Parameters:
itemAttributeChoices- Attribute choices that should be copied toCartItem.getAttributeChoices()for this request.
-
setCartAttributes
Attributes that should be copied to theCart.getAttributes()for this request.- Parameters:
cartAttributes- Attributes that should be copied to theCart.getAttributes()for this request.
-
setDependentItemUpdates
A list of additionalAddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.- Parameters:
childCartItems- A list of additionalAddItemRequeststhat should be processed as children items of the resulting parent item of this currentUpdateItemRequest.
-
setDependentItemsToAdd
A list of additionalAddItemRequeststhat should be added as children items of the resulting parent item of this currentUpdateItemRequest.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
setDependentItemsToRemove
A list of additionalcartItemIdsthat should be removed as children items of the resulting parent item of this currentUpdateItemRequest.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
setParentCartItemId
The id of the parentCartItemfor this add item request. This would create a childCartItemof the parent.- Parameters:
parentCartItemId- The id of the parentCartItemfor this add item request. This would create a childCartItemof the parent.
-
setRecurringPeriodFrequency
The frequency of the recurring period, e.g., if this is 1 andrecurringPeriodTypeis MONTHLY, then the recurring price should be charged every 1 month.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
recurringPeriodType
-
setRecurringPeriodType
The period type for the recurring price, e.g. MONTHLY, QUARTERLY, ANNUALLY.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
recurringPeriodFrequency
-
setAdditionalAttributes
Miscellaneous attributes that can be set to this request in order to inform business logic for updating aCartItem.- Parameters:
additionalAttributes- Miscellaneous attributes that can be set to this request in order to inform business logic for updating aCartItem.
-
equals
- Overrides:
equalsin classCartItemModifyingRequest
-
canEqual
- Overrides:
canEqualin classCartItemModifyingRequest
-
hashCode
public int hashCode()- Overrides:
hashCodein classCartItemModifyingRequest
-
toString
- Overrides:
toStringin classCartItemModifyingRequest
-