mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 08:26:06 +03:00
added unmapped proeprty logLevel to Event model
This commit is contained in:
parent
b56b7dd81d
commit
3354ac3514
@ -37,6 +37,7 @@ final class Event
|
||||
private $geolocation;
|
||||
private $storage;
|
||||
private $method;
|
||||
private $logLevel;
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
@ -66,6 +67,7 @@ final class Event
|
||||
$model->clientInfo = $data['client-info'] ?? [];
|
||||
$model->url = $data['url'] ?? '';
|
||||
$model->storage = $data['storage'] ?? [];
|
||||
$model->logLevel = $data['log-level'] ?? '';
|
||||
|
||||
return $model;
|
||||
}
|
||||
@ -192,4 +194,12 @@ final class Event
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLogLevel(): string
|
||||
{
|
||||
return $this->logLevel;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ class EventResponseTest extends BaseModelTest
|
||||
"is-authenticated": true,
|
||||
"is-test-mode": false
|
||||
},
|
||||
"log-level": "info",
|
||||
"message": {
|
||||
"headers": {
|
||||
"to": "foo@example.com",
|
||||
@ -69,5 +70,6 @@ JSON;
|
||||
$this->assertCount(1, $events);
|
||||
$event = $events[0];
|
||||
$this->assertEquals('czsjqFATSlC3QtAK-C80nw', $event->getId());
|
||||
$this->assertEquals('info', $event->getLogLevel());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user