OpenXchangeClient.Api.Mailaccount (open_xchange_client v0.10.1)
API calls for all endpoints tagged Mailaccount
.
Link to this section Summary
Functions
Creates a new mail account.
Deletes a mail account.
Gets a mail account.
Gets all mail accounts.
Gets the status for a mail account.
Updates a mail account.
Validates a mail account which shall be created.
Link to this section Functions
create_account(connection, session, body, opts \\ [])
@spec create_account( Tesla.Env.client(), String.t(), OpenXchangeClient.Model.MailAccountData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.MailAccountUpdateResponse.t()} | {:error, Tesla.Env.t()}
Creates a new mail account.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body (MailAccountData): A JSON object describing the new account to create.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_account(connection, session, body, opts \\ [])
@spec delete_account(Tesla.Env.client(), String.t(), [Integer.t()], keyword()) :: {:ok, OpenXchangeClient.Model.MailAccountDeletionResponse.t()} | {:error, Tesla.Env.t()}
Deletes a mail account.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([integer()]): A JSON array with the ID of the mail account that shall be deleted.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_account(connection, session, id, opts \\ [])
@spec get_account(Tesla.Env.client(), String.t(), integer(), keyword()) :: {:ok, OpenXchangeClient.Model.MailAccountResponse.t()} | {:error, Tesla.Env.t()}
Gets a mail account.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (integer()): Account ID of the requested account.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_all_accounts(connection, session, columns, opts \\ [])
@spec get_all_accounts(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.MailAccountsResponse.t()} | {:error, Tesla.Env.t()}
Gets all mail accounts.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- columns (String.t): A comma-separated list of columns to return, like "1,800". Each column is specified by a numeric column identifier, see Mail account data.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
status_account(connection, session, opts \\ [])
@spec status_account(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.MailAccountStatusResponse.t()} | {:error, Tesla.Env.t()}
Gets the status for a mail account.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- opts (KeywordList): [optional] Optional parameters
- :id (integer()): The optional account identifier to query the status for a single mail account. If not set the status for all accounts are returned
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_account(connection, session, body, opts \\ [])
@spec update_account( Tesla.Env.client(), String.t(), OpenXchangeClient.Model.MailAccountData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.MailAccountUpdateResponse.t()} | {:error, Tesla.Env.t()}
Updates a mail account.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body (MailAccountData): A JSON object identifying (by field
id
) and describing the account to update. Only modified fields are present. - opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
validate_account(connection, session, body, opts \\ [])
@spec validate_account( Tesla.Env.client(), String.t(), OpenXchangeClient.Model.MailAccountData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.MailAccountValidationResponse.t()} | {:error, Tesla.Env.t()}
Validates a mail account which shall be created.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body (MailAccountData): A JSON object describing the account to validate.
- opts (KeywordList): [optional] Optional parameters
- :tree (boolean()): Indicates whether on successful validation the folder tree shall be returned (or
null
on failure) or if set tofalse
or missing only a boolean is returned which indicates validation result.
- :tree (boolean()): Indicates whether on successful validation the folder tree shall be returned (or
returns
Returns
on success {:error, Tesla.Env.t} on failure