Interface ITemplateControllerApiAsync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface ITemplateControllerApiAsync : IApiAccessor
Methods
View SourceCreateTemplateAsync(CreateTemplateOptions, int, CancellationToken)
Create a Template
Declaration
Task<TemplateDto> CreateTemplateAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TemplateDto> | Task of TemplateDto |
Remarks
Create an email template with variables for use with templated transactional emails.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CreateTemplateWithHttpInfoAsync(CreateTemplateOptions, int, CancellationToken)
Create a Template
Declaration
Task<ApiResponse<TemplateDto>> CreateTemplateWithHttpInfoAsync(CreateTemplateOptions createTemplateOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TemplateDto>> | Task of ApiResponse (TemplateDto) |
Remarks
Create an email template with variables for use with templated transactional emails.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteTemplateAsync(Guid, int, CancellationToken)
Delete email template
Declaration
Task DeleteTemplateAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Delete template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteTemplateWithHttpInfoAsync(Guid, int, CancellationToken)
Delete email template
Declaration
Task<ApiResponse<object>> DeleteTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Delete template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllTemplatesAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
List templates
Declaration
Task<PageTemplateProjection> GetAllTemplatesAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageTemplateProjection> | Task of PageTemplateProjection |
Remarks
Get all templates in paginated format
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllTemplatesWithHttpInfoAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)
List templates
Declaration
Task<ApiResponse<PageTemplateProjection>> GetAllTemplatesWithHttpInfoAsync(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | page | Optional page index in list pagination (optional, default to 0) |
int? | size | Optional page size in list pagination (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
DateTime? | since | Filter by created at after the given timestamp (optional) |
DateTime? | before | Filter by created at before the given timestamp (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageTemplateProjection>> | Task of ApiResponse (PageTemplateProjection) |
Remarks
Get all templates in paginated format
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplateAsync(Guid, int, CancellationToken)
Get template
Declaration
Task<TemplateDto> GetTemplateAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TemplateDto> | Task of TemplateDto |
Remarks
Get email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatePreviewHtmlAsync(Guid, int, CancellationToken)
Get template preview HTML
Declaration
Task<string> GetTemplatePreviewHtmlAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<string> | Task of string |
Remarks
Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatePreviewHtmlWithHttpInfoAsync(Guid, int, CancellationToken)
Get template preview HTML
Declaration
Task<ApiResponse<string>> GetTemplatePreviewHtmlWithHttpInfoAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<string>> | Task of ApiResponse (string) |
Remarks
Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatePreviewJsonAsync(Guid, int, CancellationToken)
Get template preview Json
Declaration
Task<TemplatePreview> GetTemplatePreviewJsonAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TemplatePreview> | Task of TemplatePreview |
Remarks
Get email template preview with passed template variables in JSON format. Pass template variables as query params.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatePreviewJsonWithHttpInfoAsync(Guid, int, CancellationToken)
Get template preview Json
Declaration
Task<ApiResponse<TemplatePreview>> GetTemplatePreviewJsonWithHttpInfoAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TemplatePreview>> | Task of ApiResponse (TemplatePreview) |
Remarks
Get email template preview with passed template variables in JSON format. Pass template variables as query params.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatesAsync(int, CancellationToken)
List templates
Declaration
Task<List<TemplateProjection>> GetTemplatesAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<System.Collections.Generic.List<T><TemplateProjection>> | Task of List<TemplateProjection> |
Remarks
Get all templates
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatesWithHttpInfoAsync(int, CancellationToken)
List templates
Declaration
Task<ApiResponse<List<TemplateProjection>>> GetTemplatesWithHttpInfoAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<System.Collections.Generic.List<T><TemplateProjection>>> | Task of ApiResponse (List<TemplateProjection>) |
Remarks
Get all templates
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplateWithHttpInfoAsync(Guid, int, CancellationToken)
Get template
Declaration
Task<ApiResponse<TemplateDto>> GetTemplateWithHttpInfoAsync(Guid templateId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TemplateDto>> | Task of ApiResponse (TemplateDto) |
Remarks
Get email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateTemplateAsync(Guid, CreateTemplateOptions, int, CancellationToken)
Update template
Declaration
Task<TemplateDto> UpdateTemplateAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<TemplateDto> | Task of TemplateDto |
Remarks
Update email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateTemplateWithHttpInfoAsync(Guid, CreateTemplateOptions, int, CancellationToken)
Update template
Declaration
Task<ApiResponse<TemplateDto>> UpdateTemplateWithHttpInfoAsync(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<TemplateDto>> | Task of ApiResponse (TemplateDto) |
Remarks
Update email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |