add credit_reset_at and credit_used_by_this_feature to FeatureEntitlement - #33
Draft
ryanechternacht wants to merge 2 commits into
Draft
add credit_reset_at and credit_used_by_this_feature to FeatureEntitlement#33ryanechternacht wants to merge 2 commits into
ryanechternacht wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two additive fields on
FeatureEntitlementfor credit burndown entitlements, so the API can tell SDKs when the credit pool next resets and how much of it this feature has burned in the current grant window. Today the only reset date on the entitlement ismetric_reset_at, which comes from a hardcoded monthly metric period rather than the grant, andcredit_usedis pool-wide across every feature on the credit.credit_reset_atis null when the credit is funded only by one-time or purchased grants.credit_used_by_this_featureis all-time when there is no recurring grant. Neither is populated by this module; the API fills them.credit_totalpicks up the deprecated tag the REST feature usage response already carries for the same field.Mirrors the same fields in rulesengine-rust (SchematicHQ/schematic-api). Struct-only, no engine behavior change. Needs a tag after merge so the API can bump; the API is still on v0.1.20 and the operator fix in #32 has not been tagged either.