Represents automatic tax calculation settings on a Stripe Invoice.
Returned as a nested field on LatticeStripe.Invoice and
LatticeStripe.Subscription structs (both Stripe resources carry an
automatic_tax sub-object with the same shape).
Fields
enabled- Whether automatic tax is enabled for this invoicestatus- Calculation status:nil,"requires_location_inputs","complete", or"failed"liability- Tax liability object (raw map); present when Stripe Tax is active. Kept as a raw map per SDK convention — no sub-struct needed.extra- Unknown fields from Stripe not yet in this struct. Future Stripe API additions toautomatic_taxare preserved here rather than silently dropped.
Stripe API Reference
See the Stripe Invoice object for field definitions.
Summary
Functions
Converts a decoded Stripe API map to a %AutomaticTax{} struct.
Types
Functions
Converts a decoded Stripe API map to a %AutomaticTax{} struct.
Maps all known automatic_tax fields. Any unrecognized fields are collected
into the extra map so forward-compatible additions from Stripe are not
silently lost.
Returns nil when given nil (invoice has no automatic_tax field).
Example
iex> LatticeStripe.Invoice.AutomaticTax.from_map(%{
...> "enabled" => true,
...> "status" => "complete",
...> "liability" => %{"type" => "self"}
...> })
%LatticeStripe.Invoice.AutomaticTax{
enabled: true,
status: "complete",
liability: %{"type" => "self"},
extra: %{}
}