MailSlurpAPI.Api.TemplateController (mailslurp v15.5.3)

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):
  • 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):
  • 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 list pagination
    • :size (integer()): Optional page size in list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC
    • :since (DateTime.t): Filter by created at after the given timestamp
    • :before (DateTime.t): Filter by created at before the given timestamp

      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):
  • 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

Link to this function

update_template(connection, template_id, create_template_options, opts \\ [])

Specs

Update a Template

Parameters

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

    Returns

} on success {:error, info} on failure