Interface MergeCartService

All Known Implementing Classes:
MergeCartServiceImpl

public interface MergeCartService
Author:
Andre Azzolini (apazzolini)
  • Method Details

    • mergeCart

      MergeCartResponse mergeCart(Customer customer, Order anonymousCart, boolean priceOrder) throws PricingException, RemoveFromCartException
      Merges the anonymous cart with the customer's current cart, taking into consideration the active status of the SKUs to merge. For example, if the customer had a SKU in their anonymous cart that is no longer active, it will not be merged into the new cart.
      Parameters:
      customer - the customer whose cart is to be merged
      anonymousCart - the anonymous cart id
      priceOrder - whether or not to price the order
      Returns:
      the response containing the cart, any items added to the cart, and any items removed from the cart
      Throws:
      PricingException
      RemoveFromCartException
    • mergeCart

      MergeCartResponse mergeCart(Customer customer, Order anonymousCart) throws PricingException, RemoveFromCartException
      Delegates to mergeCart(Customer, Order, boolean) with priceOrder set to true

      Merges the anonymous cart with the customer's current cart, taking into consideration the active status of the SKUs to merge. For example, if the customer had a SKU in their anonymous cart that is no longer active, it will not be merged into the new cart.

      Parameters:
      customer - the customer whose cart is to be merged
      anonymousCart - the anonymous cart id
      Returns:
      the response containing the cart, any items added to the cart, and any items removed from the cart
      Throws:
      PricingException
      RemoveFromCartException
    • reconstructCart

      ReconstructCartResponse reconstructCart(Customer customer, boolean priceOrder) throws PricingException, RemoveFromCartException
      Reconstruct the cart using previous stored state taking into consideration sku activation
      Parameters:
      customer - the customer whose cart is to be reconstructed
      Returns:
      the response containing the cart and any items removed from the cart
      Throws:
      RemoveFromCartException
      PricingException
    • reconstructCart

      Delegates to reconstructCart(Customer, boolean) with priceOrder set to true

      Reconstruct the cart using previous stored state taking into consideration sku activation

      Parameters:
      customer - the customer whose cart is to be reconstructed
      Returns:
      the response containing the cart and any items removed from the cart
      Throws:
      PricingException
      RemoveFromCartException