public CreditCard[] GetCustomerCreditCards(Customer exampleCustomer)
        {
            getCustomerAccountsRequestType request = new getCustomerAccountsRequestType();

            request.customerId = exampleCustomer.CustomerId;
            getCustomerAccountsResponseType response = _productsServiceProxy.GetCustomerAccounts(request);

            return(Translator.Translate <CreditCard[]>(response.creditCards));
        }
예제 #2
0
        public void PurchaseCertificateOfDeposit(Customer customer, Account sourceAccount, decimal amount, int duration, decimal interestRate)
        {
            try
            {
                PurchaseCertidicateOfDepositRequest request = new PurchaseCertidicateOfDepositRequest();
                request.Amount         = (float)amount;
                request.Customer       = Translator.Translate <ServiceProxies.Customer>(customer);
                request.DurationInDays = duration;
                request.InterestRate   = (float)interestRate;
                request.SourceAccount  = Translator.Translate <accountType>(sourceAccount);
                _accountServiceproxy.PurchaseCertificateOfDeposit(request);
            }
            catch (SoapException ex)
            {
                if (ex.Detail.FirstChild.LocalName == typeof(InsufficientFundsException).Name)
                {
                    throw new InsufficientFundsException();
                }

                throw;
            }
        }
예제 #3
0
 public void AddCustomer(Customer customer, string reason, string description)
 {
     AddToQueue(customer, reason, description);
 }