2020-07-22 13:58:41 +02:00
|
|
|
using System;
|
2020-08-26 14:01:39 +09:00
|
|
|
using BTCPayServer.Client.JsonConverters;
|
2020-07-22 13:58:41 +02:00
|
|
|
using BTCPayServer.JsonConverters;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Converters;
|
2020-08-25 14:33:00 +09:00
|
|
|
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; }
|
2020-08-25 14:33:00 +09:00
|
|
|
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; }
|
|
|
|
|
2020-08-26 14:01:39 +09:00
|
|
|
[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; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|