Skip to content

add credit_reset_at and credit_used_by_this_feature to FeatureEntitlement - #33

Draft
ryanechternacht wants to merge 2 commits into
mainfrom
credit-reset-at-fields
Draft

add credit_reset_at and credit_used_by_this_feature to FeatureEntitlement#33
ryanechternacht wants to merge 2 commits into
mainfrom
credit-reset-at-fields

Conversation

@ryanechternacht

Copy link
Copy Markdown
Member

Two additive fields on FeatureEntitlement for 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 is metric_reset_at, which comes from a hardcoded monthly metric period rather than the grant, and credit_used is pool-wide across every feature on the credit.

credit_reset_at is null when the credit is funded only by one-time or purchased grants. credit_used_by_this_feature is all-time when there is no recurring grant. Neither is populated by this module; the API fills them. credit_total picks 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.

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.

1 participant