2021-12-31 08:59:02 +01:00
|
|
|
using BTCPayServer.Services.Invoices;
|
2017-12-17 06:17:42 +01:00
|
|
|
|
|
|
|
namespace BTCPayServer.Events
|
|
|
|
{
|
2020-11-06 14:23:10 +01:00
|
|
|
public class InvoiceDataChangedEvent : IHasInvoiceId
|
2017-12-17 06:17:42 +01:00
|
|
|
{
|
2018-02-17 05:18:16 +01:00
|
|
|
public InvoiceDataChangedEvent(InvoiceEntity invoice)
|
|
|
|
{
|
|
|
|
InvoiceId = invoice.Id;
|
2018-12-10 13:48:28 +01:00
|
|
|
State = invoice.GetInvoiceState();
|
2018-02-17 05:18:16 +01:00
|
|
|
}
|
2018-12-10 13:48:28 +01:00
|
|
|
public string InvoiceId { get; }
|
|
|
|
public InvoiceState State { get; }
|
2017-12-17 06:17:42 +01:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
2018-12-10 13:48:28 +01:00
|
|
|
return $"Invoice status is {State}";
|
2017-12-17 06:17:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|