ConsumptionUsage
ConsumptionUsage captures the unit rate and current consumption for a consumption-based product.
Properties
totalConsumedinteger requiredThe total consumedconsumedmap[string]integer requiredThe consumed amountunitRateSchemaenum requiredUnitRateSchema captures which pricing plan is associated with the product subscription, and further indicates which pricing rate structure should be read.Values:graduated-v0— GraduatedV0- UnitRateSchemaGraduatedV0 is the initial pricing schema that we launched with the advent of our
Growth plans. Pricing plan rates are pasred into
UnitRateGraduatedV0. graduated-v1— GraduatedV1- UnitRateSchemaGraduated plans used graduated pricing plans, with plans parsed into
UnitRateGraduatedV1. These plans are introduced starting 2025. graduated-v2— GraduatedV2- UnitRateSchemaGraduatedV2 is used for pricing plans where the free tier is handled
via credit grants (dollar credits) rather than being baked into the pricing tiers. Rates are parsed into
UnitRateGraduatedV2and contain only paid (on-demand) tiers. The tiers field usesUnitRateGraduatedTierfor graduated prices with multiple tiers, and a single-element tiers array for per-unit prices with only one rate tier.
- UnitRateGraduatedV0 will be populated for
UnitRateSchemaGraduatedV0plans. - ↳
upfrontCostinteger requiredUpfrontCost is the up-front charge the customer will have paid to have an active subscription. For Team Growth this is $0, since there is no credit pre-payment and has free-tier. But for Enterprise Growth, it is usually (Rate * CreditsIncluded).
Value is in USD cents.
- ↳
creditsIncludedinteger requiredIncludedCredits is the number of resource-hours included in the subscription, e.g. the pre-paid credits or those in the “free tier”. Keep the JSON tag as “creditsIncluded” to maintain compatibility with the frontend until we consolidate product.UnitRateGraduatedV0 and apitype.UnitRateGraduatedV1. - ↳
costPerResourcestring requiredPerUnitCost is a user-facing string describing the cost-per unit with the currency symbol. e.g. “$0.0005”. Keep the JSON tag as “costPerResource” to maintain compatibility with the frontend until we consolidate product.UnitRateGraduatedV0 and apitype.UnitRateGraduatedV1. - UnitRateGraduatedV1 will be populated for
UnitRateSchemaGraduatedV1plans. - The list of graduated pricing tiers.
- UnitRateGraduatedV2 will be populated for
UnitRateSchemaGraduatedV2plans. - The list of on-demand pricing tiers. For graduated prices, contains multiple tiers. For per-unit prices, contains a single tier.
- StatsV0 are the usage statistics, and will be populated for graduated-v0 plans.
- ↳
includedUnitsinteger requiredIncludedUnits is the number of units included in the subscription. - ↳
isIncludedUnitsFreeboolean requiredIsIncludedUnitsFree indicates whether the included units are free of charge. - ↳
onDemandRatenumber requiredOnDemandRate is the on-demand rate for the billing family’s total usage, in USD cents per unit. - ↳
estimatedOnDemandCostnumber requiredEstimatedOnDemandCost is the estimated cost of the on-demand usage (beyond the free units), in USD cents. - ↳
estimatedTotalCostnumber requiredEstimatedTotalCost is the estimated total cost of billing family’s usage for the current billing cycle, in USD cents. - StatsV1 are the usage statistics, and will be populated for graduated-v1 plans.
- ↳
effectiveRatenumber requiredEffectiveRate is the effective rate for the billing family’s total usage, in USD dollar per unit. - ↳
includedUnitsinteger requiredIncludedUnits is the number of units included in the subscription. - ↳
isIncludedUnitsFreeboolean requiredIsIncludedUnitsFree indicates whether the included units are free of charge. - ↳
volumeSavingsPercentagenumber requiredVolumeSavingsAmount is the amount of volume savings for the billing family’s total usage, in USD dollar. - ↳
onDemandRatenumber requiredOnDemandRate is the on-demand rate for the billing family’s total usage, in USD cents per unit. - ↳
estimatedOnDemandCostnumber requiredEstimatedOnDemandCost is the estimated cost of the on-demand usage (beyond the free units), in USD cents. - ↳
estimatedTotalCostnumber requiredEstimatedTotalCost is the estimated total cost of billing family’s usage for the current billing cycle, in USD cents.