2020-06-28 21:44:35 -05:00
|
|
|
using System.Collections.Generic;
|
2019-04-11 11:53:31 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2019-03-29 07:51:00 +01:00
|
|
|
using BTCPayServer.Validation;
|
2019-04-11 11:53:31 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
2018-04-03 11:50:41 +09:00
|
|
|
|
2022-07-18 20:51:53 +02:00
|
|
|
namespace BTCPayServer.Plugins.PointOfSale.Models
|
2018-04-03 11:50:41 +09:00
|
|
|
{
|
|
|
|
public class UpdatePointOfSaleViewModel
|
|
|
|
{
|
2019-07-14 22:54:27 +09:00
|
|
|
public string StoreId { get; set; }
|
2021-04-08 15:32:42 +02:00
|
|
|
public string StoreName { get; set; }
|
2022-06-19 19:55:47 -07:00
|
|
|
public string StoreDefaultCurrency { get; set; }
|
2021-12-31 16:59:02 +09:00
|
|
|
|
2021-10-29 06:29:02 -04:00
|
|
|
[Required]
|
|
|
|
[MaxLength(50)]
|
|
|
|
[MinLength(1)]
|
|
|
|
[Display(Name = "App Name")]
|
|
|
|
public string AppName { get; set; }
|
2021-04-08 15:32:42 +02:00
|
|
|
|
2018-04-03 11:50:41 +09:00
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2021-10-29 06:29:02 -04:00
|
|
|
[Display(Name = "Display Title")]
|
2018-04-03 11:50:41 +09:00
|
|
|
public string Title { get; set; }
|
|
|
|
[MaxLength(5)]
|
|
|
|
public string Currency { get; set; }
|
|
|
|
public string Template { get; set; }
|
2018-04-26 22:09:18 +09:00
|
|
|
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Point of Sale Style")]
|
2020-05-26 16:48:47 +02:00
|
|
|
public PosViewType DefaultView { get; set; }
|
2018-04-26 22:09:18 +09:00
|
|
|
[Display(Name = "User can input custom amount")]
|
|
|
|
public bool ShowCustomAmount { get; set; }
|
2019-02-25 14:11:03 +08:00
|
|
|
[Display(Name = "User can input discount in %")]
|
|
|
|
public bool ShowDiscount { get; set; }
|
|
|
|
[Display(Name = "Enable tips")]
|
|
|
|
public bool EnableTips { get; set; }
|
2018-05-24 23:54:48 +09:00
|
|
|
public string Example1 { get; internal set; }
|
|
|
|
public string Example2 { get; internal set; }
|
|
|
|
public string ExampleCallback { get; internal set; }
|
|
|
|
public string InvoiceUrl { get; internal set; }
|
2020-06-28 17:55:27 +09:00
|
|
|
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Callback Notification URL")]
|
2019-03-29 07:51:00 +01:00
|
|
|
[Uri]
|
|
|
|
public string NotificationUrl { get; set; }
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Redirect URL")]
|
2020-10-13 15:51:28 +08:00
|
|
|
[Uri]
|
|
|
|
public string RedirectUrl { get; set; }
|
2018-11-16 20:39:43 -06:00
|
|
|
|
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Text to display on each button for items with a specific price")]
|
2018-11-16 20:39:43 -06:00
|
|
|
public string ButtonText { get; set; }
|
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Text to display on buttons allowing the user to enter a custom amount")]
|
2018-11-16 20:39:43 -06:00
|
|
|
public string CustomButtonText { get; set; }
|
2018-11-27 14:14:32 +08:00
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2018-12-13 21:36:19 +08:00
|
|
|
[Display(Name = "Text to display in the tip input")]
|
2018-11-27 14:14:32 +08:00
|
|
|
public string CustomTipText { get; set; }
|
2018-12-13 21:36:19 +08:00
|
|
|
[MaxLength(30)]
|
|
|
|
[Display(Name = "Tip percentage amounts (comma separated)")]
|
|
|
|
public string CustomTipPercentages { get; set; }
|
2018-11-16 20:39:43 -06:00
|
|
|
|
|
|
|
[MaxLength(500)]
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Custom CSS URL")]
|
2018-11-16 20:39:43 -06:00
|
|
|
public string CustomCSSLink { get; set; }
|
2019-01-31 08:56:21 +01:00
|
|
|
|
|
|
|
public string Id { get; set; }
|
2019-04-11 11:53:31 +02:00
|
|
|
|
2019-04-11 11:08:42 +02:00
|
|
|
[Display(Name = "Redirect invoice to redirect url automatically after paid")]
|
2019-04-11 11:53:31 +02:00
|
|
|
public string RedirectAutomatically { get; set; } = string.Empty;
|
|
|
|
|
2019-08-01 02:55:41 -04:00
|
|
|
public string AppId { get; set; }
|
|
|
|
public string SearchTerm { get; set; }
|
|
|
|
|
2019-04-11 11:53:31 +02:00
|
|
|
public SelectList RedirectAutomaticallySelectList =>
|
2020-06-28 17:55:27 +09:00
|
|
|
new SelectList(new List<SelectListItem>()
|
2019-04-11 11:53:31 +02:00
|
|
|
{
|
|
|
|
new SelectListItem()
|
|
|
|
{
|
|
|
|
Text = "Yes",
|
|
|
|
Value = "true"
|
|
|
|
},
|
|
|
|
new SelectListItem()
|
|
|
|
{
|
|
|
|
Text = "No",
|
|
|
|
Value = "false"
|
|
|
|
},
|
|
|
|
new SelectListItem()
|
|
|
|
{
|
|
|
|
Text = "Use Store Settings",
|
|
|
|
Value = ""
|
|
|
|
}
|
|
|
|
}, nameof(SelectListItem.Value), nameof(SelectListItem.Text), RedirectAutomatically);
|
2019-04-28 08:27:10 +02:00
|
|
|
|
2021-07-23 03:57:19 -07:00
|
|
|
[Display(Name = "Custom CSS Code")]
|
2019-08-19 07:13:42 +02:00
|
|
|
public string EmbeddedCSS { get; set; }
|
|
|
|
public string Description { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-11-25 02:42:55 +01:00
|
|
|
[Display(Name = "Request customer data on checkout")]
|
2023-01-26 01:27:31 +01:00
|
|
|
public string FormId { get; set; }
|
2023-09-11 02:59:17 +02:00
|
|
|
|
|
|
|
public bool Archived { get; set; }
|
2018-04-03 11:50:41 +09:00
|
|
|
}
|
|
|
|
}
|