btcpayserver/BTCPayServer.Client/Models/CreateInvoiceRequest.cs

36 lines
1.2 KiB
C#
Raw Normal View History

2020-07-22 13:58:41 +02:00
using System;
using BTCPayServer.Client.JsonConverters;
2020-07-22 13:58:41 +02:00
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
2020-07-22 13:58:41 +02:00
namespace BTCPayServer.Client.Models
{
public class CreateInvoiceRequest
{
2020-07-24 10:53:31 +02:00
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
2020-07-24 08:13:21 +02:00
public decimal Amount { get; set; }
public string Currency { get; set; }
public JObject Metadata { get; set; }
2020-07-22 13:58:41 +02:00
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
public class CheckoutOptions
{
[JsonConverter(typeof(StringEnumConverter))]
public SpeedPolicy? SpeedPolicy { get; set; }
public string[] PaymentMethods { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("expirationMinutes")]
public TimeSpan? Expiration { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("monitoringMinutes")]
public TimeSpan? Monitoring { get; set; }
2020-07-22 13:58:41 +02:00
public double? PaymentTolerance { get; set; }
}
}
}