2020-05-29 02:00:13 +02:00
|
|
|
using System;
|
2022-10-17 09:51:15 +02:00
|
|
|
using System.Collections.Generic;
|
2020-05-29 10:04:28 +02:00
|
|
|
using BTCPayServer.Client.JsonConverters;
|
2020-05-29 02:00:13 +02:00
|
|
|
using BTCPayServer.Lightning;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
|
|
|
public class LightningInvoiceData
|
|
|
|
{
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2020-05-29 02:00:13 +02:00
|
|
|
public LightningInvoiceStatus Status { get; set; }
|
|
|
|
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonProperty("BOLT11")]
|
2020-05-29 02:00:13 +02:00
|
|
|
public string BOLT11 { get; set; }
|
|
|
|
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
2020-05-29 02:00:13 +02:00
|
|
|
public DateTimeOffset? PaidAt { get; set; }
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
2020-05-29 02:00:13 +02:00
|
|
|
public DateTimeOffset ExpiresAt { get; set; }
|
|
|
|
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
2020-05-29 02:00:13 +02:00
|
|
|
public LightMoney Amount { get; set; }
|
|
|
|
|
2020-06-08 23:40:58 +09:00
|
|
|
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
2020-05-29 02:00:13 +02:00
|
|
|
public LightMoney AmountReceived { get; set; }
|
2022-10-17 09:51:15 +02:00
|
|
|
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public Dictionary<ulong, string> CustomRecords { get; set; }
|
2020-05-29 02:00:13 +02:00
|
|
|
}
|
|
|
|
}
|