btcpayserver/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs
Umar Bolatov d5c38ef336
Add crypto code for invoice and pull payment payout API response (#3099)
* Add "cryptoCode" for invoice payment method API endpoint response

* Add "cryptoCode" for pull payment payout API endpoint response

* Add "#nullable enable" to GreenFieldInvoiceController

* Add "#nullable enable" to GreenfieldPullPaymentController
2021-11-15 14:25:59 +09:00

64 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class InvoicePaymentMethodDataModel
{
public bool Activated { get; set; }
public string Destination { get; set; }
public string PaymentLink { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Rate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal PaymentMethodPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal TotalPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Due { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal NetworkFee { get; set; }
public List<Payment> Payments { get; set; }
public string PaymentMethod { get; set; }
public string CryptoCode { get; set; }
public class Payment
{
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTime ReceivedDate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Value { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Fee { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public PaymentStatus Status { get; set; }
public string Destination { get; set; }
public enum PaymentStatus
{
Invalid,
Processing,
Settled
}
}
}
}