Ejemplo n.º 1
0
        public double pay(BillingPayRequest billingPay)
        {
            Customer customer = OnmemoryDataBase.findCustomerById(billingPay.customerId);

            customer.balance = customer.balance - billingPay.amount;
            Console.WriteLine($"Pago aplicado al cliente: {customer.name} ," +
                              $"El nuevo saldo es {customer.balance}");
            return(customer.balance);//new Balance
        }
Ejemplo n.º 2
0
 public Customer findCustomer(long customerId)
 {
     return(OnmemoryDataBase.findCustomerById(customerId));
 }
Ejemplo n.º 3
0
        public double queryCustomerBalance(long customerId)
        {
            Customer customer = OnmemoryDataBase.findCustomerById(customerId);

            return(customer.balance);
        }