Skip to content

Commit

Permalink
Remove update chart key for event (#130)
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 `events#update`.

Co-authored-by: Steve Chaloner <steve@seats.io>
  • Loading branch information
schaloner and Steve Chaloner authored Nov 13, 2024
1 parent 74047e5 commit d6595e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/seatsio/events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 0 additions & 12 deletions test/events/update_event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6595e8

Please sign in to comment.