View Source ExOAPI.Stripe.Schemas.UsageRecord (exoapi_stripe v0.1.4)

description: Usage records allow you to report customer usage and metrics to Stripe for metered billing of subscription prices.

Related guide: Metered Billing.

:id :: :string

Unique identifier for the object.

:livemode :: :boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

:object :: :string

String representing the object's type. Objects of the same type share the same value.

:quantity :: :integer

The usage quantity for the specified date.

:subscription_item :: ExOAPI.Stripe.Schemas.SubscriptionItem

The ID of the subscription item this usage record contains data for.

:timestamp :: :integer

The timestamp when this usage occurred.

Link to this section Summary

Link to this section Types

@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.UsageRecord{
  id: String.t() | nil,
  livemode: boolean() | nil,
  object: :usage_record | nil,
  quantity: integer() | nil,
  subscription_item: String.t() | nil,
  timestamp: integer() | nil
}

Link to this section Functions

Link to this function

changeset(struct \\ %__MODULE__{}, params)

View Source
@spec changeset(t(), params()) :: Ecto.Changeset.t()