Class OrderItemRequestDTO
java.lang.Object
org.broadleafcommerce.core.order.service.call.OrderItemRequestDTO
- Direct Known Subclasses:
AddToCartItem,NonDiscreteOrderItemRequestDTO
Only the product and quantity are required to add an item to an order.
The category can be inferred from the product's default category.
The sku can be inferred from either the passed in attributes as they are compared to the product's options or the sku can be determined from the product's default sku.
When adding a bundle using this DTO, you MUST have the ProductBundle included in the productId for it to
properly instantiate the BundleOrderItem
Important Note: To protect against misuse, the OrderService's addItemToCart method will blank out
any values passed in on this DTO for the overrideSalePrice or overrideRetailPrice.
Instead, implementors should call the more explicit addItemWithPriceOverrides.
-
Constructor Summary
ConstructorsConstructorDescriptionOrderItemRequestDTO(Long productId, Integer quantity) OrderItemRequestDTO(Long productId, Long skuId, Integer quantity) OrderItemRequestDTO(Long productId, Long skuId, Long categoryId, Integer quantity) -
Method Summary
Modifier and TypeMethodDescriptiongetSkuId()voidsetAdditionalAttributes(Map<String, String> additionalAttributes) setCategoryId(Long categoryId) voidsetChildOrderItems(List<OrderItemRequestDTO> childOrderItems) voidsetHasConfigurationError(Boolean hasConfigurationError) setItemAttributes(Map<String, String> itemAttributes) setOrderItemId(Long orderItemId) voidsetOverrideRetailPrice(Money overrideRetailPrice) voidsetOverrideSalePrice(Money overrideSalePrice) voidsetParentOrderItemId(Long parentOrderItemId) setProductId(Long productId) setQuantity(Integer quantity)
-
Constructor Details
-
OrderItemRequestDTO
public OrderItemRequestDTO() -
OrderItemRequestDTO
-
OrderItemRequestDTO
-
OrderItemRequestDTO
-
-
Method Details
-
getSkuId
-
setSkuId
-
getCategoryId
-
setCategoryId
-
getProductId
-
setProductId
-
getQuantity
-
setQuantity
-
getItemAttributes
-
setItemAttributes
-
getOrderItemId
-
setOrderItemId
-
getOverrideSalePrice
-
setOverrideSalePrice
-
getOverrideRetailPrice
-
setOverrideRetailPrice
-
getChildOrderItems
-
setChildOrderItems
-
getParentOrderItemId
-
setParentOrderItemId
-
getAdditionalAttributes
-
setAdditionalAttributes
-
getHasConfigurationError
-
setHasConfigurationError
-