2020-11-06 20:42:26 +09:00
|
|
|
using Newtonsoft.Json;
|
2022-11-28 00:50:52 -08:00
|
|
|
using Newtonsoft.Json.Linq;
|
2020-11-06 20:42:26 +09:00
|
|
|
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
|
|
|
public class WebhookInvoiceEvent : WebhookEvent
|
|
|
|
{
|
2020-11-13 16:28:15 +09:00
|
|
|
public WebhookInvoiceEvent()
|
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public WebhookInvoiceEvent(WebhookEventType evtType)
|
|
|
|
{
|
|
|
|
this.Type = evtType;
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
|
|
|
[JsonProperty(Order = 1)] public string StoreId { get; set; }
|
|
|
|
[JsonProperty(Order = 2)] public string InvoiceId { get; set; }
|
2022-11-28 00:50:52 -08:00
|
|
|
[JsonProperty(Order = 3)] public JObject Metadata { get; set; }
|
2020-11-13 16:28:15 +09:00
|
|
|
}
|
|
|
|
|
2020-11-23 15:57:05 +09:00
|
|
|
public class WebhookInvoiceSettledEvent : WebhookInvoiceEvent
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
2020-11-23 15:57:05 +09:00
|
|
|
public WebhookInvoiceSettledEvent()
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-23 15:57:05 +09:00
|
|
|
public WebhookInvoiceSettledEvent(WebhookEventType evtType) : base(evtType)
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool ManuallyMarked { get; set; }
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public class WebhookInvoiceInvalidEvent : WebhookInvoiceEvent
|
|
|
|
{
|
|
|
|
public WebhookInvoiceInvalidEvent()
|
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public WebhookInvoiceInvalidEvent(WebhookEventType evtType) : base(evtType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool ManuallyMarked { get; set; }
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-23 15:57:05 +09:00
|
|
|
public class WebhookInvoiceProcessingEvent : WebhookInvoiceEvent
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
2020-11-23 15:57:05 +09:00
|
|
|
public WebhookInvoiceProcessingEvent()
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-23 15:57:05 +09:00
|
|
|
public WebhookInvoiceProcessingEvent(WebhookEventType evtType) : base(evtType)
|
2020-11-13 16:28:15 +09:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool OverPaid { get; set; }
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public class WebhookInvoiceReceivedPaymentEvent : WebhookInvoiceEvent
|
|
|
|
{
|
|
|
|
public WebhookInvoiceReceivedPaymentEvent()
|
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public WebhookInvoiceReceivedPaymentEvent(WebhookEventType evtType) : base(evtType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool AfterExpiration { get; set; }
|
2021-10-05 11:10:41 +02:00
|
|
|
public string PaymentMethod { get; set; }
|
|
|
|
public InvoicePaymentMethodDataModel.Payment Payment { get; set; }
|
2021-10-27 14:51:31 +09:00
|
|
|
public bool OverPaid { get; set; }
|
2021-10-05 11:10:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public class WebhookInvoicePaymentSettledEvent : WebhookInvoiceReceivedPaymentEvent
|
|
|
|
{
|
|
|
|
public WebhookInvoicePaymentSettledEvent()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public WebhookInvoicePaymentSettledEvent(WebhookEventType evtType) : base(evtType)
|
|
|
|
{
|
|
|
|
}
|
2020-11-13 16:28:15 +09:00
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public class WebhookInvoiceExpiredEvent : WebhookInvoiceEvent
|
|
|
|
{
|
|
|
|
public WebhookInvoiceExpiredEvent()
|
|
|
|
{
|
|
|
|
}
|
2021-10-05 11:10:41 +02:00
|
|
|
|
2020-11-13 16:28:15 +09:00
|
|
|
public WebhookInvoiceExpiredEvent(WebhookEventType evtType) : base(evtType)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool PartiallyPaid { get; set; }
|
2020-11-06 20:42:26 +09:00
|
|
|
}
|
|
|
|
}
|