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: same RBAC caveat as SaveParty/LinkPartyToTenant — open to any authenticated DXP user // for Phase 1.1/1.2 testability; a real deployment should restrict this to the party's own // authorized contact and/or an admin. public class SubmitKyc : DXPBaseEndpoint> { private readonly IKycBLL _bll; private readonly IDXPSystemContext _systemContext; public SubmitKyc(IKycBLL bll, IDXPSystemContext systemContext) { _bll = bll; _systemContext = systemContext; } public override void Configure() => Post("/DXP/Kyc/Submit"); protected override async Task> ExecuteAsync( SubmitKycParameters req, DXPCallerContext caller, CancellationToken ct) { var (message, dxpPartyKycProfileId) = await _bll.SubmitAsync( req.DxpPartyBranchLinkId, req.Gstin, req.Pan, req.RowGuid, _systemContext.GetSystemLogin(caller.DxpUserId), ct); return new ResponseStandardDTO { Status = FrameworkEnumDTO.ResponseStatus.Ok, Body = new { Message = message, DxpPartyKycProfileId = dxpPartyKycProfileId } }; } }