Added field "StoreId" to a Payment Request in Greenfield

This commit is contained in:
Wouter Samaey 2021-12-21 10:51:15 +01:00 committed by Andrew Camilleri
parent 9843f66bb6
commit f63a9ed1a0
4 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@ namespace BTCPayServer.Client.Models
{
public class PaymentRequestBaseData
{
public string StoreId { get; set; }
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string Currency { get; set; }

View File

@ -937,6 +937,7 @@ namespace BTCPayServer.Tests
//get payment request
var paymentRequest = await viewOnly.GetPaymentRequest(user.StoreId, newPaymentRequest.Id);
Assert.Equal(newPaymentRequest.Title, paymentRequest.Title);
Assert.Equal(newPaymentRequest.StoreId, user.StoreId);
//update payment request
var updateRequest = JObject.FromObject(paymentRequest).ToObject<UpdatePaymentRequestRequest>();

View File

@ -150,6 +150,7 @@ namespace BTCPayServer.Controllers.GreenField
{
Created = data.Created,
Id = data.Id,
StoreId = data.StoreDataId,
Status = data.Status,
Archived = data.Archived,
Amount = blob.Amount,

View File

@ -289,6 +289,10 @@
"description": "The id of the payment request",
"nullable": false
},
"storeId": {
"type": "string",
"description": "The store identifier that the payment request belongs to"
},
"status": {
"type": "string",
"enum": [ "Pending", "Completed" ,"Expired"],