java.lang.Object
com.broadleafcommerce.subscriptionoperation.web.domain.CreateCartRequest
All Implemented Interfaces:
Serializable

public class CreateCartRequest extends Object implements Serializable
A request DTO used to create a new Cart.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • CreateCartRequest

      public CreateCartRequest()
  • 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:
      • DefaultCartTypes
    • getExpirationDate

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

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

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

      public String getCustomerTimezone()
      The customer's timezone, which gets stored in Cart.getInternalAttributes() to be used by downstream services.

      If this is present in subscription scenarios, then it will be used to adjust subscription dates to describe the beginning/end of days relative to the customer's timezone.

      See Also:
    • getCartInternalAttributes

      public Map<String,Object> getCartInternalAttributes()
      Miscellaneous internal attributes for this item. It is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes to help with processing the cart's checkout.
    • getCartAttributes

      public Map<String,Object> getCartAttributes()
      Miscellaneous attributes that should be copied to Cart.getAttributes()
    • 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:
      • DefaultCartTypes
    • setExpirationDate

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

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

      public void setPriceCartRequest(PriceCartRequest priceCartRequest)
      The initial PriceCartRequest to price the cart.
    • setCustomerTimezone

      public void setCustomerTimezone(String customerTimezone)
      The customer's timezone, which gets stored in Cart.getInternalAttributes() to be used by downstream services.

      If this is present in subscription scenarios, then it will be used to adjust subscription dates to describe the beginning/end of days relative to the customer's timezone.

      See Also:
    • setCartInternalAttributes

      public void setCartInternalAttributes(Map<String,Object> cartInternalAttributes)
      Miscellaneous internal attributes for this item. It is used for attributes that assist in the internal working of Broadleaf MicroServices. For example, attributes to help with processing the cart's checkout.
    • setCartAttributes

      public void setCartAttributes(Map<String,Object> cartAttributes)
      Miscellaneous attributes that should be copied to Cart.getAttributes()
    • 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