mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-31 11:54:24 +01:00
Add InvoiceTime, Expiration and monitoring to Invoice greenfield API
This commit is contained in:
@@ -13,5 +13,11 @@ namespace BTCPayServer.Client.Models
|
||||
public InvoiceStatus Status { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public InvoiceExceptionStatus AdditionalStatus { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset MonitoringExpiration { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset ExpirationTime { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset CreatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +255,9 @@ namespace BTCPayServer.Controllers.GreenField
|
||||
{
|
||||
return new InvoiceData()
|
||||
{
|
||||
ExpirationTime = entity.ExpirationTime,
|
||||
MonitoringExpiration = entity.MonitoringExpiration,
|
||||
CreatedTime = entity.InvoiceTime,
|
||||
Amount = entity.Price,
|
||||
Id = entity.Id,
|
||||
Status = entity.Status,
|
||||
|
||||
@@ -523,9 +523,23 @@
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "The identifier of the invoice"
|
||||
},
|
||||
"createdTime": {
|
||||
"type": "number",
|
||||
"format": "int64",
|
||||
"description": "The creation time of the invoice"
|
||||
},
|
||||
"expirationTime": {
|
||||
"type": "number",
|
||||
"format": "int64",
|
||||
"description": "The expiration time of the invoice"
|
||||
},
|
||||
"monitoringTime": {
|
||||
"type": "number",
|
||||
"format": "int64",
|
||||
"description": "The monitoring time of the invoice"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/components/schemas/InvoiceStatus",
|
||||
"description": "The status of the invoice"
|
||||
|
||||
Reference in New Issue
Block a user