mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
GreenField: Add StoreId to Invoice model (#2592)
This commit is contained in:
@@ -7,6 +7,7 @@ namespace BTCPayServer.Client.Models
|
|||||||
public class InvoiceData : CreateInvoiceRequest
|
public class InvoiceData : CreateInvoiceRequest
|
||||||
{
|
{
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
public string StoreId { get; set; }
|
||||||
public string CheckoutLink { get; set; }
|
public string CheckoutLink { get; set; }
|
||||||
[JsonConverter(typeof(StringEnumConverter))]
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
public InvoiceStatus Status { get; set; }
|
public InvoiceStatus Status { get; set; }
|
||||||
|
|||||||
@@ -1019,7 +1019,7 @@ namespace BTCPayServer.Tests
|
|||||||
RedirectAutomatically = true
|
RedirectAutomatically = true
|
||||||
}});
|
}});
|
||||||
Assert.True(newInvoice.Checkout.RedirectAutomatically);
|
Assert.True(newInvoice.Checkout.RedirectAutomatically);
|
||||||
|
Assert.Equal(user.StoreId, newInvoice.StoreId);
|
||||||
//list
|
//list
|
||||||
var invoices = await viewOnly.GetInvoices(user.StoreId);
|
var invoices = await viewOnly.GetInvoices(user.StoreId);
|
||||||
|
|
||||||
|
|||||||
@@ -385,6 +385,7 @@ namespace BTCPayServer.Controllers.GreenField
|
|||||||
{
|
{
|
||||||
return new InvoiceData()
|
return new InvoiceData()
|
||||||
{
|
{
|
||||||
|
StoreId = entity.StoreId,
|
||||||
ExpirationTime = entity.ExpirationTime,
|
ExpirationTime = entity.ExpirationTime,
|
||||||
MonitoringExpiration = entity.MonitoringExpiration,
|
MonitoringExpiration = entity.MonitoringExpiration,
|
||||||
CreatedTime = entity.InvoiceTime,
|
CreatedTime = entity.InvoiceTime,
|
||||||
|
|||||||
@@ -749,6 +749,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The identifier of the invoice"
|
"description": "The identifier of the invoice"
|
||||||
},
|
},
|
||||||
|
"storeId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The store identifier that the invoice belongs to"
|
||||||
|
},
|
||||||
"checkoutLink": {
|
"checkoutLink": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The link to the checkout page, where you can redirect the customer"
|
"description": "The link to the checkout page, where you can redirect the customer"
|
||||||
|
|||||||
Reference in New Issue
Block a user