MailSlurpAPI.Api.ContactController (mailslurp v15.17.22)

API calls for all endpoints tagged ContactController.

Summary

Functions

Link to this function

create_contact(connection, create_contact_options, opts \\ [])

Create a contact

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

delete_contact(connection, contact_id, opts \\ [])

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

Delete contact

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_all_contacts(connection, opts \\ [])

@spec get_all_contacts(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageContactProjection.t()} | {:error, Tesla.Env.t()}

Get all contacts

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_contact(connection, contact_id, opts \\ [])

@spec get_contact(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.ContactDto.t()} | {:error, Tesla.Env.t()}

Get contact

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_contact_v_card(connection, contact_id, opts \\ [])

@spec get_contact_v_card(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [String.t()]} | {:error, Tesla.Env.t()}

Get contact vCard vcf file

Parameters

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

Returns

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

Link to this function

get_contacts(connection, opts \\ [])

@spec get_contacts(Tesla.Env.client(), keyword()) ::
  {:ok, [MailSlurpAPI.Model.ContactProjection.t()]} | {:error, Tesla.Env.t()}

Get all contacts

Parameters

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

Returns

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