Class CartRequest

  • All Implemented Interfaces:
    CartVersionedRequest, com.broadleafcommerce.data.tracking.core.ContextStateAware, com.broadleafcommerce.money.CurrencyConsumer, Serializable, javax.money.CurrencySupplier

    public class CartRequest
    extends com.broadleafcommerce.cart.client.domain.Cart
    implements CartVersionedRequest
    Represents a cart request (when a cart is submitted as the request body).
    Author:
    Jacob Mitash
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CartRequest()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Integer getCartVersion()
      Gets the cart version that the client is aware of.
      String getRequestId()
      A unique id used to represent the request.
      Map<String,​String> getSecurityCodes()
      A map of security codes to their payment ids.
      void setCartVersion​(Integer version)
      Sets the cart version.
      void setRequestId​(String requestId)
      A unique id used to represent the request.
      void setSecurityCodes​(Map<String,​String> securityCodes)
      A map of security codes to their payment ids.
      String toString()  
      • Methods inherited from class com.broadleafcommerce.cart.client.domain.Cart

        canEqual, equals, getAdjustments, getApprovalRequestedDate, getApproverEmail, getAttributeChoices, getAttributes, getCampaignRefs, getCartAlerts, getCartItems, getCartItemsWithDependentItems, getCartPricing, getCheckoutSubmissions, getContextState, getCreateDate, getCurrency, getCustomerRef, getEmailAddress, getFulfillmentGroups, getId, getInternalAttributes, getLastCatalogReprice, getLocale, getName, getOfferCodes, getOrderNumber, getQuantity, getStatus, getSubmitDate, getVersion, getVouchers, hashCode, isAnonymous, isPriced, isTaxEstimated, setAdjustments, setApprovalRequestedDate, setApproverEmail, setAttributeChoices, setAttributes, setCampaignRefs, setCartAlerts, setCartItems, setCartPricing, setCheckoutSubmissions, setContextState, setCreateDate, setCurrency, setCustomerRef, setEmailAddress, setFulfillmentGroups, setId, setInternalAttributes, setLastCatalogReprice, setLocale, setName, setOfferCodes, setOrderNumber, setPriced, setStatus, setSubmitDate, setTaxEstimated, setVersion, setVouchers
    • Constructor Detail

      • CartRequest

        public CartRequest()
    • Method Detail

      • getCartVersion

        public Integer getCartVersion()
        Description copied from interface: CartVersionedRequest
        Gets the cart version that the client is aware of. This should be populated by the client when making a request that modifies an existing cart.
        Specified by:
        getCartVersion in interface CartVersionedRequest
        Returns:
        the cart version
      • setCartVersion

        public void setCartVersion​(Integer version)
        Description copied from interface: CartVersionedRequest
        Sets the cart version. Typically only used for setting the version on the request body if the version came from an alternative source (e.g. cookie or header).
        Specified by:
        setCartVersion in interface CartVersionedRequest
        Parameters:
        version - the version to set for this request
      • toString

        public String toString()
        Overrides:
        toString in class com.broadleafcommerce.cart.client.domain.Cart
      • getRequestId

        public String getRequestId()
        A unique id used to represent the request. This value can be used to link various persisted entities/values to the originating request.
      • setRequestId

        public void setRequestId​(String requestId)
        A unique id used to represent the request. This value can be used to link various persisted entities/values to the originating request.
      • getSecurityCodes

        public Map<String,​String> getSecurityCodes()
        A map of security codes to their payment ids. This value can be used in payment activities to pass secure code information to payment gateways.
      • setSecurityCodes

        public void setSecurityCodes​(Map<String,​String> securityCodes)
        A map of security codes to their payment ids. This value can be used in payment activities to pass secure code information to payment gateways.