UsageRecord
class UsageRecord extends Resource implements UsageRecordInterface
Usage records allow you to report customer usage and metrics to Stripe for metered billing of subscription plans.
Properties
string | $id | A unique identifier for the resource. | from Resource |
protected mixed | $response | A response from Stripe. | from Resource |
Methods
Creates a usage record for a specified subscription item and date, and fills it with a quantity.
For the specified subscription item, returns a list of summary objects.
No description
Details
in Resource at line 29
string
getId()
Returns the unique identifier for this resource.
in Resource at line 39
mixed
getResponse()
Returns the raw Stripe response.
in Resource at line 47
protected void
setProperties()
Set the response data as properties on the class.
at line 31
UsageRecordInterface
create(int $quantity, SubscriptionItemInterface $subscriptionItem, int $timestamp, array $arguments = [], string $key = null)
Creates a usage record for a specified subscription item and date, and fills it with a quantity.
at line 54
UsageRecordInterface
usageRecordSummaries(SubscriptionItemInterface $subscriptionItem, array $arguments = [])
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 billing plan’s month of September).