Last active
May 10, 2022 14:28
-
-
Save Raiden18/49f0ee8268fba59a47977272543d1cc9 to your computer and use it in GitHub Desktop.
InformationExpert. Interactor with method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CartInteractor( | |
private val cartRepository: CartRepository | |
) { | |
fun getCart() : Cart { | |
return cartRepository.getCart() | |
} | |
fun getApproximatePriceOfProducts(cart: Cart): BigDecimal { | |
return cart.products.sumOf{ it.price } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment