Ejemplo n.º 1
0
 private Inscricao(string id, Aluno aluno, Turma turma, DateTime inscritoEm, ETipoPagamento tipoPagamento)
 {
     Id            = id;
     Aluno         = aluno;
     Turma         = turma;
     InscritoEm    = inscritoEm;
     TipoPagamento = tipoPagamento;
 }
        public IPagamentoServico GetPagamentoServico(ETipoPagamento tipoPagamento)
        {
            switch (tipoPagamento)
            {
            case ETipoPagamento.CARTAO:
                return(new PagamentoCartaoServico(_paymentSettings, _httpHandler));

            default: throw new NotImplementedException("Servico não implementado!");
            }
        }
Ejemplo n.º 3
0
        public Pedido(
            ETipoPagamento tipoPagamento,
            Cliente cliente)
        {
            Data          = DateTime.Now;
            TipoPagamento = tipoPagamento;
            Cliente       = cliente;
            Desconto      = 0;
            _items        = new List <ItemPedido>();

            new ValidationContract <Pedido>(this)
            .IsGreaterThan(x => x.Data, DateTime.Now.AddSeconds(-5));
        }
 public static string GetUrlBase(this PaymentSettings paymentSettings, ETipoPagamento tipoPagamento)
 {
     return(paymentSettings.PaymentsSettings.Where(FiltraTipoPagamento(tipoPagamento)).FirstOrDefault().UrlBase);
 }
 private static System.Func <PaymentSetting, bool> FiltraTipoPagamento(ETipoPagamento tipoPagamento)
 {
     return(p => p.TipoPagamento == (int)tipoPagamento);
 }
Ejemplo n.º 6
0
 public static Inscricao Criar(Aluno aluno, Turma turma, ETipoPagamento tipoPagamento)
 {
     return(new Inscricao(Guid.NewGuid().ToString(), aluno, turma, DateTime.Now, tipoPagamento));
 }