Configures transport, authentication, telemetry, and error reporting for Inttegro operations.
The client is a plain immutable struct, not a process. Create it once in your application
supervision tree or runtime configuration and safely share it between callers. Resource modules
such as Inttegro.Orders receive the client as their first argument.
Creating a client
client = Inttegro.Client.new!(System.fetch_env!("INTTEGRO_API_KEY"))new!/2 accepts:
:base_url— alternate API origin, primarily for tests. Defaults tohttps://api.inttegro.com.:http— a configuredReq.Requestused as the transport.:telemetry— a one-argument callback receiving privacy-safe lifecycle event maps.:error_reporter— a one-argument callback receivingInttegro.Telemetry.ErrorReport.t()values.:error_reporting_policy—:unexpected(the default) or:all.
The SDK does not configure an exporter or send reports to Inttegro on its own. See the Observability guide for the event contract and privacy guarantees.
Summary
Functions
Creates a client from a server-side secret key.
Types
@type t() :: %Inttegro.Client{ api_key: String.t(), base_url: String.t(), error_reporter: (Inttegro.Telemetry.ErrorReport.t() -> term()) | nil, error_reporting_policy: :unexpected | :all, http: Req.Request.t(), telemetry: (map() -> term()) | nil }
A configured Inttegro API client.
Functions
Creates a client from a server-side secret key.
Raises ArgumentError when api_key is empty. Keep the key in environment-backed secret
configuration; never embed it in browser JavaScript or a mobile application.