GetAccountByAccountNumberExternal module
Get account by account number external (call GetProductTypes to get ProductTypeId)
Note: This function will not work if the SystemProperty “AccountRequiresCifInternal” is turned on. This SystemProperty is on by default in the development environment, if you want to use this function please check with the SDK team to verify your production environment has this off.
You will get a HydraError:-796/AccountLookupRequiresCifInternal
- class q2_sdk.hq.hq_api.q2_api.GetAccountByAccountNumberExternal.ParamsObj(logger, account_number_external, product_type_id, hq_credentials=None)[source]
Bases:
Q2ApiParamsObj
Parameters definition for GetAccountByAccountNumberExternal
- Parameters:
logger (
TypeAliasType
) – Reference to calling request’s logger (self.logger in your extension)account_number_external (
str
)product_type_id (
int
)hq_credentials (
Optional
[HqCredentials
]) – Defaults to settings.HQ_CREDENTIALS
- async q2_sdk.hq.hq_api.q2_api.GetAccountByAccountNumberExternal.execute(params_obj, use_json=False, **kwargs)[source]
This is the default way to submit the request to HQ. In theory, both json and soap payloads are equally accepted by HQ, though several variables may affect that (HQ version, Q2SDK implementation bugs, etc). This should not affect anything about the way your code deals with the data. In fact, the only difference to consuming extensions is the logging. Basically, call this with default parameters unless you find a compelling reason not to.
- Parameters:
params_obj (
ParamsObj
) – Object containing everything necessary to call this HQ endpointuse_json – If True, will call HQ’s .ashx (json) endpoint instead of .asmx (soap)
- Return type:
- async q2_sdk.hq.hq_api.q2_api.GetAccountByAccountNumberExternal.get_soap(params_obj, **kwargs)[source]
Deprecated. Please use execute instead
- Return type: