Validated configuration for the GoCardlessClient SDK.
Set globally in config.exs or override per-call:
config :gocardless_client,
access_token: System.get_env("GOCARDLESS_ACCESS_TOKEN"),
environment: :live
client = GoCardlessClient.Client.new!(access_token: "token")
Summary
Functions
Returns the base API URL for the given environment.
Builds and validates a config map, merging app config with overrides.
Like new/1 but raises ArgumentError on invalid config.
Returns the NimbleOptions validation schema.
Types
@type t() :: %{ access_token: String.t(), environment: :sandbox | :live, api_version: String.t(), timeout: pos_integer(), max_retries: non_neg_integer(), base_backoff_ms: pos_integer(), max_backoff_ms: pos_integer(), pool_size: pos_integer(), telemetry_prefix: [atom()], finch_name: atom() }
Functions
Returns the base API URL for the given environment.
@spec new(keyword()) :: {:ok, t()} | {:error, NimbleOptions.ValidationError.t()}
Builds and validates a config map, merging app config with overrides.
Like new/1 but raises ArgumentError on invalid config.
@spec schema() :: NimbleOptions.t()
Returns the NimbleOptions validation schema.