Queries

DemographicInfoQuery

class q2_cores.UltraData.queries.demographic_info_query.DemographicInfoQuery(logger, cust_number)[source]

Bases: BaseQuery

Returns addresses, First/Last Name, Phones, etc for an UltraData CustNumber

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.UltraData.queries.mock_responses.mock_demo_info_response(cust_number)[source]

UpdateDemographicInfoQuery

class q2_cores.UltraData.queries.update_demographic_query.UpdateDemographicQuery(logger, cust_number, demographic_info, orig_demo_core_resp)[source]

Bases: BaseQuery

Updates addresses, First/Last Name, Phones, etc

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_addr_node(existing_node_name, address_type)[source]
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.