Table of Contents

Interface ISendingDomainResource

Namespace
Mailtrap.SendingDomains
Assembly
Mailtrap.Abstractions.dll

Represents sending domain resource.

public interface ISendingDomainResource : IRestResource
Inherited Members

Methods

Delete(CancellationToken)

Deletes a sending domain, represented by the current resource instance.

Task Delete(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task

A task that represents the completion of the delete operation.

Remarks

On success the API returns HTTP 204 (No Content). After deletion, the sending domain represented by this resource instance will no longer be available.

Exceptions

OperationCanceledException

The operation was canceled.

MailtrapApiException

The API request failed.

GetDetails(CancellationToken)

Gets domain data and status of sending domain, represented by this resource instance.

Task<SendingDomain> GetDetails(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<SendingDomain>

Attributes, DNS records, status, etc. for domain.

SendInstructions(SendingDomainInstructionsRequest, CancellationToken)

Sends setup instructions for sending domain, represented by this resource instance, to the recipient specified by request.

Task SendInstructions(SendingDomainInstructionsRequest request, CancellationToken cancellationToken = default)

Parameters

request SendingDomainInstructionsRequest

Request containing recipient details to send setup instructions to.

cancellationToken CancellationToken
Token to control operation cancellation.

Returns

Task

Task instance, representing the operation completion.