btcpayserver/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs

62 lines
1.8 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class InvoicePaymentMethodDataModel
{
public string Destination { get; set; }
public string PaymentLink { get; set; }
2020-10-27 11:01:22 +01:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Rate { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal PaymentMethodPaid { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal TotalPaid { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Due { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal NetworkFee { get; set; }
public List<Payment> Payments { get; set; }
public string PaymentMethod { get; set; }
public class Payment
{
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTime ReceivedDate { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Value { get; set; }
2020-10-23 10:40:08 +02:00
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Fee { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public PaymentStatus Status { get; set; }
public string Destination { get; set; }
2020-10-23 10:40:08 +02:00
public enum PaymentStatus
{
Invalid,
AwaitingCompletion,
Complete
}
}
}
}