Interface ShoppingCartService

    • Method Detail

      • getCartDTO

        ShoppingCartDTO getCartDTO()
        Returns DTO of a current cart.
        Returns:
        DTO
      • getCartDTO

        ShoppingCartDTO getCartDTO​(java.lang.String buyerId)
        Returns DTO of a current cart.
        Parameters:
        buyerId - identification of buyer id
        Returns:
        DTO of buyer cart
      • canAddItem

        boolean canAddItem​(java.lang.String sellerSkuId)
        Checks if item is available to add.
        Parameters:
        sellerSkuId - seller sku ID
        Returns:
        true — if item is available to add
      • addCommerceItems

        ShoppingCartDTO addCommerceItems​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> data)
        Adds item.
        Parameters:
        data - request object which contains all necessary information to add multiple items to cart
        Returns:
        DTO of the cart
      • addCommerceItem

        ShoppingCartDTO addCommerceItem​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> data)
        Adds item.
        Parameters:
        data - request object which contains all necessary information to add item to cart
        Returns:
        DTO of the cart
      • addCommerceItem

        ShoppingCartDTO addCommerceItem​(AddToCartRequest request)
        Adds item.
        Parameters:
        request - id of SellerSKU to add
        Returns:
        DTO of the cart
      • addCommerceItem

        ShoppingCartDTO addCommerceItem​(java.lang.String sellerSkuId)
        Adds item, simplified approach.
        Parameters:
        sellerSkuId - id of SellerSKU to add
        Returns:
        DTO of the cart
      • removeCommerceItem

        ShoppingCartDTO removeCommerceItem​(java.lang.String itemId)
        Removes item.
        Parameters:
        itemId - id of commerce item to remove
        Returns:
        DTO of the cart
      • clearCart

        void clearCart()
        Removes all commerce items from cart.
      • decreaseQuantity

        ShoppingCartDTO decreaseQuantity​(java.lang.String itemId)
        Decreases quantity of commerce item.
        Parameters:
        itemId - id of the item
        Returns:
        DTO of the cart
      • updateQuantity

        ShoppingCartDTO updateQuantity​(java.lang.String itemId,
                                       java.lang.String quantity)
        Decreases quantity of commerce item.
        Parameters:
        itemId - id of the item
        quantity - string value to update item quantity
        Returns:
        DTO of the cart
      • increaseQuantity

        ShoppingCartDTO increaseQuantity​(java.lang.String itemId)
        Increases quantity of commerce item.
        Parameters:
        itemId - id of the item
        Returns:
        DTO of the cart
      • checkPrice

        boolean checkPrice​(SellerSKU sellerSku)
        Checks if default price is defined
        Parameters:
        sellerSku - sellerSKU as entity
        Returns:
        true if the price is defined
      • checkInventory

        boolean checkInventory​(SellerSKU sellerSku)
        Checks if default price is defined
        Parameters:
        sellerSku - sellerSKU as entity
        Returns:
        true if the inventory is contains requested item
      • checkRestQuantity

        boolean checkRestQuantity​(SellerSKU sellerSku)
        Checks if at least minimum order of the inventory could be added to the cart.
        Parameters:
        sellerSku - SellerSKU as entity
        Returns:
        true if the quantity could be increased
      • checkCurrencyForCart

        boolean checkCurrencyForCart​(SellerSKU sellerSku)
        Checking an item to be added to cart with the same currency as the first item.
        Parameters:
        sellerSku - SellerSKU as entity
        Returns:
        true if the quantity could be increased
      • checkStripeConnect

        boolean checkStripeConnect​(SellerSKU sellerSku)
        Checking a stripe connect activation for the seller
        Parameters:
        sellerSku - SellerSKU as entity
        Returns:
        check if stripe connect is activated