Sean Reilly on 12 May, 2017 09:14 PM
Ah yes, in order to delete an account you'll need to call the .deleteItem() method on that account. Please make sure that there are no transactions (including in reminders) or subaccounts that may still refer to that account though.
The .deleteItem() works, but unfortunately doesn't delete its' subaccounts.
I'm migrating from Quicken and want to delete the default accounts and
categories. I can iterate through them though.
So is the documentation for .removeSubAccount() wrong, or what?
Sean Reilly on 21 May, 2017 09:08 AM
Ah yes, that method is not public so it's not supposed to be exposed, however that doesn't matter to the Python interface as it uses reflection to find and invoke methods. That method also shouldn't be appearing in the API documentation, but I believe it does have a "caution" note in it to indicate that orphan transactions (not to mention accounts) could result as it's supposed to be a behind the scenes method used for keeping the account hierarchy up-to-date.
From the Python API there is a non-published method that I can't see us changing anytime soon that you could use: