From 9bbe816ab9b9c828aa931e04609d66d0e34ba9ca Mon Sep 17 00:00:00 2001 From: mroloux Date: Thu, 23 Jul 2020 14:29:37 +0200 Subject: [PATCH] Best available calls support channels + Added ignoreChannels flag to status change calls --- SeatsioDotNet.Test/Events/BookObjectsTest.cs | 22 +++- .../ChangeBestAvailableObjectStatusTest.cs | 63 +++++++++-- SeatsioDotNet.Test/Events/HoldObjectsTest.cs | 23 +++- .../Events/ReleaseObjectsTest.cs | 26 ++++- SeatsioDotNet/Events/Events.cs | 100 ++++++++++-------- SeatsioDotNet/SeatsioDotNet.csproj | 2 +- 6 files changed, 179 insertions(+), 57 deletions(-) diff --git a/SeatsioDotNet.Test/Events/BookObjectsTest.cs b/SeatsioDotNet.Test/Events/BookObjectsTest.cs index 95881ec..a764d40 100644 --- a/SeatsioDotNet.Test/Events/BookObjectsTest.cs +++ b/SeatsioDotNet.Test/Events/BookObjectsTest.cs @@ -99,7 +99,27 @@ public void ChannelKeys() channelKey1 = new [] {"A-1", "A-2"} }); - Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, new[] {"channelKey1"}); + Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, null, new[] {"channelKey1"}); + + Assert.Equal(ObjectStatus.Booked, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); + } + + [Fact] + public void IgnoreChannels() + { + var chartKey = CreateTestChart(); + var evnt = Client.Events.Create(chartKey); + var channels = new Dictionary() + { + { "channelKey1", new Channel("channel 1", "#FFFF00", 1) } + }; + Client.Events.UpdateChannels(evnt.Key, channels); + Client.Events.AssignObjectsToChannel(evnt.Key, new + { + channelKey1 = new [] {"A-1", "A-2"} + }); + + Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, true); Assert.Equal(ObjectStatus.Booked, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); } diff --git a/SeatsioDotNet.Test/Events/ChangeBestAvailableObjectStatusTest.cs b/SeatsioDotNet.Test/Events/ChangeBestAvailableObjectStatusTest.cs index b5118cf..188a321 100644 --- a/SeatsioDotNet.Test/Events/ChangeBestAvailableObjectStatusTest.cs +++ b/SeatsioDotNet.Test/Events/ChangeBestAvailableObjectStatusTest.cs @@ -17,8 +17,8 @@ public void Number() Assert.True(bestAvailableResult.NextToEachOther); Assert.Equal(new[] {"B-4", "B-5", "B-6"}, bestAvailableResult.Objects); - } - + } + [Fact] public void ObjectDetails() { @@ -26,7 +26,7 @@ public void ObjectDetails() var evnt = Client.Events.Create(chartKey); var bestAvailableResult = Client.Events.ChangeObjectStatus(evnt.Key, new BestAvailable(2), "foo"); - + var reportItem = bestAvailableResult.ObjectDetails["B-4"]; Assert.Equal("B-4", reportItem.Label); reportItem.Labels.Should().BeEquivalentTo(new Labels("4", "seat", "B", "row")); @@ -62,19 +62,22 @@ public void ExtraData() { var chartKey = CreateTestChart(); var evnt = Client.Events.Create(chartKey); - var extraData = new [] + var extraData = new[] { - new Dictionary {{"foo", "bar"}}, - new Dictionary {{"foo", "baz"}} + new Dictionary {{"foo", "bar"}}, + new Dictionary {{"foo", "baz"}} }; - var bestAvailableResult = Client.Events.ChangeObjectStatus(evnt.Key, new BestAvailable(2, null, extraData), "foo"); + var bestAvailableResult = + Client.Events.ChangeObjectStatus(evnt.Key, new BestAvailable(2, null, extraData), "foo"); Assert.Equal(new[] {"B-4", "B-5"}, bestAvailableResult.Objects); - Assert.Equal(new Dictionary {{"foo", "bar"}}, Client.Events.RetrieveObjectStatus(evnt.Key, "B-4").ExtraData); - Assert.Equal(new Dictionary {{"foo", "baz"}}, Client.Events.RetrieveObjectStatus(evnt.Key, "B-5").ExtraData); + Assert.Equal(new Dictionary {{"foo", "bar"}}, + Client.Events.RetrieveObjectStatus(evnt.Key, "B-4").ExtraData); + Assert.Equal(new Dictionary {{"foo", "baz"}}, + Client.Events.RetrieveObjectStatus(evnt.Key, "B-5").ExtraData); } - + [Fact] public void KeepExtraDataTrue() { @@ -113,5 +116,45 @@ public void NoKeepExtraData() Assert.Null(Client.Events.RetrieveObjectStatus(evnt.Key, "B-5").ExtraData); } + + [Fact] + public void ChannelKeys() + { + var chartKey = CreateTestChart(); + var evnt = Client.Events.Create(chartKey); + var channels = new Dictionary() + { + {"channelKey1", new Channel("channel 1", "#FFFF00", 1)} + }; + Client.Events.UpdateChannels(evnt.Key, channels); + Client.Events.AssignObjectsToChannel(evnt.Key, new + { + channelKey1 = new[] {"B-6"} + }); + + var bestAvailableResult = Client.Events.ChangeObjectStatus(evnt.Key, new BestAvailable(1), "someStatus", channelKeys: new[] {"channelKey1"}); + + Assert.Equal(new[] {"B-6"}, bestAvailableResult.Objects); + } + + [Fact] + public void IgnoreChannels() + { + var chartKey = CreateTestChart(); + var evnt = Client.Events.Create(chartKey); + var channels = new Dictionary() + { + {"channelKey1", new Channel("channel 1", "#FFFF00", 1)} + }; + Client.Events.UpdateChannels(evnt.Key, channels); + Client.Events.AssignObjectsToChannel(evnt.Key, new + { + channelKey1 = new[] {"B-5"} + }); + + var bestAvailableResult = Client.Events.ChangeObjectStatus(evnt.Key, new BestAvailable(1), "someStatus", ignoreChannels: true); + + Assert.Equal(new[] {"B-5"}, bestAvailableResult.Objects); + } } } \ No newline at end of file diff --git a/SeatsioDotNet.Test/Events/HoldObjectsTest.cs b/SeatsioDotNet.Test/Events/HoldObjectsTest.cs index 06aa2b5..61a61fe 100644 --- a/SeatsioDotNet.Test/Events/HoldObjectsTest.cs +++ b/SeatsioDotNet.Test/Events/HoldObjectsTest.cs @@ -84,7 +84,28 @@ public void ChannelKeys() channelKey1 = new [] {"A-1", "A-2"} }); - Client.Events.Hold(evnt.Key, new[] {"A-1"}, holdToken.Token, null, true, new[] {"channelKey1"}); + Client.Events.Hold(evnt.Key, new[] {"A-1"}, holdToken.Token, null, true, null, new[] {"channelKey1"}); + + Assert.Equal(ObjectStatus.Held, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); + } + + [Fact] + public void IgnoreChannels() + { + var chartKey = CreateTestChart(); + var evnt = Client.Events.Create(chartKey); + HoldToken holdToken = Client.HoldTokens.Create(); + var channels = new Dictionary() + { + { "channelKey1", new Channel("channel 1", "#FFFF00", 1) } + }; + Client.Events.UpdateChannels(evnt.Key, channels); + Client.Events.AssignObjectsToChannel(evnt.Key, new + { + channelKey1 = new [] {"A-1", "A-2"} + }); + + Client.Events.Hold(evnt.Key, new[] {"A-1"}, holdToken.Token, null, true, true); Assert.Equal(ObjectStatus.Held, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); } diff --git a/SeatsioDotNet.Test/Events/ReleaseObjectsTest.cs b/SeatsioDotNet.Test/Events/ReleaseObjectsTest.cs index 8175cd3..b1e0b24 100644 --- a/SeatsioDotNet.Test/Events/ReleaseObjectsTest.cs +++ b/SeatsioDotNet.Test/Events/ReleaseObjectsTest.cs @@ -81,9 +81,31 @@ public void ChannelKeys() channelKey1 = new [] {"A-1", "A-2"} }); - Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, new[] {"channelKey1"}); + Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, null, new[] {"channelKey1"}); - Client.Events.Release(evnt.Key, new[] {"A-1"}, null, null, true, new[] {"channelKey1"}); + Client.Events.Release(evnt.Key, new[] {"A-1"}, null, null, true, null, new[] {"channelKey1"}); + + Assert.Equal(ObjectStatus.Free, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); + } + + [Fact] + public void IgnoreChannels() + { + var chartKey = CreateTestChart(); + var evnt = Client.Events.Create(chartKey); + var channels = new Dictionary() + { + { "channelKey1", new Channel("channel 1", "#FFFF00", 1) } + }; + Client.Events.UpdateChannels(evnt.Key, channels); + Client.Events.AssignObjectsToChannel(evnt.Key, new + { + channelKey1 = new [] {"A-1", "A-2"} + }); + + Client.Events.Book(evnt.Key, new[] {"A-1"}, null, null, true, null, new[] {"channelKey1"}); + + Client.Events.Release(evnt.Key, new[] {"A-1"}, null, null, true, true); Assert.Equal(ObjectStatus.Free, Client.Events.RetrieveObjectStatus(evnt.Key, "A-1").Status); } diff --git a/SeatsioDotNet/Events/Events.cs b/SeatsioDotNet/Events/Events.cs index 39a8717..ea6cc47 100644 --- a/SeatsioDotNet/Events/Events.cs +++ b/SeatsioDotNet/Events/Events.cs @@ -178,94 +178,94 @@ public ObjectStatus RetrieveObjectStatus(string eventKey, string objectLabel) return AssertOk(_restClient.Execute(restRequest)); } - public ChangeObjectStatusResult Book(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Book(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Book(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null) + public ChangeObjectStatusResult Book(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Book(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null) + public ChangeObjectStatusResult Book(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Book(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null) + public ChangeObjectStatusResult Book(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Booked, holdToken, orderId, keepExtraData,ignoreChannels, channelKeys); } - public BestAvailableResult Book(string eventKey, BestAvailable bestAvailable, string holdToken = null, string orderId = null, bool? keepExtraData = null) + public BestAvailableResult Book(string eventKey, BestAvailable bestAvailable, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, bestAvailable, ObjectStatus.Booked, holdToken, orderId, keepExtraData); + return ChangeObjectStatus(eventKey, bestAvailable, ObjectStatus.Booked, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Release(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Release(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData,ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Release(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Release(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Release(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Release(string eventKey, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Release(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Release(string[] eventKeys, IEnumerable objects, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Free, holdToken, orderId, keepExtraData,ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Hold(string eventKey, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Hold(string eventKey, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Hold(string[] eventKeys, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Hold(string[] eventKeys, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Hold(string eventKey, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Hold(string eventKey, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKey, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData,ignoreChannels, channelKeys); } - public ChangeObjectStatusResult Hold(string[] eventKeys, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult Hold(string[] eventKeys, IEnumerable objects, string holdToken, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(eventKeys, objects, ObjectStatus.Held, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public BestAvailableResult Hold(string eventKey, BestAvailable bestAvailable, string holdToken, string orderId = null, bool? keepExtraData = null) + public BestAvailableResult Hold(string eventKey, BestAvailable bestAvailable, string holdToken, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(eventKey, bestAvailable, ObjectStatus.Held, holdToken, orderId, keepExtraData); + return ChangeObjectStatus(eventKey, bestAvailable, ObjectStatus.Held, holdToken, orderId, keepExtraData,ignoreChannels, channelKeys); } - public ChangeObjectStatusResult ChangeObjectStatus(string eventKey, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult ChangeObjectStatus(string eventKey, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null,bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(new[] {eventKey}, objects.Select(o => new ObjectProperties(o)), status, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(new[] {eventKey}, objects.Select(o => new ObjectProperties(o)), status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult ChangeObjectStatus(string eventKey, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult ChangeObjectStatus(string eventKey, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(new[] {eventKey}, objects, status, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(new[] {eventKey}, objects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult ChangeObjectStatus(IEnumerable events, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult ChangeObjectStatus(IEnumerable events, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - return ChangeObjectStatus(events, objects.Select(o => new ObjectProperties(o)), status, holdToken, orderId, keepExtraData, channelKeys); + return ChangeObjectStatus(events, objects.Select(o => new ObjectProperties(o)), status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); } - public ChangeObjectStatusResult ChangeObjectStatus(IEnumerable events, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, string[] channelKeys = null) + public ChangeObjectStatusResult ChangeObjectStatus(IEnumerable events, IEnumerable objects, string status, string holdToken = null, string orderId = null, bool? keepExtraData = null, bool? ignoreChannels = null, string[] channelKeys = null) { - var requestBody = ChangeObjectStatusRequest(events, objects, status, holdToken, orderId, keepExtraData, channelKeys); + var requestBody = ChangeObjectStatusRequest(events, objects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); var restRequest = new RestRequest("/seasons/actions/change-object-status", Method.POST) .AddQueryParameter("expand", "objects") .AddJsonBody(requestBody); @@ -281,21 +281,21 @@ public List ChangeObjectStatus(StatusChangeRequest[] r return AssertOk(_restClient.Execute(restRequest)).Results; } - private Dictionary ChangeObjectStatusRequest(string evnt, IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, string[] channelKeys = null) + private Dictionary ChangeObjectStatusRequest(string evnt, IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, bool? ignoreChannels = null, string[] channelKeys = null) { - var request = ChangeObjectStatusRequest(objects, status, holdToken, orderId, keepExtraData, channelKeys); + var request = ChangeObjectStatusRequest(objects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); request.Add("event", evnt); return request; } - private Dictionary ChangeObjectStatusRequest(IEnumerable events, IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, string[] channelKeys = null) + private Dictionary ChangeObjectStatusRequest(IEnumerable events, IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, bool? ignoreChannels = null, string[] channelKeys = null) { - var request = ChangeObjectStatusRequest(objects, status, holdToken, orderId, keepExtraData, channelKeys); + var request = ChangeObjectStatusRequest(objects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys); request.Add("events", events); return request; } - private Dictionary ChangeObjectStatusRequest(IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, string[] channelKeys = null) + private Dictionary ChangeObjectStatusRequest(IEnumerable objects, string status, string holdToken, string orderId, bool? keepExtraData, bool? ignoreChannels = null, string[] channelKeys = null) { var requestBody = new Dictionary() { @@ -317,15 +317,21 @@ private Dictionary ChangeObjectStatusRequest(IEnumerable() { @@ -347,6 +353,16 @@ public BestAvailableResult ChangeObjectStatus(string eventKey, BestAvailable bes { requestBody.Add("keepExtraData", keepExtraData); } + + if (ignoreChannels != null) + { + requestBody.Add("ignoreChannels", ignoreChannels); + } + + if (channelKeys != null) + { + requestBody.Add("channelKeys", channelKeys); + } var restRequest = new RestRequest("/events/{key}/actions/change-object-status", Method.POST) .AddUrlSegment("key", eventKey) diff --git a/SeatsioDotNet/SeatsioDotNet.csproj b/SeatsioDotNet/SeatsioDotNet.csproj index 75048a3..40f8403 100644 --- a/SeatsioDotNet/SeatsioDotNet.csproj +++ b/SeatsioDotNet/SeatsioDotNet.csproj @@ -2,7 +2,7 @@ Library true - 70.10.0 + 70.11.0 mroloux;bverbeken Official Seats.io .NET API client Official Seats.io .NET API client