Postmark\PostmarkClient::getBounce PHP Méthode

getBounce() public méthode

Locate information on a specific email bounce.
public getBounce ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the bounce to get.
Résultat Postmark\Models\DynamicResponseModel
    function getBounce($id)
    {
        return new DynamicResponseModel($this->processRestRequest('GET', "/bounces/{$id}"));
    }

Usage Example

 function testClientCanGetBounce()
 {
     $tk = parent::$testKeys;
     $client = new PostmarkClient($tk->READ_INBOUND_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT);
     $bounces = $client->getBounces(10, 0);
     $id = $bounces->Bounces[0]['ID'];
     $bounce = $client->getBounce($id);
     $this->assertNotEmpty($bounce);
 }