# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). # https://openapi-generator.tech # Do not edit the class manually. defmodule Ory.Api.Admin do @moduledoc """ API calls for all endpoints tagged `Admin`. """ alias Ory.Connection import Ory.RequestBuilder @doc """ UpdateLifespans an existing OAuth 2.0 client's token lifespan configuration. This client configuration takes precedence over the instance-wide token lifespan configuration. ## Parameters - connection (Ory.Connection): Connection to server - id (String.t): The id of the OAuth 2.0 Client. - opts (KeywordList): [optional] Optional parameters - :body (UpdateOAuth2ClientLifespans): ## Returns {:ok, Ory.Model.OAuth2Client.t} on success {:error, Tesla.Env.t} on failure """ @spec update_o_auth2_client_lifespans(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} def update_o_auth2_client_lifespans(connection, id, opts \\ []) do optional_params = %{ :body => :body } %{} |> method(:put) |> url("/admin/clients/#{id}/lifespans") |> add_optional_params(optional_params, opts) |> ensure_body() |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> evaluate_response([ { 200, %Ory.Model.OAuth2Client{}}, { :default, %Ory.Model.GenericError{}} ]) end end