Ejemplo n.º 1
0
        private async Task PushEnvelopesToTerminalEndpoint(IEnumerable <DocuSignEnvelopeCM_v2> envelopesToNotify)
        {
            foreach (var envelope in envelopesToNotify)
            {
                var eventReportContent = new EventReportCM
                {
                    EventNames        = DocuSignEventParser.GetEventNames(envelope),
                    EventPayload      = new CrateStorage(Crate.FromContent("DocuSign Connect Event", envelope)),
                    Manufacturer      = "DocuSign",
                    ExternalAccountId = envelope.ExternalAccountId
                };

                await _reporter.Broadcast(Crate.FromContent("Standard Event Report", eventReportContent));
            }
        }
Ejemplo n.º 2
0
        private Crate ProcessConnectEvent(string curExternalEventPayload)
        {
            // Connect events come only for a single envelope
            var curDocuSignEnvelopeInfo = DocuSignEventParser.GetEnvelopeInformation(curExternalEventPayload);
            // transform XML structure into DocuSignEnvelopeCM_v2
            var curDocuSingEnvelopCM = DocuSignEventParser.ParseXMLintoCM(curDocuSignEnvelopeInfo);
            var eventReportContent   = new EventReportCM
            {
                EventNames        = DocuSignEventParser.GetEventNames(curDocuSignEnvelopeInfo),
                EventPayload      = new CrateStorage(Crate.FromContent("DocuSign Connect Event", curDocuSingEnvelopCM)),
                Manufacturer      = "DocuSign",
                ExternalAccountId = curDocuSignEnvelopeInfo.EnvelopeStatus.Email
            };

            ////prepare the event report
            var curEventReport = Crate.FromContent("Standard Event Report", eventReportContent);

            return(curEventReport);
        }