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

A one-off invoice item to add at the start of a SubscriptionSchedule phase.

Used to bill setup fees, credits, or other non-recurring amounts at phase
boundaries. Smaller than `LatticeStripe.SubscriptionSchedule.PhaseItem` —
no `billing_thresholds`, `plan`, or `trial_data`.

## Fields

- `discounts` - List of discount IDs or objects
- `metadata` - Set of key-value pairs
- `period` - Billing period map (`%{"start" => ..., "end" => ...}`)
- `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
- `extra` - Unknown fields from Stripe not yet in this struct

# `t`

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

A one-off add-invoice-item attached to a SubscriptionSchedule phase.

# `from_map`

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

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

Returns `nil` when given `nil`.

---

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