Delete a template.
public deleteTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel | ||
$id | integer | The ID of the template to delete. |
return | Postmark\Models\DynamicResponseModel |
function testClientCanDeleteTemplate() { $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}}!"); $deleteResult = $client->deleteTemplate($result->TemplateId); $this->assertEquals(0, $deleteResult->ErrorCode); }