Mappers

BaseMapper

class q2_cores.CorePro.mappers.base_mapper.CoreProBaseMapper(list_of_queries, core_config, hq_credentials=None, zone_context=None)[source]

Bases: BaseMapper

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:

CoreProResponse

async execute()[source]
Return type:

CoreProResponse

  • Calls .execute on all queries in self.list_of_queries

  • Calls .parse_returned_queries on the results

GetCustomerMapper

class q2_cores.CorePro.mappers.get_customer.GetCustomerMapper(list_of_queries, core_config, hq_credentials=None, zone_context=None)[source]

Bases: CoreProBaseMapper

async execute()[source]
Return type:

DemographicInfo

  • Calls .execute on all queries in self.list_of_queries

  • Calls .parse_returned_queries on the results

static get_address_list(raw_addresses, logger)[source]

Parses Corepro Address shapes into a list of q2_sdk.models.demographic.Address objects

Return type:

List[Address]

static get_phone_list(raw_phones, logger)[source]

Parses Corepro Phone shapes into a list of q2_sdk.models.demographic.Phone objects

Return type:

List[Phone]

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