MailSlurpAPI.Api.GroupController (mailslurp v15.17.22)
API calls for all endpoints tagged GroupController
.
Summary
Functions
Add contacts to a group
Create a group
Delete group
Get all Contact Groups in paginated format
Get group and contacts belonging to it
Get group and paginated contacts belonging to it
Get all groups
Remove contacts from a group
Functions
add_contacts_to_group(connection, group_id, update_group_contacts, opts \\ [])
@spec add_contacts_to_group( Tesla.Env.client(), String.t(), MailSlurpAPI.Model.UpdateGroupContacts.t(), keyword() ) :: {:ok, MailSlurpAPI.Model.GroupContactsDto.t()} | {:error, Tesla.Env.t()}
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
create_group(connection, create_group_options, opts \\ [])
@spec create_group( Tesla.Env.client(), MailSlurpAPI.Model.CreateGroupOptions.t(), keyword() ) :: {:ok, MailSlurpAPI.Model.GroupDto.t()} | {:error, Tesla.Env.t()}
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
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
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
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
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
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
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
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