Exemplo n.º 1
0
 public void Processa(IList <Boleto> boletos, Fatura fatura)
 {
     foreach (Boleto boleto in boletos)
     {
         Pagamento pagamento = new Pagamento(boleto.Valor, MeioDePagamento.BOLETO);
         fatura.AdicionaPagamento(pagamento);
     }
 }
Exemplo n.º 2
0
        public void Processa(List <Boleto> boletos, Fatura fatura)
        {
            double total = 0;

            foreach (Boleto boleto in boletos)
            {
                Pagamento pagamento = new Pagamento(boleto.Valor, MeioDePagamento.Boleto);
                fatura.AdicionaPagamento(pagamento);

                total += boleto.Valor;
            }
        }