diff --git a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs index 2b5dc2dd..08fea4bf 100644 --- a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs +++ b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs @@ -11,13 +11,35 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; using EnvelopeGenerator.Application.Common.Extensions; +using EnvelopeGenerator.Application.Common.Query; namespace EnvelopeGenerator.Application.Pdf; /// /// /// -public record BurnPdfCommand(byte[] Document, List InstantJSONList, int EnvelopeId) : IRequest; +public record BurnPdfCommand : IRequest +{ + /// + /// + /// + public EnvelopeQueryBase? Envelope { get; set; } + + /// + /// + /// + public byte[]? Document { get; set; } + + /// + /// + /// + public List? InstantJSONList { get; set; } + + /// + /// + /// + public bool ByCronService { get; set; } = true; +} /// /// @@ -59,7 +81,7 @@ public class BurnPdfCommandHandler : IRequestHandler { // read the elements of envelope with their annotations var elements = await _signRepo - .Where(sig => sig.Document.EnvelopeId == request.EnvelopeId) + .Where(sig => sig.Document.EnvelopeId == request.Envelope.Id) .Include(sig => sig.Annotations) .ToListAsync(cancel);