LatticeStripe.Tax.TaxBreakdown (LatticeStripe v2.0.0)

Copy Markdown View Source

One entry in the tax_breakdown list on a Stripe Tax calculation.

Reachable from LatticeStripe.Tax.Calculation.t/0 as list(t()). Each entry is one jurisdiction's share of the total, so this is what you sum or display when itemising tax on an invoice.

:inclusive distinguishes tax added on top of the amount from tax already contained within it — reading the total without checking it double-counts inclusive tax.

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

Summary

Types

t()

@type t() :: %LatticeStripe.Tax.TaxBreakdown{
  amount: integer() | nil,
  extra: map(),
  inclusive: boolean() | nil,
  tax_rate_details: map() | nil,
  taxability_reason: String.t() | nil,
  taxable_amount: integer() | nil
}

Functions

from_map(map)

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