Queries

DemographicInfoQuery

class q2_cores.Users.queries.demographic_info_query.DemographicInfoQuery(logger, account_number)[source]

Bases: BaseQuery

Returns addresses, First/Last Name, Phones, etc for an Users ACN (Account Number)

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.Users.queries.mock_responses.mock_demo_info_response()[source]
q2_cores.Users.queries.mock_responses.mock_get_sub_accounts_details_response()[source]

OpenAccountQuery

class q2_cores.Users.queries.open_account_query.GetSubAccountListQuery(logger, member_number)[source]

Bases: BaseQuery

Returns rates and other details from core based on the selected funding amount

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.

class q2_cores.Users.queries.open_account_query.GetSubAccountDetailsQuery(logger, member_number, account_id, account_type, funding_amount)[source]

Bases: BaseQuery

Returns rates and other details from 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

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.