mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
using System;
|
|
using BTCPayServer.JsonConverters;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
{
|
|
public class CreateInvoiceRequest
|
|
{
|
|
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
|
|
public decimal Amount { get; set; }
|
|
public string Currency { get; set; }
|
|
public JObject Metadata { get; set; }
|
|
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
|
|
|
|
public class CheckoutOptions
|
|
{
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public SpeedPolicy? SpeedPolicy { get; set; }
|
|
|
|
public string[] PaymentMethods { get; set; }
|
|
public bool? RedirectAutomatically { get; set; }
|
|
public string RedirectUri { get; set; }
|
|
public Uri WebHook { get; set; }
|
|
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
|
public DateTimeOffset? ExpirationTime { get; set; }
|
|
|
|
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
|
|
public double? PaymentTolerance { get; set; }
|
|
}
|
|
}
|
|
}
|