Search Results for

    Show / Hide Table of Contents

    Class TemplateControllerApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    TemplateControllerApi
    Implements
    ITemplateControllerApi
    ITemplateControllerApiSync
    ITemplateControllerApiAsync
    IApiAccessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: mailslurp.Api
    Assembly: mailslurp.dll
    Syntax
    public class TemplateControllerApi : ITemplateControllerApi, ITemplateControllerApiSync, ITemplateControllerApiAsync, IApiAccessor

    Constructors

    View Source

    TemplateControllerApi()

    Initializes a new instance of the TemplateControllerApi class.

    Declaration
    public TemplateControllerApi()
    View Source

    TemplateControllerApi(Configuration)

    Initializes a new instance of the TemplateControllerApi class using Configuration object

    Declaration
    public TemplateControllerApi(Configuration configuration)
    Parameters
    Type Name Description
    Configuration configuration

    An instance of Configuration

    View Source

    TemplateControllerApi(ISynchronousClient, IAsynchronousClient, IReadableConfiguration)

    Initializes a new instance of the TemplateControllerApi class using a Configuration object and client instance.

    Declaration
    public TemplateControllerApi(ISynchronousClient client, IAsynchronousClient asyncClient, IReadableConfiguration configuration)
    Parameters
    Type Name Description
    ISynchronousClient client

    The client interface for synchronous API access.

    IAsynchronousClient asyncClient

    The client interface for asynchronous API access.

    IReadableConfiguration configuration

    The configuration object.

    View Source

    TemplateControllerApi(string)

    Initializes a new instance of the TemplateControllerApi class.

    Declaration
    public TemplateControllerApi(string basePath)
    Parameters
    Type Name Description
    string basePath

    Properties

    View Source

    AsynchronousClient

    The client for accessing this underlying API asynchronously.

    Declaration
    public IAsynchronousClient AsynchronousClient { get; set; }
    Property Value
    Type Description
    IAsynchronousClient
    View Source

    Client

    The client for accessing this underlying API synchronously.

    Declaration
    public ISynchronousClient Client { get; set; }
    Property Value
    Type Description
    ISynchronousClient
    View Source

    Configuration

    Gets or sets the configuration object

    Declaration
    public IReadableConfiguration Configuration { get; set; }
    Property Value
    Type Description
    IReadableConfiguration

    An instance of the Configuration

    View Source

    ExceptionFactory

    Provides a factory method hook for the creation of exceptions.

    Declaration
    public ExceptionFactory ExceptionFactory { get; set; }
    Property Value
    Type Description
    ExceptionFactory

    Methods

    View Source

    CreateTemplate(CreateTemplateOptions, int)

    Create a Template Create an email template with variables for use with templated transactional emails.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    CreateTemplateAsync(CreateTemplateOptions, int, CancellationToken)

    Create a Template Create an email template with variables for use with templated transactional emails.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    CreateTemplateWithHttpInfo(CreateTemplateOptions, int)

    Create a Template Create an email template with variables for use with templated transactional emails.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    CreateTemplateWithHttpInfoAsync(CreateTemplateOptions, int, CancellationToken)

    Create a Template Create an email template with variables for use with templated transactional emails.

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteTemplate(Guid, int)

    Delete email template Delete template

    Declaration
    public void DeleteTemplate(Guid templateId, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid templateId

    Template ID

    int operationIndex

    Index associated with the operation.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteTemplateAsync(Guid, int, CancellationToken)

    Delete email template Delete template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteTemplateWithHttpInfo(Guid, int)

    Delete email template Delete template

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    DeleteTemplateWithHttpInfoAsync(Guid, int, CancellationToken)

    Delete email template Delete template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAllTemplates(int?, int?, string, DateTime?, DateTime?, int)

    List templates Get all templates in paginated format

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAllTemplatesAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)

    List templates Get all templates in paginated format

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAllTemplatesWithHttpInfo(int?, int?, string, DateTime?, DateTime?, int)

    List templates Get all templates in paginated format

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetAllTemplatesWithHttpInfoAsync(int?, int?, string, DateTime?, DateTime?, int, CancellationToken)

    List templates Get all templates in paginated format

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    View Source

    GetTemplate(Guid, int)

    Get template Get email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplateAsync(Guid, int, CancellationToken)

    Get template Get email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewHtml(Guid, int)

    Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewHtmlAsync(Guid, int, CancellationToken)

    Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewHtmlWithHttpInfo(Guid, int)

    Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewHtmlWithHttpInfoAsync(Guid, int, CancellationToken)

    Get template preview HTML Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewJson(Guid, int)

    Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewJsonAsync(Guid, int, CancellationToken)

    Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewJsonWithHttpInfo(Guid, int)

    Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params.

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatePreviewJsonWithHttpInfoAsync(Guid, int, CancellationToken)

    Get template preview Json Get email template preview with passed template variables in JSON format. Pass template variables as query params.

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplates(int)

    List templates Get all templates

    Declaration
    public 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>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatesAsync(int, CancellationToken)

    List templates Get all templates

    Declaration
    public 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>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatesWithHttpInfo(int)

    List templates Get all templates

    Declaration
    public 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>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplatesWithHttpInfoAsync(int, CancellationToken)

    List templates Get all templates

    Declaration
    public 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>)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplateWithHttpInfo(Guid, int)

    Get template Get email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    GetTemplateWithHttpInfoAsync(Guid, int, CancellationToken)

    Get template Get email template

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UpdateTemplate(Guid, CreateTemplateOptions, int)

    Update template Update email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UpdateTemplateAsync(Guid, CreateTemplateOptions, int, CancellationToken)

    Update template Update email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UpdateTemplateWithHttpInfo(Guid, CreateTemplateOptions, int)

    Update template Update email template

    Declaration
    public 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

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    UpdateTemplateWithHttpInfoAsync(Guid, CreateTemplateOptions, int, CancellationToken)

    Update template Update email template

    Declaration
    public 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)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    Implements

    ITemplateControllerApi
    ITemplateControllerApiSync
    ITemplateControllerApiAsync
    IApiAccessor
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.