Source code for q2_sdk.hq.hq_api.q2_api.GetUserAccountListOptionalMasking

# This is an autogenerated file from the command "q2 generate_hq_api" and will be overwritten if run again

"""
Get a users account list, DesiredHydraProductCodes is pipe delimited list 2 char values of HydraProductTypeCode+HydraProductCode, with * allowed in HydraProductCode (D*|L*|C* for all deposit, loan and credit accounts)
"""

from typing import List, Optional


from q2_sdk.core.q2_logging.logger import Q2LoggerType
from q2_sdk.hq.models.hq_response import HqResponse
from q2_sdk.hq.models.hq_credentials import HqCredentials

from q2_sdk.hq.models.hq_params.q2_api import Q2ApiParamsObj
from q2_sdk.hq.models.hq_request.q2_api import Q2ApiRequest


[docs] class ParamsObj(Q2ApiParamsObj): """Parameters definition for GetUserAccountListOptionalMasking""" def __init__( self, logger: Q2LoggerType, online_user_name: str, desired_rights_bit_flag: int, desired_rights_is_explicit: bool, desired_hydra_product_codes: str, apply_account_list_rights_limit_bitflag_mask: bool, hq_credentials: Optional[HqCredentials] = None, ): """ :param logger: Reference to calling request's logger (self.logger in your extension) :param online_user_name: Logon name of an online user :param desired_rights_bit_flag: 0: No rights, 7: View, Deposit, and Withdraw Rights :param desired_rights_is_explicit: True: Only show accounts with rights that match desired_rights_bit_flag exactly. False: Show accounts with at least desired_rights_big_flag :param desired_hydra_product_codes: Pipe delimited list of 2 char values representing HydraProductTypeCode+HydraProductCode, with * allowed in HydraProductCode (D*|L*|C* for all deposit, loan and credit accounts) :param apply_account_list_rights_limit_bitflag_mask: :param hq_credentials: Defaults to settings.HQ_CREDENTIALS """ super().__init__(logger, hq_credentials) self.request_params.update({ "OnlineUserName": online_user_name, "DesiredRightsBitFlag": desired_rights_bit_flag, "DesiredRightsIsExplicit": desired_rights_is_explicit, "DesiredHydraProductCodes": desired_hydra_product_codes, "ApplyAccountListRightsLimitBitflagMask": apply_account_list_rights_limit_bitflag_mask, })
[docs] async def execute(params_obj: ParamsObj, use_json=False, **kwargs) -> HqResponse: """ 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. :param params_obj: Object containing everything necessary to call this HQ endpoint :param use_json: If True, will call HQ's .ashx (json) endpoint instead of .asmx (soap) """ request = Q2ApiRequest( "GetUserAccountListOptionalMasking", use_json=use_json, **kwargs ) return await request.execute(params_obj, **kwargs)
[docs] async def get_soap(params_obj: ParamsObj, **kwargs) -> HqResponse: """Deprecated. Please use execute instead""" params_obj.logger.warning( "GetUserAccountListOptionalMasking.get_soap is deprecated. Please use GetUserAccountListOptionalMasking.execute instead." ) return await execute(params_obj, **kwargs)
[docs] async def get_json(params_obj: ParamsObj, **kwargs) -> HqResponse: """Deprecated. Please use execute instead""" params_obj.logger.warning( "GetUserAccountListOptionalMasking.get_json is deprecated. Please use GetUserAccountListOptionalMasking.execute instead." ) return await execute(params_obj, use_json=True, **kwargs)
[docs] def build_json(params_obj: ParamsObj): return Q2ApiRequest.build_json(params_obj)
[docs] def build_soap(params_obj: ParamsObj): return Q2ApiRequest("GetUserAccountListOptionalMasking", use_json=False).build_soap( params_obj )