2020-06-28 21:44:35 -05:00
|
|
|
using System.Collections.Generic;
|
2019-04-11 11:53:31 +02:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-05-26 16:48:47 +02:00
|
|
|
using BTCPayServer.Services.Apps;
|
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
|
|
|
|
|
|
|
namespace BTCPayServer.Models.AppViewModels
|
|
|
|
{
|
|
|
|
public class UpdatePointOfSaleViewModel
|
|
|
|
{
|
2019-07-14 22:54:27 +09:00
|
|
|
public string StoreId { get; set; }
|
2018-04-03 11:50:41 +09:00
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
|
|
|
public string Title { get; set; }
|
|
|
|
[Required]
|
|
|
|
[MaxLength(5)]
|
|
|
|
public string Currency { get; set; }
|
|
|
|
public string Template { get; set; }
|
2018-04-26 22:09:18 +09:00
|
|
|
|
2020-05-26 16:48:47 +02:00
|
|
|
[Display(Name = "Default view")]
|
|
|
|
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
|
|
|
|
|
|
|
[Display(Name = "Callback Notification Url")]
|
2019-03-29 07:51:00 +01:00
|
|
|
[Uri]
|
|
|
|
public string NotificationUrl { get; set; }
|
2018-11-16 20:39:43 -06:00
|
|
|
|
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2018-11-17 12:43:11 +09:00
|
|
|
[Display(Name = "Text to display on each buttons for items with a specific price")]
|
2018-11-16 20:39:43 -06:00
|
|
|
public string ButtonText { get; set; }
|
|
|
|
[Required]
|
|
|
|
[MaxLength(30)]
|
2018-11-17 12:43:11 +09:00
|
|
|
[Display(Name = "Text to display on buttons next to the input 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)]
|
2018-11-17 12:43:11 +09:00
|
|
|
[Display(Name = "Custom bootstrap CSS file")]
|
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
|
|
|
|
2019-08-19 07:13:42 +02:00
|
|
|
public string EmbeddedCSS { get; set; }
|
|
|
|
public string Description { get; set; }
|
2018-04-03 11:50:41 +09:00
|
|
|
}
|
|
|
|
}
|