View Source Stripe.Billing.MeterEventSummary (stripity_stripe v3.3.1)

A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much usage was accrued by a customer for that period.

Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.

Summary

Types

t()

The billing.meter_event_summary type.

Functions

Retrieve a list of billing meter event summaries.

Types

@type t() :: %Stripe.Billing.MeterEventSummary{
  aggregated_value: term(),
  end_time: integer(),
  id: binary(),
  livemode: boolean(),
  meter: binary(),
  object: binary(),
  start_time: integer()
}

The billing.meter_event_summary type.

  • aggregated_value Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via default_aggregation.
  • end_time End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • meter The meter associated with this event summary.
  • object String representing the object's type. Objects of the same type share the same value.
  • start_time Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.

Functions

Link to this function

list(id, params \\ %{}, opts \\ [])

View Source
@spec list(
  id :: binary(),
  params :: %{
    optional(:customer) => binary(),
    optional(:end_time) => integer(),
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:start_time) => integer(),
    optional(:starting_after) => binary(),
    optional(:value_grouping_window) => :day | :hour
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieve a list of billing meter event summaries.

Details

  • Method: get
  • Path: /v1/billing/meters/{id}/event_summaries