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 #130

Merged
merged 1 commit into from
Nov 13, 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
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
Loading