Table of Contents

Interface ITemplateResource

Namespace
Mailtrap.Templates
Assembly
Mailtrap.Abstractions.dll

Represents Template resource, served by the /api/templates endpoints.

public interface ITemplateResource : IRestResource
Inherited Members

Remarks

The endpoints are experimental: their request and response shapes may change before general availability.

Methods

Delete(CancellationToken)

Deletes the template, represented by the current resource instance.

Task Delete(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
Token to control operation cancellation.

Returns

Task

Nothing is returned upon successful deletion.

Remarks

After deletion of the template, represented by the current resource instance, it will no longer be available.
Thus any further operations on it will result in an error.

GetDetails(CancellationToken)

Gets details of the template, represented by the current resource instance.

Task<Template> GetDetails(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<Template>

Requested template details.

Update(UpdateTemplateRequest, CancellationToken)

Updates the template, represented by the current resource instance, with details specified by request.

Task<Template> Update(UpdateTemplateRequest request, CancellationToken cancellationToken = default)

Parameters

request UpdateTemplateRequest

Template details for update.

cancellationToken CancellationToken
Token to control operation cancellation.

Returns

Task<Template>

Updated template details.