public static void ReturnChange(Sale sale, Payment payment) { _stateMachine.FireTrigger(sale, SaleEvent.ChangeGiven, payment); }
public static void AddItem(Sale sale, SaleItem saleItem) { _stateMachine.FireTrigger(sale, SaleEvent.AddItem, saleItem); }
public static void AddPayment(Sale sale, Payment payment) { _stateMachine.FireTrigger(sale, SaleEvent.Pay, payment); }
private static string getSaleStatus(Sale sale) { return($"\r\n--> SaleState: {sale.State} \tBalance: {sale.Balance:$#,##0.00}."); }