Mappers

DemographicInfoMapper

class q2_cores.FISIBSOpenAPI.mappers.demographic_info_mapper.DemographicInfoMapper(list_of_queries, hq_credentials=None, logger=None, search_method=SearchMethod.SSN, allow_joint_enrollment=False, core_user=None, passport_id_type='', include_phone_and_email=True)[source]

Bases: BaseDemographicInfoMapper

parse_returned_queries(list_of_queries)[source]

Handles the demographic information response from the core

Return type:

DemographicInfo

build_from_cif_response(response, list_of_queries=None)[source]

Builds the demographic info object using the user’s CIF

Return type:

DemographicInfo

build_from_acct_response(response)[source]

Builds the demographic info object using the user’s AccountNumber and the related AccountType

Return type:

DemographicInfo

build_from_profile_response(response)[source]

Builds the demographic info object from the dynamic-profile response

Return type:

DemographicInfo

static build_from_tax_id_response(response)[source]

Builds the demographic info object from the demo call using customer’s TaxID

Return type:

DemographicInfo

build_phone_objects(core_phones)[source]

Builds SDK Phone objects using the phones returned from the core

Return type:

List[Phone]

q2_cores.FISIBSOpenAPI.mappers.demographic_info_mapper.get_phones_from_entity(entity)[source]

Parses the entity element for phone numbers

Return type:

List[Phone]

q2_cores.FISIBSOpenAPI.mappers.demographic_info_mapper.get_drivers_license_from_entity(entity, state)[source]

Parses the entity element for a drivers license

Return type:

Optional[DriverLicense]

q2_cores.FISIBSOpenAPI.mappers.demographic_info_mapper.get_passport_id_from_profile(profile, passport_id_type)[source]

Parses the profile element for a Passport ID

Return type:

Optional[str]

q2_cores.FISIBSOpenAPI.mappers.demographic_info_mapper.get_error_message(meta_data, default)[source]

Returns the error message from the response if available

Parameters:
  • metadata – Metadata element in the demographic info response

  • default (str) – Message to return if one is not found in the metadata

Return type:

str

Returns:

Error message if available, otherwise default message is returned

GetPhoneNumbersMapper

class q2_cores.FISIBSOpenAPI.mappers.get_phone_numbers_mapper.GetPhoneNumbersMapper(list_of_queries=None, hq_credentials=None)[source]

Bases: BaseDemographicInfoMapper

parse_returned_queries(list_of_queries)[source]

Handles the phone number response from the core

Return type:

List[Phone]

Returns:

returns a list of phones

GetEmailAddressesMapper

class q2_cores.FISIBSOpenAPI.mappers.get_email_addresses_mapper.GetEmailAddressesMapper(list_of_queries=None, hq_credentials=None)[source]

Bases: BaseDemographicInfoMapper

parse_returned_queries(list_of_queries)[source]

Handles the email address response from the core

Return type:

List[str]

Returns:

returns a list of emails