2022-11-28 09:53:08 +01:00
|
|
|
#nullable enable
|
2022-11-28 12:58:18 +01:00
|
|
|
using BTCPayServer.JsonConverters;
|
2022-11-28 09:53:08 +01:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Converters;
|
|
|
|
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
|
|
{
|
|
|
|
public enum RefundVariant
|
|
|
|
{
|
|
|
|
RateThen,
|
|
|
|
CurrentRate,
|
2023-05-11 10:33:33 +02:00
|
|
|
OverpaidAmount,
|
2022-11-28 09:53:08 +01:00
|
|
|
Fiat,
|
2022-11-28 12:58:18 +01:00
|
|
|
Custom
|
2022-11-28 09:53:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public class RefundInvoiceRequest
|
|
|
|
{
|
|
|
|
public string? Name { get; set; } = null;
|
2022-11-28 12:58:18 +01:00
|
|
|
public string? PaymentMethod { get; set; }
|
2022-11-28 09:53:08 +01:00
|
|
|
public string? Description { get; set; } = null;
|
2023-05-11 10:33:33 +02:00
|
|
|
|
2022-11-28 09:53:08 +01:00
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2022-11-28 12:58:18 +01:00
|
|
|
public RefundVariant? RefundVariant { get; set; }
|
2023-05-11 10:33:33 +02:00
|
|
|
|
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
|
|
|
public decimal SubtractPercentage { get; set; }
|
|
|
|
|
2022-11-28 12:58:18 +01:00
|
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
|
|
|
public decimal? CustomAmount { get; set; }
|
|
|
|
public string? CustomCurrency { get; set; }
|
2022-11-28 09:53:08 +01:00
|
|
|
}
|
|
|
|
}
|