Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Account Association module xml payload

Hello,
I am looking at adding an account to a user and have come across the AddAccountAssociation module. In the ParamsObj it calls for an xml_payload that then references the q2_sdk.hq.api_helpers. When clicking on the link https://docs.q2developer.com/api_references/q2_sdk/hq/api_helpers.html#module-q2_sdk.hq.api_helpers there are no definitions for an account association. What is this xml_payload looking for? Am I able to create a recipient account and then associate that account?

Posted 3 years ago
Votes Newest

Answers 2


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

Posted 3 years ago
Paden Rose
77 × 1 Administrator
0

Hello,
This is a great help thank you.
Some additional questions that I have are: If this is a new user that was created with a new customer id is there a way to look up existing host account ids or cif to link to? I am not sure how that would work

— Cameron Jensen   3 years ago

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

Posted 3 years ago
Paden Rose
77 × 1 Administrator
119 Views
2 Answers
3 years ago
3 years ago