Class CartCreationRequest

java.lang.Object
com.broadleafcommerce.cartoperation.domain.CartCreationRequest
All Implemented Interfaces:
Serializable

public class CartCreationRequest extends Object implements Serializable
A request DTO used to create a new Cart.
Author:
Nick Crum (ncrum)
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Allows optionally setting a cart name. This is typically blank for standard, in-process carts, and may be set when creating a Quote or Named cart directly.
    • getType

      public String getType()
      Allows optionally setting the type of cart to be created. Default is DefaultCartTypes.STANDARD.
      See Also:
    • getExpirationDate

      public Instant getExpirationDate()
      DefaultCartTypes.QUOTE carts can have an expiration date.
    • getAddItemRequest

      public AddItemRequest getAddItemRequest()
      The initial AddItemRequest to populate the cart.
    • getAddItemRequests

      public List<AddItemRequest> getAddItemRequests()
      The initial AddItemRequests to populate the cart.

      If addItemRequest is provided, this will not be used.

    • getPriceCartRequest

      public PriceCartRequest getPriceCartRequest()
      The initial PriceCartRequest to price the cart.
    • setName

      public void setName(String name)
      Allows optionally setting a cart name. This is typically blank for standard, in-process carts, and may be set when creating a Quote or Named cart directly.
    • setType

      public void setType(String type)
      Allows optionally setting the type of cart to be created. Default is DefaultCartTypes.STANDARD.
      See Also:
    • setExpirationDate

      public void setExpirationDate(Instant expirationDate)
      DefaultCartTypes.QUOTE carts can have an expiration date.
    • setAddItemRequest

      public void setAddItemRequest(AddItemRequest addItemRequest)
      The initial AddItemRequest to populate the cart.
    • setAddItemRequests

      public void setAddItemRequests(List<AddItemRequest> addItemRequests)
      The initial AddItemRequests to populate the cart.

      If addItemRequest is provided, this will not be used.

    • setPriceCartRequest

      public void setPriceCartRequest(PriceCartRequest priceCartRequest)
      The initial PriceCartRequest to price the cart.
    • 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