2020-09-10 13:54:36 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using BTCPayServer.JsonConverters;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Converters;
|
2022-02-15 11:36:04 +01:00
|
|
|
using Newtonsoft.Json.Linq;
|
2020-09-10 13:54:36 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
|
|
|
public class InvoicePaymentMethodDataModel
|
|
|
|
{
|
2021-04-07 06:08:42 +02:00
|
|
|
public bool Activated { get; set; }
|
2020-09-10 13:54:36 +02:00
|
|
|
public string Destination { get; set; }
|
|
|
|
public string PaymentLink { get; set; }
|
|
|
|
|
2020-10-27 11:01:22 +01:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal Rate { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal PaymentMethodPaid { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal TotalPaid { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal Due { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal Amount { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2024-04-04 09:31:04 +02:00
|
|
|
public decimal PaymentMethodFee { get; set; }
|
2020-09-10 13:54:36 +02:00
|
|
|
|
|
|
|
public List<Payment> Payments { get; set; }
|
2024-04-04 09:31:04 +02:00
|
|
|
public string PaymentMethodId { get; set; }
|
|
|
|
public JToken AdditionalData { get; set; }
|
|
|
|
public string Currency { get; set; }
|
2021-11-15 06:25:59 +01:00
|
|
|
|
2020-09-10 13:54:36 +02:00
|
|
|
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))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal Value { get; set; }
|
|
|
|
|
2020-10-23 10:40:08 +02:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
2020-09-10 13:54:36 +02:00
|
|
|
public decimal Fee { get; set; }
|
|
|
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
public PaymentStatus Status { get; set; }
|
|
|
|
|
|
|
|
public string Destination { get; set; }
|
2021-12-31 08:59:02 +01:00
|
|
|
|
2020-09-10 13:54:36 +02:00
|
|
|
public enum PaymentStatus
|
|
|
|
{
|
|
|
|
Invalid,
|
2020-11-23 07:57:05 +01:00
|
|
|
Processing,
|
|
|
|
Settled
|
2020-09-10 13:54:36 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|