private bool CanOrderFromSite(Customer customer) { var isValidAge = customer.Age > 18; var isApproved = CheckWithPaymentGateway(customer); return isApproved && isValidAge; }
private bool CheckWithPaymentGateway(Customer customer) { if (_paymentGateways.ContainsKey(customer.CCType)) { return _paymentGateways[customer.CCType].Approve(customer); } return false; }
private void SendOverseasPackage(Customer customer) { if (customer.Address.Country == "US") { // Shouldn't get here Debugger.Break(); } // Send package }
// <---- Use QuickAction Here. public void SendInvoice(Customer customer) { _queue.Add(new Tuple<string, int>(customer.EmailAddress, customer.PendingInvoiceID)); }
public bool Approve(Customer customer) { return _random.Next(1, 100) > 15; }