Current section

Files

Jump to
mollie_api lib mollie_api api capabilities_api.ex
Raw

lib/mollie_api/api/capabilities_api.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.17.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule MollieAPI.Api.CapabilitiesAPI do
@moduledoc """
API calls for all endpoints tagged `CapabilitiesAPI`.
"""
alias MollieAPI.Connection
import MollieAPI.RequestBuilder
@doc """
List capabilities
> 🚧 Beta feature > > This feature is currently in beta testing, and the final specification may still change. Retrieve a list of capabilities for an organization. This API provides detailed insights into the specific requirements and status of each client's onboarding journey. Capabilities are at the organization level, indicating if the organization can perform a given capability. For payments, regardless them being at the profile level, the capability is listed at the organization level. This means that if at least one of the clients's profiles can receive payments, the payments capability is enabled, communicating that the organization can indeed receive payments.
### Parameters
- `connection` (MollieAPI.Connection): Connection to server
- `opts` (keyword): Optional parameters
- `:"idempotency-key"` (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
### Returns
- `{:ok, MollieAPI.Model.ListCapabilities200Response.t}` on success
- `{:error, Tesla.Env.t}` on failure
"""
@spec list_capabilities(Tesla.Env.client, keyword()) :: {:ok, MollieAPI.Model.ListCapabilities200Response.t} | {:error, Tesla.Env.t}
def list_capabilities(connection, opts \\ []) do
optional_params = %{
:"idempotency-key" => :headers
}
request =
%{}
|> method(:get)
|> url("/capabilities")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
connection
|> Connection.request(request)
|> evaluate_response([
{200, MollieAPI.Model.ListCapabilities200Response}
])
end
end