I am trying to delete account or updating account using xero api. Api is giving me exception with status code like 400
A validation exception occurred, DELETE method cannot be used on Bank accounts.
Attached is the code.
//deleting account using unique id
xeroClient.deleteAccount("XXXXX-XxxxX-Xxxx-XXXX-XXXXXXX");
//setting deleted status via update()
Account account=new Account();
account.setAccountID("XXXXX-XxxxX-Xxxx-XXXX-XXXXXXX");
account.setStatus(AccountStatus.DELETED);
updateList.add(account);
xeroClient.updateAccount(updateList);
May I know why the exception I am getting while deleting account via Xero API