LatticeStripe.Testing.Fixtures.MeterEventSummary (LatticeStripe v2.0.0)

Copy Markdown View Source

Canonical raw fixtures for Stripe billing meter event summary objects.

Summary

Functions

Basic MeterEventSummary fixture matching Stripe's wire format.

Stripe list response wrapping one or more MeterEventSummary fixtures.

Functions

meter_event_summary_json(overrides \\ %{})

@spec meter_event_summary_json(map()) :: map()

Basic MeterEventSummary fixture matching Stripe's wire format.

Carries exactly the seven fields Stripe's spec marks required — and no customer. You filter by customer, but the returned object never says which customer it belongs to (F-02), so a fixture that invented one would teach the wrong shape.

aggregated_value is a float on the read path (F-05). Writes take a decimal string; reads return a JSON number. The fixture carries 42.5 rather than a whole number so a test can prove the value is never rounded or coerced to an integer.

meter_event_summary_list_json(items \\ [meter_event_summary_json()])

@spec meter_event_summary_list_json(list()) :: map()

Stripe list response wrapping one or more MeterEventSummary fixtures.

Defaults to a single meter_event_summary_json/1 item. Pass a custom list to override.