Postmark\PostmarkClient::getDeliveryStatistics PHP Метод

getDeliveryStatistics() публичный Метод

Get an overview of the delivery statistics for all email that has been sent through this Server.
public getDeliveryStatistics ( ) : Postmark\Models\DynamicResponseModel
Результат Postmark\Models\DynamicResponseModel
    function getDeliveryStatistics()
    {
        return new DynamicResponseModel($this->processRestRequest('GET', '/deliverystats'));
    }

Usage Example

 function testClientCanGetDeliveryStatistics()
 {
     $tk = parent::$testKeys;
     $client = new PostmarkClient($tk->READ_INBOUND_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT);
     $stats = $client->getDeliveryStatistics();
     $this->assertNotEmpty($stats, 'Stats from getDeliveryStatistics() should never be null or empty.');
     $this->assertGreaterThan(0, $stats->InactiveMails, "The inactive mail count should be greater than zero.");
 }