2024-06-26 10:42:22 +02:00
|
|
|
#nullable enable
|
2024-06-26 17:43:56 +09:00
|
|
|
using System.Collections.Generic;
|
2022-05-01 22:28:27 -07:00
|
|
|
using Newtonsoft.Json;
|
2024-06-26 10:42:22 +02:00
|
|
|
using Newtonsoft.Json.Converters;
|
2024-06-26 17:43:56 +09:00
|
|
|
using Newtonsoft.Json.Linq;
|
2022-05-01 22:28:27 -07:00
|
|
|
|
2024-06-26 10:42:22 +02:00
|
|
|
namespace BTCPayServer.Client.Models;
|
|
|
|
|
|
|
|
public abstract class PointOfSaleBaseData : AppBaseData
|
|
|
|
{
|
|
|
|
public string? Title { get; set; }
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
public PosViewType? DefaultView { get; set; }
|
|
|
|
public bool? ShowItems { get; set; }
|
|
|
|
public bool? ShowCustomAmount { get; set; }
|
|
|
|
public bool? ShowDiscount { get; set; }
|
|
|
|
public bool? ShowSearch { get; set; }
|
|
|
|
public bool? ShowCategories { get; set; }
|
|
|
|
public bool? EnableTips { get; set; }
|
|
|
|
public string? Currency { get; set; }
|
|
|
|
public string? FixedAmountPayButtonText { get; set; }
|
|
|
|
public string? CustomAmountPayButtonText { get; set; }
|
|
|
|
public string? TipText { get; set; }
|
|
|
|
public string? NotificationUrl { get; set; }
|
|
|
|
public string? RedirectUrl { get; set; }
|
|
|
|
public string? Description { get; set; }
|
|
|
|
public bool? RedirectAutomatically { get; set; }
|
|
|
|
public int[]? CustomTipPercentages { get; set; }
|
|
|
|
public string? FormId { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class PointOfSaleAppData : PointOfSaleBaseData
|
2022-05-01 22:28:27 -07:00
|
|
|
{
|
2024-06-26 10:42:22 +02:00
|
|
|
public object? Items { get; set; }
|
|
|
|
}
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2024-06-26 10:42:22 +02:00
|
|
|
public class PointOfSaleAppRequest : PointOfSaleBaseData, IAppRequest
|
|
|
|
{
|
|
|
|
public string? Template { get; set; }
|
|
|
|
}
|
2022-11-17 21:20:07 -08:00
|
|
|
|
2024-06-26 10:42:22 +02:00
|
|
|
public enum PosViewType
|
|
|
|
{
|
|
|
|
Static,
|
|
|
|
Cart,
|
|
|
|
Light,
|
|
|
|
Print
|
2022-05-01 22:28:27 -07:00
|
|
|
}
|