DocuSign.SDKVersion (DocuSign v3.1.1)
View SourceSDK version information and User-Agent header management.
This module provides version information about the DocuSign Elixir SDK and formats the User-Agent header for API requests.
Summary
Functions
Returns the API version this SDK targets.
Returns a map of SDK metadata for telemetry and logging.
Generates the User-Agent string for HTTP requests.
Returns the SDK version.
Functions
@spec api_version() :: String.t()
Returns the API version this SDK targets.
Examples
iex> DocuSign.SDKVersion.api_version()
"v2.1"
@spec metadata() :: map()
Returns a map of SDK metadata for telemetry and logging.
Examples
iex> DocuSign.SDKVersion.metadata()
%{
sdk_name: "docusign-elixir",
sdk_version: "3.0.0",
api_version: "v2.1",
elixir_version: "1.16.0",
otp_version: "26"
}
Generates the User-Agent string for HTTP requests.
Includes SDK version, API version, and runtime information (Elixir and OTP versions).
Options
:custom_suffix- Optional custom string to append to the User-Agent
Examples
iex> DocuSign.SDKVersion.user_agent()
"docusign-elixir/3.0.0 (Elixir/1.16.0; OTP/26.0; API/v2.1)"
iex> DocuSign.SDKVersion.user_agent(custom_suffix: "MyApp/1.0")
"docusign-elixir/3.0.0 (Elixir/1.16.0; OTP/26.0; API/v2.1) MyApp/1.0"
@spec version() :: String.t()
Returns the SDK version.
Examples
iex> DocuSign.SDKVersion.version()
"3.1.1"