Queries
DemographicInfoQuery
- class q2_cores.XP2.queries.demographic_info_query.DemographicInfoQuery(logger, customer_id, class_name=None, namespace=None)[source]
Bases:
MessageMaker
Builds the xml payload for the demographic call for the XP2 core.
Object which builds the query to be send to the Core. If server is running debug mode, will return mocked response instead of calling the core.
- Parameters:
logger (
Logger
) – Reference to calling request’s logger (self.logger in your extension)mock_failure – If server is running in debug mode, will be used while mocking the response
InitialSearchQuery
- class q2_cores.XP2.queries.initial_search_query.InitialSearchQuery(logger, member_number, class_name=None, namespace=None)[source]
Bases:
MessageMaker
Builds the xml payload for MembershipDetails demographic call for the XP2 core.
Object which builds the query to be send to the Core. If server is running debug mode, will return mocked response instead of calling the core.
- Parameters:
logger (
Logger
) – Reference to calling request’s logger (self.logger in your extension)mock_failure – If server is running in debug mode, will be used while mocking the response
- class q2_cores.XP2.queries.initial_search_query.InitialSearchSSNQuery(logger, ssn, class_name=None, namespace=None)[source]
Bases:
MessageMaker
Builds the xml payload for IndividualLookup demographic call for the XP2 core.
Object which builds the query to be send to the Core. If server is running debug mode, will return mocked response instead of calling the core.
- Parameters:
logger (
Logger
) – Reference to calling request’s logger (self.logger in your extension)mock_failure – If server is running in debug mode, will be used while mocking the response
MessageMaker
- class q2_cores.XP2.queries.message_maker.MessageMaker(logger, class_name=None, namespace=None)[source]
Bases:
BaseQuery
Builds the message wrapper that is used by all XP2 passthru calls
Object which builds the query to be send to the Core. If server is running debug mode, will return mocked response instead of calling the core.
- Parameters:
logger (
Logger
) – Reference to calling request’s logger (self.logger in your extension)mock_failure – If server is running in debug mode, will be used while mocking the response
- make_message(method_name, message_nodes)[source]
Wraps message nodes in the message structure to be sent to the core :type method_name:
str
:param method_name: The name of the method being called on XP2 :type message_nodes:list
:param message_nodes: A list of xml nodes :rtype:str
:return: The proper message to the core