resolves Issue #3042 add archive status to invoice response (#3043)

This commit is contained in:
Troy Anderson 2021-11-01 01:53:33 -05:00 committed by GitHub
parent 7d0dc49435
commit 4f235e1d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,7 @@ namespace BTCPayServer.Client.Models
public DateTimeOffset CreatedTime { get; set; }
[JsonProperty(ItemConverterType = typeof(StringEnumConverter))]
public InvoiceStatus[] AvailableStatusesForManualMarking { get; set; }
public bool Archived { get; set; }
}
public enum InvoiceStatus
{

View File

@ -412,6 +412,7 @@ namespace BTCPayServer.Controllers.GreenField
Status = entity.Status.ToModernStatus(),
AdditionalStatus = entity.ExceptionStatus,
Currency = entity.Currency,
Archived = entity.Archived,
Metadata = entity.Metadata.ToJObject(),
AvailableStatusesForManualMarking = statuses.ToArray(),
Checkout = new CreateInvoiceRequest.CheckoutOptions()

View File

@ -856,6 +856,10 @@
"items": {
"$ref": "#/components/schemas/InvoiceStatus"
}
},
"archived": {
"type": "boolean",
"description": "true if the invoice is archived"
}
}
}