Interface ShoppingCartService
-
- All Known Implementing Classes:
ShoppingCartServiceImpl
public interface ShoppingCartService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ShoppingCartDTO
addCommerceItem(AddToCartRequest request)
Adds item.ShoppingCartDTO
addCommerceItem(java.lang.String sellerSkuId)
Adds item, simplified approach.ShoppingCartDTO
addCommerceItem(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Adds item.ShoppingCartDTO
addCommerceItems(MultipleAddToCartRequest request)
Adds item.ShoppingCartDTO
addCommerceItems(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Adds item.boolean
canAddItem(java.lang.String sellerSkuId)
Checks if item is available to add.boolean
checkCurrencyForCart(SellerSKU sellerSku)
Checking an item to be added to cart with the same currency as the first item.boolean
checkInventory(SellerSKU sellerSku)
Checks if default price is definedboolean
checkPrice(SellerSKU sellerSku)
Checks if default price is definedboolean
checkRestQuantity(SellerSKU sellerSku)
Checks if at least minimum order of the inventory could be added to the cart.boolean
checkStripeConnect(SellerSKU sellerSku)
Checking a stripe connect activation for the sellervoid
clearCart()
Removes all commerce items from cart.ShoppingCartDTO
decreaseQuantity(java.lang.String itemId)
Decreases quantity of commerce item.ShoppingCartDTO
getCartDTO()
Returns DTO of a current cart.ShoppingCartDTO
getCartDTO(java.lang.String buyerId)
Returns DTO of a current cart.ShoppingCartDTO
increaseQuantity(java.lang.String itemId)
Increases quantity of commerce item.ShoppingCartDTO
removeCommerceItem(java.lang.String itemId)
Removes item.ShoppingCartDTO
updateQuantity(java.lang.String itemId, java.lang.String quantity)
Decreases quantity of commerce item.
-
-
-
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
-
addCommerceItems
ShoppingCartDTO addCommerceItems(MultipleAddToCartRequest request)
Adds item.- Parameters:
request
- multiple items of SellerSKU to add- 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 itemquantity
- 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
-
-