Central configuration struct for the Setu SDK.
Application config
config :setu,
client_id: System.get_env("SETU_CLIENT_ID"),
client_secret: System.get_env("SETU_CLIENT_SECRET"),
product_instance_id: System.get_env("SETU_PRODUCT_INSTANCE_ID"),
environment: :sandbox,
timeout: 30_000,
max_retries: 3,
retry_base_delay: 500,
retry_max_delay: 10_000,
rate_limit_rps: 100,
rate_limit_burst: 20Per-request override
cfg = SetuClient.Config.new(environment: :production, timeout: 60_000)
Summary
Functions
Returns the KYC / AA credential headers derived from the config.
Builds a SetuClient.Config from application config merged with keyword overrides.
Returns the resolved base URLs for the config's environment.
Raises ArgumentError if required fields are missing or invalid.
Types
@type environment() :: :sandbox | :production
@type t() :: %SetuClient.Config{ client_id: String.t() | nil, client_secret: String.t() | nil, environment: environment(), max_retries: non_neg_integer(), product_instance_id: String.t() | nil, rate_limit_burst: pos_integer(), rate_limit_rps: pos_integer(), retry_base_delay: pos_integer(), retry_max_delay: pos_integer(), telemetry_prefix: [atom()], timeout: pos_integer() }
Functions
Returns the KYC / AA credential headers derived from the config.
Builds a SetuClient.Config from application config merged with keyword overrides.
Returns the resolved base URLs for the config's environment.
Raises ArgumentError if required fields are missing or invalid.