Example #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
        }
Example #2
0
 public Customer findCustomer(long customerId)
 {
     return(OnmemoryDataBase.findCustomerById(customerId));
 }
Example #3
0
        public double queryCustomerBalance(long customerId)
        {
            Customer customer = OnmemoryDataBase.findCustomerById(customerId);

            return(customer.balance);
        }