public Completable removeProduct ( Product product ) { List < Product > updatedShoppingCart = new ArrayList <> ( ) ; updatedShoppingCart . addAll ( itemsInShoppingCart . getValue ( ) ) ; updatedShoppingCart . remove ( product ) ; itemsInShoppingCart . onNext ( updatedShoppingCart ) ; return Completable . complete ( ) ; }
Remove a product to the shopping cart