Interface TmaCartFacade

All Superinterfaces:
de.hybris.platform.commercefacades.order.CartFacade
All Known Implementing Classes:
DefaultTmaCartFacade, DefaultTmaWebServicesCartFacade

public interface TmaCartFacade extends de.hybris.platform.commercefacades.order.CartFacade
Facade handling cart operations for TmaProductOffering.
Since:
6.7
  • Method Details

    • getCartForCodeAndCustomer

      Optional<CartData> getCartForCodeAndCustomer(String code, String customerId)
      Get a cart using code and UserModel
      Parameters:
      code - The cart identifier code
      customerId - The id of the customer who owns the cart
      Returns:
      cart
    • getCartForCodeAndCustomer

      Optional<CartData> getCartForCodeAndCustomer(String code, String customerId, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException
      Get a cart using code and customer id
      Parameters:
      code - The cart identifier code
      customerId - The id of the customer who owns the cart
      recalculate - Flag which indicates if the cart should be recalculated or not
      Returns:
      cart
      Throws:
      de.hybris.platform.order.exceptions.CalculationException - If errors occurre during cart recalculation
    • getCartForCode

      Optional<CartData> getCartForCode(String code, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException
      Retrieve a cart using code
      Parameters:
      code - The cart identifier code
      recalculate - Flag which indicates if the cart should be recalculated or not
      Returns:
      cart
      Throws:
      de.hybris.platform.order.exceptions.CalculationException - If errors occurred during cart recalculation
    • getCartsForCustomer

      List<CartData> getCartsForCustomer(String customerId)
      Get the list of carts for a customer
      Parameters:
      customerId - The id of the customer who owns the carts
      Returns:
      the cart list
    • getCartsForCustomer

      List<CartData> getCartsForCustomer(String customerId, boolean recalculate) throws de.hybris.platform.order.exceptions.CalculationException
      Get the list of carts for a customer
      Parameters:
      customerId - The id of the customer who owns the carts
      recalculate - Flag which indicates if the cart should be recalculated or not
      Returns:
      the cart list
      Throws:
      de.hybris.platform.order.exceptions.CalculationException - If errors occurre during cart recalculation
    • getCarts

      List<CartData> getCarts(boolean recalculate, Integer offset, Integer limit) throws de.hybris.platform.order.exceptions.CalculationException
      Retrieve the list of all carts
      Parameters:
      recalculate - Flag which indicates if the carts should be recalculated or not
      offset - the offset represents the position in list from where the result list will start.
      limit - the limit represents the number of entries that will be selected for the result list.
      Returns:
      the cart list
      Throws:
      de.hybris.platform.order.exceptions.CalculationException - If errors occurred during cart recalculation
    • processCartAction

      List<CartModificationData> processCartAction(List<CartActionInput> cartActionInputList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Processes cart entry updates.
      Parameters:
      cartActionInputList - contains attributes used for cart entry updates
      Returns:
      list CartModificationData
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - in case of any error occurs during cart entry update
    • createCartForUserAndCurrentBaseSite

      CartData createCartForUserAndCurrentBaseSite(String userId)
      Creates a cart for the provided user if cart does not exist. If cart exists returns the existing cart.
      Parameters:
      userId - The unique identifier of the user.
      Returns:
      The cart which was created.
    • addProductOfferingToCart

      @Deprecated(since="1907", forRemoval=true) CartModificationData addProductOfferingToCart(String spoCode, long quantity, String processType, String rootBpoCode, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1907, use processCartAction(List) instead
      Adds a new cart entry containing a TmaSimpleProductOfferingModel to the existing cart. The product offering can be added as a single offering, but also as part of a TmaBundledProductOfferingModel.
      Parameters:
      spoCode - ProductModel.CODE
      quantity - product offering quantity to be added to cart
      processType - represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)
      rootBpoCode - root ProductModel.CODE
      cartGroupNo - the cart entry group number on which the new entry to be attached to, if -1 a new entry group will be created
      subscriptionTermId - subscription term id for the entry
      subscriberId - subscriber id in case of an existing customer
      subscriberBillingId - subscriber billing id in case of an existing customer
      Returns:
      details related to the new cart entry
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - in case of any error occurs during new cart entry addition
    • addBpoSelectedOfferings

      @Deprecated(since="1907", forRemoval=true) List<CartModificationData> addBpoSelectedOfferings(String rootBpoCode, List<String> simpleProductOfferings, String processType, int cartGroupNo, String subscriptionTermId, String subscriberId, String subscriberBillingId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1907, use processCartAction(List) instead
      Adds multiple cart entries containing a TmaSimpleProductOfferingModel to the existing cart, all of them being part of the TmaBundledProductOfferingModel specified by the rootBpoCode. If the cartGroupNo is valid, then the new entries are added as part of the corresponding cart group, otherwise, if cartGroupNo is -1, a new cart group is created for the new added entries.
      Parameters:
      rootBpoCode - ProductModel.CODE of the bundled offering added to cart
      simpleProductOfferings - a list containing ProductModel.CODE
      processType - represents the process flow in the context of which the entry is added to cart (Acquisition, Retention, etc.)
      cartGroupNo - existing cart entry group number
      subscriptionTermId - subscription term id for the entry
      subscriberId - subscriber id in case of an existing customer
      subscriberBillingId - subscriber billing id in case of an existing customer
      Returns:
      details regarding new added entries
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException - in case of any error occurs during new cart entries addition
    • getCartForGuid

      Optional<CartData> getCartForGuid(String guid)
      Get a cart using guid
      Parameters:
      guid -
      Returns:
      the specific cart for given guid
    • isAnonymousUserCart

      boolean isAnonymousUserCart(String cartGuid)
      Checks if given card belongs to anonymous user.
      Parameters:
      cartGuid - GUID of the cart.
      Returns:
      true if the cart belongs to anonymous user.
    • isCurrentUserCart

      boolean isCurrentUserCart(String cartGuid)
      Checks if given card belongs to current user.
      Parameters:
      cartGuid - GUID of the cart.
      Returns:
      true if the cart belongs to current user.
    • validateAndUpdateCartActionInputForClone

      void validateAndUpdateCartActionInputForClone(CartActionInput cartActionInput) throws de.hybris.platform.commerceservices.order.CommerceSaveCartException
      Validates and updates cart action inputs for clone operation
      Parameters:
      cartActionInput -
      Throws:
      de.hybris.platform.commerceservices.order.CommerceSaveCartException
    • isValidCartStatus

      boolean isValidCartStatus(String status)
      Checks if the requested status for cart is valid or not
      Parameters:
      status - the requested status to be updated for cart
      Returns:
      True if requested status is valid status, otherwise false