mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2025-02-27 09:53:14 +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 $geolocation;
|
||||||
private $storage;
|
private $storage;
|
||||||
private $method;
|
private $method;
|
||||||
|
private $logLevel;
|
||||||
|
|
||||||
private function __construct()
|
private function __construct()
|
||||||
{
|
{
|
||||||
@ -66,6 +67,7 @@ final class Event
|
|||||||
$model->clientInfo = $data['client-info'] ?? [];
|
$model->clientInfo = $data['client-info'] ?? [];
|
||||||
$model->url = $data['url'] ?? '';
|
$model->url = $data['url'] ?? '';
|
||||||
$model->storage = $data['storage'] ?? [];
|
$model->storage = $data['storage'] ?? [];
|
||||||
|
$model->logLevel = $data['log-level'] ?? '';
|
||||||
|
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
@ -192,4 +194,12 @@ final class Event
|
|||||||
{
|
{
|
||||||
return $this->method;
|
return $this->method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLogLevel(): string
|
||||||
|
{
|
||||||
|
return $this->logLevel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ class EventResponseTest extends BaseModelTest
|
|||||||
"is-authenticated": true,
|
"is-authenticated": true,
|
||||||
"is-test-mode": false
|
"is-test-mode": false
|
||||||
},
|
},
|
||||||
|
"log-level": "info",
|
||||||
"message": {
|
"message": {
|
||||||
"headers": {
|
"headers": {
|
||||||
"to": "foo@example.com",
|
"to": "foo@example.com",
|
||||||
@ -69,5 +70,6 @@ JSON;
|
|||||||
$this->assertCount(1, $events);
|
$this->assertCount(1, $events);
|
||||||
$event = $events[0];
|
$event = $events[0];
|
||||||
$this->assertEquals('czsjqFATSlC3QtAK-C80nw', $event->getId());
|
$this->assertEquals('czsjqFATSlC3QtAK-C80nw', $event->getId());
|
||||||
|
$this->assertEquals('info', $event->getLogLevel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user