# `LatticeStripe.Tax.ShippingCost`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.2.2/lib/lattice_stripe/tax/shipping_cost.ex#L1)

The `shipping_cost` object embedded in a Stripe Tax calculation or transaction.

Reachable from `t:LatticeStripe.Tax.Calculation.t/0` and
`t:LatticeStripe.Tax.Transaction.t/0`. Carries the shipping amount alongside its own
`tax_breakdown`, because shipping is taxed separately from line items in most
jurisdictions.

Embedded value struct: fields are additive. Keys Stripe adds later appear under
`:extra` rather than being dropped, so a new field never breaks decoding.

# `t`

```elixir
@type t() :: %LatticeStripe.Tax.ShippingCost{
  amount: integer() | nil,
  amount_tax: integer() | nil,
  extra: map(),
  shipping_rate: String.t() | nil,
  tax_behavior: atom() | String.t() | nil,
  tax_breakdown: list() | nil,
  tax_code: String.t() | nil
}
```

# `from_map`

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

---

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