Skip to content

Commit

Permalink
Remove update chart key for event (#142)
Browse files Browse the repository at this point in the history
Updating the chart key of an event is no longer documented but is still supported by the client libraries. This PR removes the parameter from `UpdateEventParams`.

Co-authored-by: Steve Chaloner <[email protected]>
  • Loading branch information
schaloner and Steve Chaloner authored Nov 12, 2024
1 parent 07fcacc commit c78b8ec
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
15 changes: 0 additions & 15 deletions SeatsioDotNet.Test/Events/UpdateEventTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ namespace SeatsioDotNet.Test.Events;

public class UpdateEventTest : SeatsioClientTest
{
[Fact]
public async Task UpdateChartKey()
{
var chartKey1 = CreateTestChart();
var chartKey2 = CreateTestChart();
var evnt = await Client.Events.CreateAsync(chartKey1);

await Client.Events.UpdateAsync(evnt.Key, new UpdateEventParams().WithChartKey(chartKey2));

var retrievedEvent = await Client.Events.RetrieveAsync(evnt.Key);
Assert.Equal(evnt.Key, retrievedEvent.Key);
Assert.Equal(chartKey2, retrievedEvent.ChartKey);
CustomAssert.CloseTo(DateTimeOffset.Now, retrievedEvent.UpdatedOn.Value);
}

[Fact]
public async Task UpdateEventKey()
{
Expand Down
5 changes: 0 additions & 5 deletions SeatsioDotNet/Events/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,6 @@ public async Task UpdateAsync(string eventKey, UpdateEventParams p, Cancellation
{
Dictionary<string, object> requestBody = new Dictionary<string, object>();

if (p.ChartKey != null)
{
requestBody.Add("chartKey", p.ChartKey);
}

if (p.Key != null)
{
requestBody.Add("eventKey", p.Key);
Expand Down
7 changes: 0 additions & 7 deletions SeatsioDotNet/Events/UpdateEventParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace SeatsioDotNet.Events;
public class UpdateEventParams
{
public string Key { get; set; }
public string ChartKey { get; set; }
public string Name { get; set; }
public DateOnly? Date { get; set; }
public TableBookingConfig TableBookingConfig { get; set; }
Expand All @@ -21,12 +20,6 @@ public UpdateEventParams WithKey(string key)
return this;
}

public UpdateEventParams WithChartKey(string chartKey)
{
ChartKey = chartKey;
return this;
}

public UpdateEventParams WithTableBookingConfig(TableBookingConfig tableBookingConfig)
{
TableBookingConfig = tableBookingConfig;
Expand Down

0 comments on commit c78b8ec

Please sign in to comment.