MailSlurpAPI.Api.GroupController (mailslurp v15.17.22)

API calls for all endpoints tagged GroupController.

Summary

Functions

Link to this function

add_contacts_to_group(connection, group_id, update_group_contacts, opts \\ [])

Add contacts to a group

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

create_group(connection, create_group_options, opts \\ [])

Create a group

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

delete_group(connection, group_id, opts \\ [])

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

Delete group

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_all_groups(connection, opts \\ [])

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

Get all Contact Groups 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_group(connection, group_id, opts \\ [])

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

Get group

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_group_with_contacts(connection, group_id, opts \\ [])

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

Get group and contacts belonging to it

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_group_with_contacts_paginated(connection, group_id, opts \\ [])

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

Get group and paginated contacts belonging to it

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • group_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index in group contact pagination
    • :size (integer()): Optional page size in group contact 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_groups(connection, opts \\ [])

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

Get all groups

Parameters

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

Returns

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

Link to this function

remove_contacts_from_group(connection, group_id, update_group_contacts, opts \\ [])

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

Remove contacts from a group

Parameters

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

Returns

} on success {:error, info} on failure