btcpayserver/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs
Andrew Camilleri b5f4739ae5 Allow invoice creation to only allow specific payment methods in UI (#792)
* allow invoice creation to only allow specific payment methods

* add test

* reuse existing feature

* final fixes
2019-05-02 21:29:51 +09:00

86 lines
1.5 KiB
C#

using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Validation;
namespace BTCPayServer.Models.InvoicingModels
{
public class CreateInvoiceModel
{
public CreateInvoiceModel()
{
Currency = "USD";
}
[Required]
public decimal? Amount
{
get; set;
}
[Required]
public string Currency
{
get; set;
}
[Required]
public string StoreId
{
get; set;
}
public string OrderId
{
get; set;
}
public string ItemDesc
{
get; set;
}
public string PosData
{
get; set;
}
[EmailAddress]
public string BuyerEmail
{
get; set;
}
[EmailAddress]
public string NotificationEmail
{
get; set;
}
[Uri]
public string NotificationUrl
{
get; set;
}
public SelectList Stores
{
get;
set;
}
public List<string> SupportedTransactionCurrencies
{
get;
set;
}
public SelectList AvailablePaymentMethods
{
get;
set;
}
}
}