Column.Config (Column v1.0.0)

Copy Markdown View Source

Runtime configuration for the Column API client.

Configuration can be set globally via config/config.exs:

config :column,
  api_key: System.get_env("COLUMN_API_KEY"),
  base_url: "https://api.column.com",
  timeout: 30_000,
  recv_timeout: 60_000,
  max_retries: 3,
  retry_delay: 500

Or supplied per-request by passing a Column.Config struct in options:

Column.BankAccounts.list(config: %Column.Config{api_key: "live_..."})

Summary

Functions

Returns the effective config, merging application env with defaults.

Validates that the config has the minimum required fields.

Types

t()

@type t() :: %Column.Config{
  api_key: String.t() | nil,
  base_url: String.t(),
  max_retries: non_neg_integer(),
  recv_timeout: pos_integer(),
  retry_delay: pos_integer(),
  timeout: pos_integer()
}

Functions

new(overrides \\ [])

@spec new(keyword()) :: t()

Returns the effective config, merging application env with defaults.

validate!(config)

@spec validate!(t()) :: t() | no_return()

Validates that the config has the minimum required fields.