Current section
Files
Jump to
Current section
Files
lib/open_xchange_client/api/jump.ex
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule OpenXchangeClient.Api.Jump do
@moduledoc """
API calls for all endpoints tagged `Jump`.
"""
alias OpenXchangeClient.Connection
import OpenXchangeClient.RequestBuilder
@doc """
Acquires an identity token.
## Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- opts (KeywordList): [optional] Optional parameters
- :system (String.t): The identifier for the external service/system, like \"com.openexchange.jump.endpoint.mysystem\".
## Returns
{:ok, OpenXchangeClient.Model.JumpResponse.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec acquire_identity_token(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, OpenXchangeClient.Model.JumpResponse.t()} | {:error, Tesla.Env.t()}
def acquire_identity_token(connection, session, opts \\ []) do
optional_params = %{
:system => :query
}
%{}
|> method(:get)
|> url("/jump?action=identityToken")
|> add_param(:query, :session, session)
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{200, %OpenXchangeClient.Model.JumpResponse{}}
])
end
end