Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove update chart key for event #142

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading