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