diff --git a/SeatsioDotNet.Test/Events/MarkObjectsAsNotForSaleTest.cs b/SeatsioDotNet.Test/Events/MarkObjectsAsNotForSaleTest.cs index ca59d73..fda7191 100644 --- a/SeatsioDotNet.Test/Events/MarkObjectsAsNotForSaleTest.cs +++ b/SeatsioDotNet.Test/Events/MarkObjectsAsNotForSaleTest.cs @@ -1,4 +1,6 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; +using SeatsioDotNet.EventReports; using Xunit; namespace SeatsioDotNet.Test.Events; @@ -6,7 +8,7 @@ namespace SeatsioDotNet.Test.Events; public class MarkObjectsAsNotForSaleTest : SeatsioClientTest { [Fact] - public async Task ObjectsCandCategories() + public async Task ObjectsAndCategories() { var chartKey = CreateTestChart(); var evnt = await Client.Events.CreateAsync(chartKey); @@ -46,4 +48,15 @@ public async Task Categories() Assert.Empty(forSaleConfig.AreaPlaces); Assert.Equal(new[] {"cat1", "cat2"}, forSaleConfig.Categories); } + + [Fact] + public async Task NumNotForSaleIsCorrectlyExposed() + { + var chartKey = CreateTestChart(); + var evnt = await Client.Events.CreateAsync(chartKey); + await Client.Events.MarkAsNotForSaleAsync(evnt.Key, null, new() {{"GA1", 3}}, null); + + Dictionary info = await Client.Events.RetrieveObjectInfosAsync(evnt.Key, new[] { "GA1" }); + Assert.Equal(3, info["GA1"].NumNotForSale); + } } \ No newline at end of file diff --git a/SeatsioDotNet/Events/EventObjectInfo.cs b/SeatsioDotNet/Events/EventObjectInfo.cs index a795f55..ac26598 100644 --- a/SeatsioDotNet/Events/EventObjectInfo.cs +++ b/SeatsioDotNet/Events/EventObjectInfo.cs @@ -31,6 +31,7 @@ public class EventObjectInfo public int? NumBooked { get; set; } public int? NumFree { get; set; } public int? NumHeld { get; set; } + public int? NumNotForSale { get; set; } public int? Capacity { get; set; } public bool? BookAsAWhole { get; set; } public Dictionary ExtraData { get; set; }