Queries

InitialSearchQuery

class q2_cores.FISHorizon.queries.initial_search_query.InitialSearchQuery(logger, ssn='', last_name='', dob='')[source]

Bases: BaseQuery

Builds Initial Search request

RM01~~~~~~~123456789~~~~~~~~~

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

build()[source]

Creates the query string

Return type:

str

Returns:

RM01 Customer Search query string

mock_response()[source]

When run in DEBUG mode, the SDK will intercept calls before they go to HQ’s AdapterPassThru endpoint.

In these cases, the response will be whatever is returned from this function.

DemographicInfoQuery

class q2_cores.FISHorizon.queries.demographic_info_query.DemographicInfoQuery(logger, unique_customer_identifier)[source]

Bases: BaseQuery

Builds Demographic Info query with unique_customer_identifier.

RM021234567~~~~~

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

build()[source]
mock_response()[source]

When run in DEBUG mode, the SDK will intercept calls before they go to HQ’s AdapterPassThru endpoint.

In these cases, the response will be whatever is returned from this function.

MockResponses

q2_cores.FISHorizon.queries.mock_responses.mock_initial_search_response()[source]
Return type:

str

q2_cores.FISHorizon.queries.mock_responses.mock_initial_search_no_user()[source]
Return type:

str

q2_cores.FISHorizon.queries.mock_responses.mock_initial_search_multiple_users()[source]
Return type:

str

q2_cores.FISHorizon.queries.mock_responses.mock_initial_search_error()[source]
Return type:

str

q2_cores.FISHorizon.queries.mock_responses.mock_demographic_response(exclude_last=False, include_ps=False)[source]
Return type:

str

q2_cores.FISHorizon.queries.mock_responses.mock_demographic_business_response(include_bsp=False)[source]
Return type:

str