ResponseType

class q2_sdk.hq.models.sso_response.ResponseType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Enum of valid ResponseTypes expected by HQ

UserLevelConfig

class q2_sdk.hq.models.sso_response.UserLevelConfig(key, value)[source]

Serializes key and value into HQ appropriate shapes

key: str

Must match a value in Q2_ThirdPartyDataElements.Name

value: str

Will set this in Q2_ThirdPartyData.DataValue

UserLevelConfigList

class q2_sdk.hq.models.sso_response.UserLevelConfigList(vendor_id, configs=<factory>)[source]

Serializes into HQ appropriate return shapes

vendor_id: int

self.vendor_id from an SSOHandler

configs: List[UserLevelConfig]

List of UserLevelConfig instances

Q2SSOResponse

class q2_sdk.hq.models.sso_response.Q2SSOResponse(response_type, response, success=True, end_user_error_message='', user_level_config_list=None)[source]

The shape HQ expects back from an SSO call

Parameters:
  • response_type (ResponseType) – From ResponseType enum

  • response (str) – Actual response shown to the end user

  • success (bool) – If False, will log failure into HQ

  • end_user_error_message – In conjunction with success=False, customizes the error message

  • user_level_config_list (Optional[UserLevelConfigList]) – If provided, will fill the Q2_ThirdPartyData table with user level key/value pairs for specified vendor

serialize()[source]

JSON response

Return type:

dict

serialize_as_xml()[source]

SOAP response

Return type:

Element