2020-05-30 09:59:09 +09:00
|
|
|
using System;
|
2020-05-31 11:51:36 +09:00
|
|
|
using System.Collections.Generic;
|
2020-05-23 21:13:18 +02:00
|
|
|
using BTCPayServer.Client.JsonConverters;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Converters;
|
2020-05-31 11:51:36 +09:00
|
|
|
using Newtonsoft.Json.Linq;
|
2020-05-23 21:13:18 +02:00
|
|
|
|
2020-04-27 13:13:20 +02:00
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
|
|
|
public abstract class StoreBaseData
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// the name of the store
|
|
|
|
/// </summary>
|
|
|
|
public string Name { get; set; }
|
2020-05-23 21:13:18 +02:00
|
|
|
|
|
|
|
public string Website { get; set; }
|
2020-05-30 09:59:09 +09:00
|
|
|
|
2023-05-11 10:38:40 +02:00
|
|
|
public string SupportUrl { get; set; }
|
|
|
|
|
2020-08-26 14:01:39 +09:00
|
|
|
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
2020-05-30 09:59:09 +09:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public TimeSpan InvoiceExpiration { get; set; } = TimeSpan.FromMinutes(15);
|
|
|
|
|
2023-01-16 12:45:19 +01:00
|
|
|
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public TimeSpan DisplayExpirationTimer { get; set; } = TimeSpan.FromMinutes(5);
|
|
|
|
|
2020-08-26 14:01:39 +09:00
|
|
|
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
2020-05-30 09:59:09 +09:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public TimeSpan MonitoringExpiration { get; set; } = TimeSpan.FromMinutes(60);
|
|
|
|
|
2020-05-23 21:13:18 +02:00
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
public SpeedPolicy SpeedPolicy { get; set; }
|
|
|
|
public string LightningDescriptionTemplate { get; set; }
|
|
|
|
public double PaymentTolerance { get; set; } = 0;
|
|
|
|
public bool AnyoneCanCreateInvoice { get; set; }
|
2021-10-20 23:17:40 +09:00
|
|
|
public string DefaultCurrency { get; set; }
|
2020-11-09 01:11:03 -06:00
|
|
|
public bool RequiresRefundEmail { get; set; }
|
2023-11-21 13:38:01 +01:00
|
|
|
|
2022-11-02 10:21:33 +01:00
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2023-11-21 13:38:01 +01:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public CheckoutType? CheckoutType { get; set; }
|
|
|
|
|
2020-11-09 01:11:03 -06:00
|
|
|
public bool LightningAmountInSatoshi { get; set; }
|
|
|
|
public bool LightningPrivateRouteHints { get; set; }
|
|
|
|
public bool OnChainWithLnInvoiceFallback { get; set; }
|
2021-04-07 06:08:42 +02:00
|
|
|
public bool LazyPaymentMethods { get; set; }
|
2020-11-09 01:11:03 -06:00
|
|
|
public bool RedirectAutomatically { get; set; }
|
|
|
|
|
2023-09-11 02:59:17 +02:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool Archived { get; set; }
|
|
|
|
|
2020-05-31 11:42:49 +09:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool ShowRecommendedFee { get; set; } = true;
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public int RecommendedFeeBlockTarget { get; set; } = 1;
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2020-12-29 10:33:44 +01:00
|
|
|
public string DefaultPaymentMethod { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2020-05-31 11:42:49 +09:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public string DefaultLang { get; set; } = "en";
|
2020-05-23 21:13:18 +02:00
|
|
|
|
|
|
|
public string CustomLogo { get; set; }
|
|
|
|
|
|
|
|
public string CustomCSS { get; set; }
|
|
|
|
|
|
|
|
public string HtmlTitle { get; set; }
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2020-05-31 11:42:49 +09:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public NetworkFeeMode NetworkFeeMode { get; set; } = NetworkFeeMode.Never;
|
2020-05-23 21:13:18 +02:00
|
|
|
|
2023-01-23 13:51:00 +01:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public List<PaymentMethodCriteriaData> PaymentMethodCriteria { get; set; }
|
|
|
|
|
2020-05-23 21:13:18 +02:00
|
|
|
public bool PayJoinEnabled { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2023-10-18 12:20:05 +02:00
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool? AutoDetectLanguage { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool? ShowPayInWalletButton { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool? ShowStoreHeader { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool? CelebratePayment { get; set; }
|
|
|
|
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
|
|
|
public bool? PlaySoundOnPayment { get; set; }
|
|
|
|
|
2022-07-06 14:14:55 +02:00
|
|
|
public InvoiceData.ReceiptOptions Receipt { get; set; }
|
2020-05-23 21:13:18 +02:00
|
|
|
|
2020-05-31 11:51:36 +09:00
|
|
|
|
|
|
|
[JsonExtensionData]
|
|
|
|
public IDictionary<string, JToken> AdditionalData { get; set; }
|
2020-05-23 21:13:18 +02:00
|
|
|
}
|
2020-06-28 17:55:27 +09:00
|
|
|
|
2022-11-02 10:21:33 +01:00
|
|
|
public enum CheckoutType
|
|
|
|
{
|
|
|
|
V1,
|
|
|
|
V2
|
|
|
|
}
|
|
|
|
|
2020-05-23 21:13:18 +02:00
|
|
|
public enum NetworkFeeMode
|
|
|
|
{
|
|
|
|
MultiplePaymentsOnly,
|
|
|
|
Always,
|
|
|
|
Never
|
|
|
|
}
|
2020-06-28 17:55:27 +09:00
|
|
|
|
2020-05-23 21:13:18 +02:00
|
|
|
public enum SpeedPolicy
|
|
|
|
{
|
|
|
|
HighSpeed = 0,
|
|
|
|
MediumSpeed = 1,
|
|
|
|
LowSpeed = 2,
|
|
|
|
LowMediumSpeed = 3
|
2020-04-27 13:13:20 +02:00
|
|
|
}
|
|
|
|
}
|