btcpayserver/BTCPayServer.Client/Models/WebhookInvoiceEvent.cs

101 lines
2.5 KiB
C#
Raw Normal View History

2020-11-06 20:42:26 +09:00
using Newtonsoft.Json;
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()
{
}
2020-11-13 16:28:15 +09:00
public WebhookInvoiceEvent(WebhookEventType evtType)
{
this.Type = evtType;
}
[JsonProperty(Order = 1)] public string StoreId { get; set; }
[JsonProperty(Order = 2)] public string InvoiceId { get; set; }
[JsonProperty(Order = 3)] public JObject Metadata { get; set; }
2020-11-13 16:28:15 +09:00
}
public class WebhookInvoiceSettledEvent : WebhookInvoiceEvent
2020-11-13 16:28:15 +09:00
{
public WebhookInvoiceSettledEvent()
2020-11-13 16:28:15 +09:00
{
}
public WebhookInvoiceSettledEvent(WebhookEventType evtType) : base(evtType)
2020-11-13 16:28:15 +09:00
{
}
public bool ManuallyMarked { get; set; }
}
2020-11-13 16:28:15 +09:00
public class WebhookInvoiceInvalidEvent : WebhookInvoiceEvent
{
public WebhookInvoiceInvalidEvent()
{
}
2020-11-13 16:28:15 +09:00
public WebhookInvoiceInvalidEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool ManuallyMarked { get; set; }
}
public class WebhookInvoiceProcessingEvent : WebhookInvoiceEvent
2020-11-13 16:28:15 +09:00
{
public WebhookInvoiceProcessingEvent()
2020-11-13 16:28:15 +09:00
{
}
public WebhookInvoiceProcessingEvent(WebhookEventType evtType) : base(evtType)
2020-11-13 16:28:15 +09:00
{
}
public bool OverPaid { get; set; }
}
2020-11-13 16:28:15 +09:00
public class WebhookInvoiceReceivedPaymentEvent : WebhookInvoiceEvent
{
public WebhookInvoiceReceivedPaymentEvent()
{
}
2020-11-13 16:28:15 +09:00
public WebhookInvoiceReceivedPaymentEvent(WebhookEventType evtType) : base(evtType)
{
}
public bool AfterExpiration { get; set; }
public string PaymentMethod { get; set; }
public InvoicePaymentMethodDataModel.Payment Payment { get; set; }
public bool OverPaid { get; set; }
}
public class WebhookInvoicePaymentSettledEvent : WebhookInvoiceReceivedPaymentEvent
{
public WebhookInvoicePaymentSettledEvent()
{
}
public WebhookInvoicePaymentSettledEvent(WebhookEventType evtType) : base(evtType)
{
}
2020-11-13 16:28:15 +09:00
}
2020-11-13 16:28:15 +09:00
public class WebhookInvoiceExpiredEvent : WebhookInvoiceEvent
{
public WebhookInvoiceExpiredEvent()
{
}
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
}
}