# `LatticeStripe.Config`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v0.2.0/lib/lattice_stripe/config.ex#L1)

Client configuration schema and validation.

Uses NimbleOptions to validate all client options at creation time,
providing clear error messages for invalid configuration.

## Required Options

- `:api_key` - Your Stripe API key (`sk_test_...` or `sk_live_...`)
- `:finch` - Name of the Finch pool started in your supervision tree

## Optional Options

See `schema/0` for full option documentation with defaults.

## Example

    # In your application supervisor:
    children = [
      {Finch, name: MyApp.Finch}
    ]

    # Create a validated config:
    {:ok, config} = LatticeStripe.Config.validate(
      api_key: "sk_test_...",
      finch: MyApp.Finch
    )

# `schema`

Returns the NimbleOptions schema used for validation.

# `validate`

Validates the given options against the config schema.

Returns `{:ok, validated_opts}` on success or `{:error, %NimbleOptions.ValidationError{}}`
on failure.

# `validate!`

Validates the given options against the config schema, raising on failure.

Returns the validated keyword list on success, or raises
`NimbleOptions.ValidationError` with a descriptive message on failure.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
