Implement topup invoices (#2730)

This commit is contained in:
Nicolas Dorier
2021-08-03 17:03:00 +09:00
committed by GitHub
parent 63d4ccc058
commit 4c818d0359
26 changed files with 288 additions and 51 deletions

View File

@@ -7,10 +7,15 @@ using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public enum InvoiceType
{
Standard,
TopUp
}
public class InvoiceDataBase
{
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceType Type { get; set; }
public string Currency { get; set; }
public JObject Metadata { get; set; }
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
@@ -41,6 +46,8 @@ namespace BTCPayServer.Client.Models
{
public string Id { get; set; }
public string StoreId { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string CheckoutLink { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceStatus Status { get; set; }