removeCreditCardFromDatabase method

  1. @override
Future<void> removeCreditCardFromDatabase (
  1. CreditCardRemovalRequest req
)
override

Implementation

@override
Future<void> removeCreditCardFromDatabase(
    CreditCardRemovalRequest req) async {
  await Future.delayed(Duration(milliseconds: 200));
  if (cardDatabase.containsKey(req.cardId)) {
    cardDatabase.remove(req.cardId);
  } else {
    throw Exception('The credit card is not found');
  }
}