Short-lived session struct returned by MeterEventStream.create_session/2.
A %MeterEventStream.Session{} carries a session-scoped authentication_token
that grants access to the high-volume v2 event stream endpoint. Sessions are
valid for 15 minutes from creation time (expires_at).
Typical usage
Callers hold this struct and pass it to MeterEventStream.send_events/4:
{:ok, session} = MeterEventStream.create_session(client)
{:ok, _result} = MeterEventStream.send_events(client, session, events)Security note — the :authentication_token field
authentication_token is a bearer credential for the v2 meter event stream
endpoint. LatticeStripe masks it in default Inspect output to prevent
accidental leaks via Logger, APM agents, crash dumps, or telemetry handlers.
Access the field directly when you need it:
session.authentication_tokenTo inspect all fields including the token during debugging:
IO.inspect(session, structs: false)
Summary
Functions
Decode a Stripe-shaped string-keyed map into a %Session{}.