BackOfficeResponse
- class q2_sdk.hq.models.backoffice_response.BackOfficeResponse(raw_response, logger=None)[source]
Wraps a response from HQ up as a handy object to work with.
For responses containing DataSet structures (XSD schemas + diffgram rows), .json() will use the embedded schema to return properly-typed Python dicts with consistent list structures for table rows.
For simple responses without DataSet structures, .json() falls back to the generic xml_to_dict behavior.
- Parameters:
response – Body of HQ response
- clean_result_node()[source]
Cleans up the grossness of the BackOffice response in a few ways:
Removes namespaces
Moves children of diffgrams to the diffgram’s parent
Removes the diffgram node
Removes schema nodes
Objects from BackOffice typically have a parent and child node named the same thing. Only store the child
- json()[source]
Convert the response to a Python dictionary.
For DataSet responses (those with embedded XSD schemas), returns a dict with properly-typed values and consistent list structures for table rows.
For simple responses without DataSet structures, falls back to the generic xml_to_dict parsing from HqResponse.
- Return type: