Get the current information for a specific template.
public getTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel | ||
$id | integer | the Id for the template info you wish to retrieve. |
Результат | Postmark\Models\DynamicResponseModel |
function testClientCanGetTemplate() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->WRITE_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); $result = $client->createTemplate('test-php-template-' . date('c'), "{{subject}}", "Hello <b>{{name}}</b>!", "Hello {{name}}!"); $currentVersion = $client->getTemplate($result->TemplateId); $this->assertNotEmpty($currentVersion->Name); $this->assertNotEmpty($currentVersion->Subject); $this->assertNotEmpty($currentVersion->HtmlBody); $this->assertNotEmpty($currentVersion->TextBody); $this->assertEquals($currentVersion->Active, true); }