OpenXchangeClient.Api.Mailaccount (open_xchange_client v0.10.1)

API calls for all endpoints tagged Mailaccount.

Link to this section Summary

Link to this section Functions

Link to this function

create_account(connection, session, body, opts \\ [])

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

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

Link to this function

update_account(connection, session, body, opts \\ [])

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

Link to this function

validate_account(connection, session, body, opts \\ [])

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 nullon failure) or if set to false or missing only a boolean is returned which indicates validation result.

returns

Returns

on success {:error, Tesla.Env.t} on failure