# `LatticeStripe.Price.Tier`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.2.2/lib/lattice_stripe/price.ex#L382)

Typed representation of a single tier in a tiered Price.

The final tier's `up_to` is the literal string `"inf"` in Stripe's API;
this module converts it to the atom `:inf` for ergonomic pattern-matching.

# `t`

```elixir
@type t() :: %LatticeStripe.Price.Tier{
  extra: map(),
  flat_amount: integer() | nil,
  flat_amount_decimal: String.t() | nil,
  unit_amount: integer() | nil,
  unit_amount_decimal: String.t() | nil,
  up_to: integer() | :inf | nil
}
```

# `from_map`

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

Converts a decoded Stripe tier map to a `%Price.Tier{}` struct.

Coerces `up_to: "inf"` to `:inf` for ergonomic pattern-matching on the final tier.

---

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