Class AddItemFailure

java.lang.Object
com.broadleafcommerce.cartoperation.service.AddItemFailure

public class AddItemFailure extends Object
Represents an AddItemRequest that failed due to either an inability to identify the Product that is being added to cart or the request does not specify all required attributes for the Product
Author:
Chris Kittrell (ckittrell)
  • Constructor Details

    • AddItemFailure

      public AddItemFailure()
  • Method Details

    • getAddItemRequest

      public AddItemRequest getAddItemRequest()
      The add item request that failed
    • getType

      public String getType()
      The type of failure that this request encountered.
      See Also:
    • getInvalidCartItem

      public com.broadleafcommerce.cart.client.domain.CartItem getInvalidCartItem()
      If type is AddItemFailure.AddItemFailureType.VALIDATION, this object represents the invalid CartItem that was built based on the provided addItemRequest
      Returns:
      The invalid cart item that was build based on the addItemRequest
    • setAddItemRequest

      public void setAddItemRequest(AddItemRequest addItemRequest)
      The add item request that failed
    • setType

      public void setType(String type)
      The type of failure that this request encountered.
      See Also:
    • setInvalidCartItem

      public void setInvalidCartItem(com.broadleafcommerce.cart.client.domain.CartItem invalidCartItem)
      If type is AddItemFailure.AddItemFailureType.VALIDATION, this object represents the invalid CartItem that was built based on the provided addItemRequest
      Parameters:
      invalidCartItem - The invalid cart item that was build based on the addItemRequest
    • 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