In addition to my above comment, there is another way method of adding accounts to a user. There is the DbObject LinkedAccount which has two add functions: add, and add_by_primary_cif. You can see them in the documentation here: https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/linked_account.html#q2_sdk.hq.db.linked_account.LinkedAccount.add
Hello Cameron,
It looks like the account association xml builder function is missing from the documentation, but it does exist in the file. Here is the function signature
def build_account_association_xml(customer_id: int, user_id: int, account_access: int,
host_account_id: Optional[int] = None,
link_by_cif=False, cif_internal: Optional[str] = None,
customer_account_id: Optional[int] = None,
primary_only: Optional[bool] = True) -> str:
You can also view this in the docs if you click on the [source] link. Let me know if this helps, or if you have any other questions.
Thanks,
Paden Rose