MailSlurpAPI.Api.TemplateController (mailslurp v11.7.5)

API calls for all endpoints tagged TemplateController.

Link to this section Summary

Link to this section Functions

Link to this function

create_template(connection, create_template_options, opts \\ [])

Specs

Create a Template

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • create_template_options (CreateTemplateOptions): createTemplateOptions
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

delete_template(connection, template_id, opts \\ [])

Specs

delete_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete Template

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • template_id (String.t): TemplateId
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

get_all_templates(connection, opts \\ [])

Specs

get_all_templates(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageTemplateProjection.t()} | {:error, Tesla.Env.t()}

Get all Templates in paginated format

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index in inbox list pagination
    • :size (integer()): Optional page size in inbox list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC

      Returns

} on success {:error, info} on failure

Link to this function

get_template(connection, template_id, opts \\ [])

Specs

get_template(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.TemplateDto.t()} | {:error, Tesla.Env.t()}

Get Template

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • template_id (String.t): TemplateId
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

get_templates(connection, opts \\ [])

Specs

get_templates(Tesla.Env.client(), keyword()) ::
  {:ok, [MailSlurpAPI.Model.TemplateProjection.t()]} | {:error, Tesla.Env.t()}

Get all Templates

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    Returns

, ...]} on success {:error, info} on failure