private static void ValidatePin(VirtualCashCard virtualCashCard, ushort cardPin)
 {
     if (!virtualCashCard.ValidatePin(cardPin))
     {
         throw new InvalidOperationException("Invalid Card Pin");
     }
 }
 public decimal Withdraw(VirtualCashCard virtualCashCard, ushort cardPin, decimal amount)
 {
     ValidatePin(virtualCashCard, cardPin);
     ValidateAmount(amount);
     return(virtualCashCard.Withdraw(amount));
 }
 public decimal GetBalance(VirtualCashCard virtualCashCard, ushort cardPin)
 {
     ValidatePin(virtualCashCard, cardPin);
     return(virtualCashCard.GetBalance());
 }
 public bool TopUp(VirtualCashCard virtualCashCard, ushort cardPin, decimal amount)
 {
     ValidatePin(virtualCashCard, cardPin);
     ValidateAmount(amount);
     return(virtualCashCard.TopUp(amount));
 }