using DXPBLL.Kyc; using DXPDAL.Common; using DXPSL.Common; using DXPSL.Parameters.Kyc; using GB5Shared.DTO.Framework.Enum; using GB5Shared.DTO.Framework.ResponseStandard; namespace DXPSL.Endpoints.Kyc; // NOTE: returns encrypted GSTIN/PAN as-is (never decrypted for a plain GET) — decryption only // happens server-side for actual downstream use (e.g. Compliance submission in a later phase). public class GetKycProfile : DXPBaseEndpoint> { private readonly IKycBLL _bll; private readonly IDXPSystemContext _systemContext; public GetKycProfile(IKycBLL bll, IDXPSystemContext systemContext) { _bll = bll; _systemContext = systemContext; } public override void Configure() => Post("/DXP/Kyc/GetByBranchLink"); protected override async Task> ExecuteAsync( BranchLinkIdParameters req, DXPCallerContext caller, CancellationToken ct) { var profile = await _bll.GetActiveByBranchLinkAsync( req.DxpPartyBranchLinkId, _systemContext.GetSystemLogin(caller.DxpUserId), ct); return new ResponseStandardDTO { Status = FrameworkEnumDTO.ResponseStatus.Ok, Body = profile }; } }