Class SubscriptionItemUsageRecordService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(String subscriptionItem, SubscriptionItemUsageRecordCreateParams params) Creates a usage record for a specified subscription item and date, and fills it with a quantity.create
(String subscriptionItem, SubscriptionItemUsageRecordCreateParams params, RequestOptions options) Creates a usage record for a specified subscription item and date, and fills it with a quantity.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
SubscriptionItemUsageRecordService
-
-
Method Details
-
create
public UsageRecord create(String subscriptionItem, SubscriptionItemUsageRecordCreateParams params) throws StripeException Creates a usage record for a specified subscription item and date, and fills it with a quantity.Usage records provide
quantity
information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.The default calculation for usage is to add up all the
quantity
values of the usage records within a billing period. You can change this default behavior with the billing plan’saggregate_usage
parameter. When there is more than one usage record with the same timestamp, Stripe adds thequantity
values together. In most cases, this is the desired resolution, however, you can change this behavior with theaction
parameter.The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.
- Throws:
StripeException
-
create
public UsageRecord create(String subscriptionItem, SubscriptionItemUsageRecordCreateParams params, RequestOptions options) throws StripeException Creates a usage record for a specified subscription item and date, and fills it with a quantity.Usage records provide
quantity
information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.The default calculation for usage is to add up all the
quantity
values of the usage records within a billing period. You can change this default behavior with the billing plan’saggregate_usage
parameter. When there is more than one usage record with the same timestamp, Stripe adds thequantity
values together. In most cases, this is the desired resolution, however, you can change this behavior with theaction
parameter.The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.
- Throws:
StripeException
-