Interface ITemplateControllerApiSync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface ITemplateControllerApiSync : IApiAccessor
Methods
View SourceCreateTemplate(CreateTemplateOptions, int)
Create a Template
Declaration
TemplateDto CreateTemplate(CreateTemplateOptions createTemplateOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
TemplateDto | 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 |
CreateTemplateWithHttpInfo(CreateTemplateOptions, int)
Create a Template
Declaration
ApiResponse<TemplateDto> CreateTemplateWithHttpInfo(CreateTemplateOptions createTemplateOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<TemplateDto> | ApiResponse 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 |
DeleteTemplate(Guid, int)
Delete email template
Declaration
void DeleteTemplate(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Remarks
Delete template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteTemplateWithHttpInfo(Guid, int)
Delete email template
Declaration
ApiResponse<object> DeleteTemplateWithHttpInfo(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<object> | ApiResponse of Object(void) |
Remarks
Delete template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllTemplates(int?, int?, string, DateTime?, DateTime?, int)
List templates
Declaration
PageTemplateProjection GetAllTemplates(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0)
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. |
Returns
Type | Description |
---|---|
PageTemplateProjection | PageTemplateProjection |
Remarks
Get all templates in paginated format
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAllTemplatesWithHttpInfo(int?, int?, string, DateTime?, DateTime?, int)
List templates
Declaration
ApiResponse<PageTemplateProjection> GetAllTemplatesWithHttpInfo(int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0)
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. |
Returns
Type | Description |
---|---|
ApiResponse<PageTemplateProjection> | ApiResponse of PageTemplateProjection |
Remarks
Get all templates in paginated format
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplate(Guid, int)
Get template
Declaration
TemplateDto GetTemplate(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
TemplateDto | TemplateDto |
Remarks
Get email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatePreviewHtml(Guid, int)
Get template preview HTML
Declaration
string GetTemplatePreviewHtml(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
string | 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 |
GetTemplatePreviewHtmlWithHttpInfo(Guid, int)
Get template preview HTML
Declaration
ApiResponse<string> GetTemplatePreviewHtmlWithHttpInfo(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<string> | ApiResponse 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 |
GetTemplatePreviewJson(Guid, int)
Get template preview Json
Declaration
TemplatePreview GetTemplatePreviewJson(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
TemplatePreview | 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 |
GetTemplatePreviewJsonWithHttpInfo(Guid, int)
Get template preview Json
Declaration
ApiResponse<TemplatePreview> GetTemplatePreviewJsonWithHttpInfo(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<TemplatePreview> | ApiResponse 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 |
GetTemplates(int)
List templates
Declaration
List<TemplateProjection> GetTemplates(int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T><TemplateProjection> | List<TemplateProjection> |
Remarks
Get all templates
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplatesWithHttpInfo(int)
List templates
Declaration
ApiResponse<List<TemplateProjection>> GetTemplatesWithHttpInfo(int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<System.Collections.Generic.List<T><TemplateProjection>> | ApiResponse of List<TemplateProjection> |
Remarks
Get all templates
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetTemplateWithHttpInfo(Guid, int)
Get template
Declaration
ApiResponse<TemplateDto> GetTemplateWithHttpInfo(Guid templateId, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<TemplateDto> | ApiResponse of TemplateDto |
Remarks
Get email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateTemplate(Guid, CreateTemplateOptions, int)
Update template
Declaration
TemplateDto UpdateTemplate(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
TemplateDto | TemplateDto |
Remarks
Update email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
UpdateTemplateWithHttpInfo(Guid, CreateTemplateOptions, int)
Update template
Declaration
ApiResponse<TemplateDto> UpdateTemplateWithHttpInfo(Guid templateId, CreateTemplateOptions createTemplateOptions, int operationIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | templateId | Template ID |
CreateTemplateOptions | createTemplateOptions | |
int | operationIndex | Index associated with the operation. |
Returns
Type | Description |
---|---|
ApiResponse<TemplateDto> | ApiResponse of TemplateDto |
Remarks
Update email template
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |