# `LatticeStripe.SubscriptionSchedule.PhaseItem`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.2.2/lib/lattice_stripe/subscription_schedule/phase_item.ex#L1)

A single item inside a SubscriptionSchedule phase.

A phase item is a **template** that Stripe materializes into a real
`%LatticeStripe.SubscriptionItem{}` when the phase activates. Its shape
differs from a live SubscriptionItem:

- NO `id`, `object`, `subscription`, `created`, `current_period_start`,
  `current_period_end` — a template has no identity yet.
- HAS `price_data` (inline price creation) and `trial_data` (phase-scoped
  trial settings) — a live item would use the parent subscription's trial
  settings instead.

See also: `LatticeStripe.SubscriptionItem` for live items on an active
subscription.

## Fields

- `billing_thresholds` - Per-item billing threshold map
- `discounts` - List of discount IDs or objects
- `metadata` - Set of key-value pairs
- `plan` - Plan object (legacy)
- `price` - Price ID for an existing Price
- `price_data` - Inline price data for ad-hoc pricing
- `quantity` - Quantity for this item
- `tax_rates` - List of tax rate objects
- `trial_data` - Phase-scoped trial configuration map
- `extra` - Unknown fields from Stripe not yet in this struct

# `t`

```elixir
@type t() :: %LatticeStripe.SubscriptionSchedule.PhaseItem{
  billing_thresholds: map() | nil,
  discounts: list() | nil,
  extra: map(),
  metadata: map() | nil,
  plan: map() | nil,
  price: String.t() | map() | nil,
  price_data: map() | nil,
  quantity: integer() | nil,
  tax_rates: list() | nil,
  trial_data: map() | nil
}
```

A phase-item template on a Stripe Subscription Schedule phase.

# `from_map`

```elixir
@spec from_map(map() | nil) :: t() | nil
```

Converts a decoded Stripe API map to a `%PhaseItem{}` struct.

Returns `nil` when given `nil`.

---

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