View Source Stripe.UsageRecordSummary (stripity_stripe v3.2.0)
Summary
Functions
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
Types
@type t() :: %Stripe.UsageRecordSummary{ id: binary(), invoice: binary() | nil, livemode: boolean(), object: binary(), period: term(), subscription_item: binary(), total_usage: integer() }
The usage_record_summary
type.
id
Unique identifier for the object.invoice
The invoice in which this usage period has been billed for.livemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.object
String representing the object's type. Objects of the same type share the same value.period
subscription_item
The ID of the subscription item this summary is describing.total_usage
The total usage within this usage period.
Functions
@spec list( subscription_item :: binary(), params :: %{ optional(:ending_before) => binary(), optional(:expand) => [binary()], optional(:limit) => integer(), optional(:starting_after) => binary() }, opts :: Keyword.t() ) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
Details
- Method:
get
- Path:
/v1/subscription_items/{subscription_item}/usage_record_summaries