public static void DeleteCustomerBankAccount(int customerID, ExigoService.BankAccountType type) { // If this is a new credit card, don't delete it - we have nothing to delete if (type == ExigoService.BankAccountType.New) { return; } // Save the a blank copy of the bank account // Save the bank account var request = new SetAccountCheckingRequest { CustomerID = customerID, BankName = string.Empty, BankAccountNumber = string.Empty, BankRoutingNumber = string.Empty, BankAccountType = Common.Api.ExigoWebService.BankAccountType.CheckingPersonal, NameOnAccount = string.Empty, BillingAddress = string.Empty, BillingCity = string.Empty, BillingState = string.Empty, BillingZip = string.Empty, BillingCountry = string.Empty }; var response = Exigo.WebService().SetAccountChecking(request); }
public static BankAccount SetCustomerBankAccount(int customerID, BankAccount account, ExigoService.BankAccountType type) { // New bank accounts if (type == ExigoService.BankAccountType.New) { return(SaveNewCustomerBankAccount(customerID, account)); } // Save the bank account var request = new SetAccountCheckingRequest { CustomerID = customerID, BankName = account.BankName, BankAccountNumber = account.AccountNumber, BankRoutingNumber = account.RoutingNumber, BankAccountType = Common.Api.ExigoWebService.BankAccountType.CheckingPersonal, NameOnAccount = account.NameOnAccount, BillingAddress = account.BillingAddress.AddressDisplay, BillingCity = account.BillingAddress.City, BillingState = account.BillingAddress.State, BillingZip = account.BillingAddress.Zip, BillingCountry = account.BillingAddress.Country }; var response = Exigo.WebService().SetAccountChecking(request); return(account); }
// Handling bank accounts private SetAccountCheckingRequest Request_SaveNewBankAccountToAccount() { SetAccountCheckingRequest request = new SetAccountCheckingRequest(); request.CustomerID = Identity.Current.CustomerID; request.BankName = Autoship.PropertyBag.BankAccountBankName; request.NameOnAccount = Autoship.PropertyBag.BankAccountNameOnAccount; request.BankAccountType = Autoship.PropertyBag.BankAccountAccountType; request.BankAccountNumber = Autoship.PropertyBag.BankAccountAccountNumber; request.BankRoutingNumber = Autoship.PropertyBag.BankAccountRoutingNumber; request.BillingAddress = Autoship.PropertyBag.BankAccountBankAddress; request.BillingCity = Autoship.PropertyBag.BankAccountBankCity; request.BillingState = Autoship.PropertyBag.BankAccountBankState; request.BillingZip = Autoship.PropertyBag.BankAccountBankZip; request.BillingCountry = Autoship.PropertyBag.BankAccountBankCountry; return request; }
/// <remarks/> public void SetAccountCheckingAsync(SetAccountCheckingRequest SetAccountCheckingRequest, object userState) { if ((this.SetAccountCheckingOperationCompleted == null)) { this.SetAccountCheckingOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetAccountCheckingOperationCompleted); } this.InvokeAsync("SetAccountChecking", new object[] { SetAccountCheckingRequest}, this.SetAccountCheckingOperationCompleted, userState); }
/// <remarks/> public void SetAccountCheckingAsync(SetAccountCheckingRequest SetAccountCheckingRequest) { this.SetAccountCheckingAsync(SetAccountCheckingRequest, null); }