Corelation
Core
- enum q2_cores.Corelation.core.PersonVerificationBy(value)[source]
Bases:
Enum
Valid values are as follows:
- BY_TIN = <PersonVerificationBy.BY_TIN: 'BY_TIN'>
- BY_ACCOUNT_NUMBER = <PersonVerificationBy.BY_ACCOUNT_NUMBER: 'BY_ACCOUNT_NUMBER'>
- class q2_cores.Corelation.core.Core(logger, core_user, hq_credentials=None, person_serial=None, **kwargs)[source]
Bases:
BaseCore
- Builds a request to retrieve
demographic information for a user
alerts, alert types, and alert type details
- REQUIRED_CONFIGURATIONS:
A dictionary containing required values for the core call - ‘CHANNEL_SERIAL’ (str): required to get valid data from the Corelation core
- OPTIONAL_CONFIGURATIONS:
A dictionary containing optional values for the demographic info core call
‘PERSON_SERIAL’ (int): The person’s identifier. Used for login verification
‘GET_SERIAL_BY_CIF’ (bool): Used during login verification to determine if login verification is performed with CIF/MemberNumber or SSN.
‘SKIP_LOGIN_VERIFY’ (str): If set to true, will skip login verification and search value set in PERSON_VERIFICATION_BY to perform search
- ‘PERSON_VERIFICATION_BY’ (str): Determines what is sent in the demographic info request.
BY_TIN (str): Makes one demographic info request with the TaxID/SSN
BY_ACCOUNT_NUMBER (str): Makes one demographic info request with the member number
‘PERSON_VERIFICATION_ACCOUNT_NUMBER_ZERO_PADDING_LENGTH’ (int): This will pad account numbers prior to making the request
‘ADDR_TYP_PRIORITY_ORDER_FOR_DEMO_INFO’ (list): Loops through addresses returned from the core, and select address based on first priority
‘ALERT_DESCRIPTIONS’ (list): Alert descriptions that should prevent enrollment
All cores will inherit from this common base class. This contains a self.configured_user property, which is an instance of
q2_sdk.models.cores.models.core_user.CoreUser
.- CONFIG_FILE_NAME = 'Corelation_Core'
- REQUIRED_CONFIGURATIONS = {'CHANNEL_SERIAL': ''}
- OPTIONAL_CONFIGURATIONS = {'ADDR_TYP_PRIORITY_ORDER_FOR_DEMO_INFO': ['R'], 'ALERT_DESCRIPTIONS': ['deceased', 'new address needed'], 'GET_SERIAL_BY_CIF': False, 'PERSON_SERIAL': None, 'PERSON_VERIFICATION_ACCOUNT_NUMBER_ZERO_PADDING_LENGTH': 10, 'PERSON_VERIFICATION_BY': 'BY_TIN', 'SKIP_LOGIN_VERIFY': False}
- async build_demographic_info()[source]
Builds core requests to retrieve demographic information
- Return type:
- async get_login_verify_requirements()[source]
Build a core request for login verification, performing the search either by SSN or CIF based on the GET_SERIAL_BY_CIF config. Result can then be used to build the requirements dictionary for a demographic call
- Return type:
dict
- get_person_verification_requirements()[source]
If SKIP_LOGIN_VERIFY config is set to true, it will skip the login verification and build requirements dictionary for a demographic call which will rely on the PERSON_VERIFICATION_BY config. Config will determine whether search should be performed by SSN (BY_TIN) or CIF (BY_ACCOUNT_NUMBER) to retrieve the person serial. An error will be raised if the person is deceased.
- Return type:
dict
- make_login_verify_xml(channel_serial, member_number)[source]
Builds a core request to get the result of the login verification. Uses CIF or SSN as the identifier.
- Parameters:
channel_serial (
int
) – str, set as a configuration for the FI to get valid information from the Core- Member_number:
the CIF or SSN depending on configs set
- Return type:
- get_alert_type_details(target_serials)[source]
Gets the details of each alert type
- Parameters:
target_serials (
list
[str
]) – Serial IDs of the alerts to check- Return type:
- get_alerts(person_serial)[source]
Gets a user’s alerts within Corelation Keystone
- Parameters:
person_serial (
str
) – Person serial number- Return type:
- get_alert_details(target_serials, alert_type_details)[source]
Gets the details of each of the user’s alerts
- Parameters:
target_serials (
NewType
(AlertStr
,str
)) – Serial IDs of the alerts to check. Expects a string representation of the Alert objectalert_type_details (
dict
) – Details for each alert type
- Return type: