From d6595e8f260c35ed22c30ba466dc6440dc376964 Mon Sep 17 00:00:00 2001 From: Steve Chaloner Date: Wed, 13 Nov 2024 04:25:34 +0100 Subject: [PATCH] Remove update chart key for event (#130) 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 `events#update`. Co-authored-by: Steve Chaloner --- lib/seatsio/events.rb | 4 ++-- test/events/update_event_test.rb | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/seatsio/events.rb b/lib/seatsio/events.rb index 6c9cd48..cfc8f4b 100644 --- a/lib/seatsio/events.rb +++ b/lib/seatsio/events.rb @@ -30,8 +30,8 @@ def create_multiple(key: nil, event_creation_params: nil) Events.new(response).events end - def update(key:, chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil, is_in_the_past: nil) - payload = build_event_request(chart_key, event_key, name, date, table_booking_config, object_categories, categories, channels: nil, is_in_the_past: is_in_the_past) + def update(key:, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil, is_in_the_past: nil) + payload = build_event_request(nil, event_key, name, date, table_booking_config, object_categories, categories, channels: nil, is_in_the_past: is_in_the_past) @http_client.post("events/#{key}", payload) end diff --git a/test/events/update_event_test.rb b/test/events/update_event_test.rb index f23c0c4..e34569b 100644 --- a/test/events/update_event_test.rb +++ b/test/events/update_event_test.rb @@ -2,18 +2,6 @@ require 'util' class UpdateEventTest < SeatsioTestClient - def test_update_chart_key - chart1 = @seatsio.charts.create - event = @seatsio.events.create chart_key: chart1.key - chart2 = @seatsio.charts.create - - @seatsio.events.update key: event.key, chart_key: chart2.key - - retrieved_event = @seatsio.events.retrieve key: event.key - assert_equal(event.key, retrieved_event.key) - assert_equal(chart2.key, retrieved_event.chart_key) - end - def test_update_event_key chart = @seatsio.charts.create event = @seatsio.events.create chart_key: chart.key