Postmark\PostmarkAdminClient::getDomain PHP 메소드

getDomain() 공개 메소드

Get information for a specific Domain.
public getDomain ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID for the Domains you wish to retrieve.
리턴 Postmark\Models\DynamicResponseModel
    function getDomain($id)
    {
        return new DynamicResponseModel($this->processRestRequest('GET', "/domains/{$id}"));
    }

Usage Example

 function testClientCanGetSingleDomain()
 {
     $tk = parent::$testKeys;
     $client = new PostmarkAdminClient($tk->WRITE_ACCOUNT_TOKEN, $tk->TEST_TIMEOUT);
     $id = $client->listDomains()->domains[0]->id;
     $domain = $client->getDomain($id);
     $this->assertNotEmpty($domain->name);
 }