", "subject": "Hello" }, "attachments": [], "recipients": [ "foo@example.com", "baz@example.com", "bar@example.com" ], "size": 69 }, "recipient": "baz@example.com", "method": "http" } ], "paging": { "next": "https://api.mailgun.net/v3/samples.mailgun.org/events/W3siY", "previous": "https://api.mailgun.net/v3/samples.mailgun.org/events/Lkawm" } } JSON; $model = EventResponse::create(json_decode($json, true)); $events = $model->getItems(); $this->assertCount(1, $events); $event = $events[0]; $this->assertEquals('czsjqFATSlC3QtAK-C80nw', $event->getId()); } }