btcpayserver/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs

88 lines
1.7 KiB
C#
Raw Normal View History

using Microsoft.AspNetCore.Mvc.Rendering;
using System;
2017-09-13 15:47:34 +09:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
2018-05-14 09:32:04 +02:00
using BTCPayServer.Validation;
2019-08-25 00:06:34 +10:00
using System.ComponentModel;
2017-09-13 15:47:34 +09:00
namespace BTCPayServer.Models.InvoicingModels
{
public class CreateInvoiceModel
{
public CreateInvoiceModel()
{
Currency = "USD";
}
2020-01-24 17:29:52 +10:00
[Required]
2018-05-11 22:38:31 +09:00
public decimal? Amount
{
get; set;
}
[Required]
public string Currency
{
get; set;
}
[Required]
2020-01-24 17:29:52 +10:00
[DisplayName("Store Id")]
public string StoreId
{
get; set;
}
2020-01-24 17:29:52 +10:00
[DisplayName("Order Id")]
public string OrderId
{
get; set;
}
2019-08-25 00:06:34 +10:00
[DisplayName("Item Description")]
public string ItemDesc
{
get; set;
}
2019-08-25 00:06:34 +10:00
[DisplayName("POS Data")]
public string PosData
{
get; set;
}
[EmailAddress]
2020-01-24 17:29:52 +10:00
[DisplayName("Buyer Email")]
public string BuyerEmail
{
get; set;
}
2018-05-14 09:32:04 +02:00
[Uri]
2019-08-25 00:06:34 +10:00
[DisplayName("Notification Url")]
public string NotificationUrl
{
get; set;
}
public SelectList Stores
{
2020-01-24 17:29:52 +10:00
get; set;
}
2019-08-25 00:06:34 +10:00
[DisplayName("Supported Transaction Currencies")]
public List<string> SupportedTransactionCurrencies
{
2020-01-24 17:29:52 +10:00
get; set;
}
2019-08-25 00:06:34 +10:00
[DisplayName("Available Payment Methods")]
public SelectList AvailablePaymentMethods
{
2020-01-24 17:29:52 +10:00
get; set;
}
}
2017-09-13 15:47:34 +09:00
}