Add InvoiceTime, Expiration and monitoring to Invoice greenfield API

This commit is contained in:
nicolas.dorier
2020-08-26 21:31:08 +09:00
parent f2e94e6819
commit f900d520da
3 changed files with 24 additions and 1 deletions

View File

@@ -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; }
}
}

View File

@@ -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,

View File

@@ -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"