Mappers

DemographicInfoMapper

class q2_cores.Users.mappers.demographic_info.DemographicInfoMapper(list_of_queries, hq_credentials=None, zone_context=None)[source]

Bases: BaseDemographicInfoMapper

static parse_returned_queries(list_of_queries)[source]

After all queries in list_of_queries have been run, this parses the results into a standardized response type.

Return type:

DemographicInfo

OpenAccountMapper

class q2_cores.Users.mappers.open_account.GetSubAccountMapper(list_of_queries, cache_key, hq_credentials=None, zone_context=None)[source]

Bases: BaseMapper

async execute()[source]
Return type:

List[dict]

  • Calls .execute on all queries in self.list_of_queries

  • Calls .parse_returned_queries on the results

static parse_returned_queries(list_of_queries)[source]

After all queries in list_of_queries have been run, this parses the results into a standardized response type.

Return type:

List[dict]

class q2_cores.Users.mappers.open_account.GetSubAccountDetailsMapper(list_of_queries, hq_credentials=None, zone_context=None)[source]

Bases: BaseMapper

async execute()[source]

Overwriting execute to only return the parsed response of the sub_account_response from cache No need to make a core call here :rtype: UsersSubAccountDetails :return:

static parse_returned_queries(list_of_queries)[source]

After all queries in list_of_queries have been run, this parses the results into a standardized response type.

Return type:

UsersSubAccountDetails