protected override async Task ProcessEvent(object evt, CancellationToken cancellationToken) { var e = (IHasInvoiceId)evt; var severity = InvoiceEventData.EventSeverity.Info; if (evt is InvoiceIPNEvent ipn) { severity = string.IsNullOrEmpty(ipn.Error) ? InvoiceEventData.EventSeverity.Success : InvoiceEventData.EventSeverity.Error; } await _invoiceRepository.AddInvoiceEvent(e.InvoiceId, e, severity); }
private Task SaveEvent(string invoiceId, object evt) { return(_InvoiceRepository.AddInvoiceEvent(invoiceId, evt)); }
private Task SaveEvent(string invoiceId, object evt, InvoiceEventData.EventSeverity severity) { return(_InvoiceRepository.AddInvoiceEvent(invoiceId, evt, severity)); }
private Task SaveEvent(string invoiceId, object evt, InvoiceEventData.EventSeverity severity, DateTimeOffset?timeOffset = null) { return(_invoiceRepository.AddInvoiceEvent(invoiceId, evt, severity, timeOffset)); }