2021-05-14 10:17:07 +02:00
|
|
|
using BTCPayServer.Payments;
|
|
|
|
using BTCPayServer.Services.Invoices;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Events
|
|
|
|
{
|
|
|
|
public class InvoicePaymentMethodActivated : IHasInvoiceId
|
|
|
|
{
|
|
|
|
public PaymentMethodId PaymentMethodId { get; }
|
|
|
|
public InvoiceEntity InvoiceEntity { get; }
|
|
|
|
|
|
|
|
public InvoicePaymentMethodActivated(PaymentMethodId paymentMethodId, InvoiceEntity invoiceEntity)
|
|
|
|
{
|
|
|
|
PaymentMethodId = paymentMethodId;
|
|
|
|
InvoiceEntity = invoiceEntity;
|
|
|
|
}
|
|
|
|
|
2021-12-31 08:59:02 +01:00
|
|
|
public string InvoiceId => InvoiceEntity.Id;
|
2021-05-14 10:17:07 +02:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
2021-11-04 16:09:38 +01:00
|
|
|
return $"Invoice payment method activated for invoice {InvoiceId} ({PaymentMethodId.ToPrettyString()})";
|
2021-05-14 10:17:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|