# `PaperTiger.DataSource`
[🔗](https://github.com/EnaiaInc/paper_tiger/blob/v1.2.2/lib/paper_tiger/data_source.ex#L1)

Behaviour for an external data source that can preload PaperTiger stores.

Implementations should return lists of maps with atom keys matching Stripe
resource shapes (e.g. `%{id: "price_123", unit_amount: 500, ...}`).

This behaviour is intentionally minimal and supports only loading the
resources PaperTiger needs at bootstrap but can be extended.

# `load_customers`

```elixir
@callback load_customers() :: [map()]
```

Return a list of Customer-like maps with atom keys.

# `load_payment_methods`

```elixir
@callback load_payment_methods() :: [map()]
```

Return a list of PaymentMethod-like maps with atom keys.

# `load_plans`

```elixir
@callback load_plans() :: [map()]
```

Return a list of Plan-like maps with atom keys.

# `load_prices`

```elixir
@callback load_prices() :: [map()]
```

Return a list of Price-like maps with atom keys.

# `load_products`

```elixir
@callback load_products() :: [map()]
```

Return a list of Product-like maps with atom keys.

# `load_subscription_items`

```elixir
@callback load_subscription_items() :: [map()]
```

Return a list of SubscriptionItem-like maps with atom keys.

# `load_subscriptions`

```elixir
@callback load_subscriptions() :: [map()]
```

Return a list of Subscription-like maps with atom keys.

---

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