Hi Shawn,
Thank you for the clarification. In that case, you may be interested in the GetAccountDetailsByIDWithUserLogon hq endpoint (https://docs.q2developer.com/api_references/hq_api/q2_api/GetAccountDetailsByIdWithUserLogon.html?highlight=available%20balance) which will take in a host account id and a user id and return account details including the available balance.
Please let me know if you have additional questions.
Thank you,
Solène
I was able to access the GeneratedTransactionRights node, but it looks like it only provides the limit settings, but I'm looking for how much is still available to be transacted for the current day, etc.
Here is the code for future reference:
from q2_sdk.hq.db import policy_data
policy = await policy_data.PolicyData.get(self, policy_data.Entity.User, self.online_user.user_id)
self.logger.info("GeneratedTransactionRights > ExternalTransfer: " + str(policy.User.GeneratedTransactionRights[9]))
Logging Results:
GeneratedTransactionRights > ExternalTransfer: GeneratedTransactionRights(PolicyIdentifier='U-15', TransactionTypeID=13, ShortName='ExternalTransfer', GroupID=None, CustomerID=None, UserID=15, UserRoleID=None, CompanyID=None, Enabled=True, Authorize=True, Cancel=True, Create=True, CreateRestricted=False, Update=True, View=1, LimitPerTransaction=999999.99, LimitPerDay=999999.99, LimitPerMonth=999999.99, LimitPerAcctPerDay=999999.99, CountPerDay=999, CountPerMonth=999, CountPerAcctPerDay=999, DualApprovalLimit=-1.0, TokenRequiredLimit=-1.0, DraftLimit=0.0, SourceAccounts=None, DestinationAccounts=None)
Solene,
Thanks for your response! So, is the GeneratedTransactionRights node detailed enough to tell me what limit amount is still available? i.e. Daily Limit is 15k, Member has already transferred 14k, so I would be able to see that 1k is still available to be transferred.
Thanks in advance,
Shawn
Hi Shawn,
To find more information regarding user transactions via the SDK:
We have a Policy Data DBObject that would allow you to retrieve such information (see https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/policy_data.html). More specifically, you will be interested in the GeneratedTransactionRights node that gets returned from the get function which will provide more detail on a given user's transaction limits.
If you are doing this through Caliper API:
Our Get Policy Data endpoint (https://docs.q2api.com/docs/q2-caliper-api/6ba6279e5c36c-get-policy-data) will return the values you are looking for. For more information on the response, please visit our Update Policy Data endpoint (https://docs.q2api.com/docs/q2-caliper-api/284cd2b67ad31-update-policy-data).
Thank you,
Solène