Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ProgressiveBilling) - Add LifetimeUsages::UsageThresholdsCompletionService #2531

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

nudded
Copy link
Contributor

@nudded nudded commented Sep 3, 2024

Context

AI companies want their users to pay before the end of a period if usage skyrockets. The problem being that self-serve companies can overuse their API without paying, triggering lots of costs on their side.

Description

This PR introduces a new LifetimeUsages::UsageThresholdsCompletionService which calculates the completion ratios of thresholds.

Also we add a LifetimeUsagesController combined with new serializer to facilitate fetching and updating lifetime usages through the api.

@nudded nudded changed the title Add LifetimeUsages::UsageThresholdsCompletionService feat(ProgressiveBilling) - Add LifetimeUsages::UsageThresholdsCompletionService Sep 4, 2024
@nudded nudded force-pushed the feat-prog-billing-expose-lifetime-uage-rest branch from 729302f to 16262e4 Compare September 4, 2024 10:55
@nudded nudded marked this pull request as ready for review September 4, 2024 10:55
@nudded nudded force-pushed the feat-prog-billing-expose-lifetime-uage-rest branch from 16262e4 to 535dd2a Compare September 4, 2024 11:09
add LifetimeUsageSerializer
Add LifetimeUsagesController
@nudded nudded force-pushed the feat-prog-billing-expose-lifetime-uage-rest branch from 535dd2a to 0af4885 Compare September 5, 2024 07:12
@nudded nudded merged commit 5daab1c into main Sep 5, 2024
6 checks passed
@nudded nudded deleted the feat-prog-billing-expose-lifetime-uage-rest branch September 5, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants