Skip to content

Commit

Permalink
Remove update chart key for event
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`.
  • Loading branch information
Steve Chaloner committed Nov 12, 2024
1 parent 5b8b224 commit 0260bb4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions src/Events/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ public function update(string $eventKey, UpdateEventParams $params): void
{
$request = new stdClass();

if ($params->chartKey !== null) {
$request->chartKey = $params->chartKey;
}

if ($params->eventKey !== null) {
$request->eventKey = $params->eventKey;
}
Expand Down
5 changes: 0 additions & 5 deletions src/Events/UpdateEventParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

class UpdateEventParams extends EventParams
{
/**
* @var string
*/
public $chartKey;

/**
* @var bool
*/
Expand Down
13 changes: 0 additions & 13 deletions tests/Events/UpdateEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@
class UpdateEventTest extends SeatsioClientTest
{

public function testUpdateChartKey()
{
$chart1 = $this->seatsioClient->charts->create();
$chart2 = $this->seatsioClient->charts->create();
$event = $this->seatsioClient->events->create($chart1->key);

$this->seatsioClient->events->update($event->key, UpdateEventParams::create()->setChartKey($chart2->key));

$retrievedEvent = $this->seatsioClient->events->retrieve($event->key);
self::assertEquals($chart2->key, $retrievedEvent->chartKey);
self::assertNotNull($retrievedEvent->updatedOn);
}

public function testUpdateIsInThePast()
{
$chart = $this->seatsioClient->charts->create();
Expand Down

0 comments on commit 0260bb4

Please sign in to comment.