Skip to content

fix(quotes): underscore charge override properties keys - #6328

Merged
toommz merged 2 commits into
mainfrom
fix/lago-1918/quote-override-properties-casing
Sep 8, 2026
Merged

toommz merged 2 commits into
mainfrom
fix/lago-1918/quote-override-properties-casing

Conversation

@toommz

@toommz toommz commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Saving tier changes on a quote subscription override failed with missing_graduated_ranges: billing_items is camelCase, but charge override properties reaches the charge models and Charges::OverrideService, which read snake_case.

Utils::ChargeProperties.underscore_keys now normalizes those properties where they are consumed (validator and execution), leaving custom_properties untouched. Storage stays as the frontend sent it, and both casings are accepted.

Without this an approved quote also dropped the charge from the override plan silently, billing nothing for it.

LAGO-1918

@toommz toommz self-assigned this Sep 8, 2026
@toommz
toommz marked this pull request as ready for review September 8, 2026 11:18
@lago-claude-ai-agent

Copy link
Copy Markdown
Contributor

Automated pre-review (advisory, not a required check) — verdict: PASS · CI green

PASS — Camel-case charge properties are normalized consistently at validation and execution, including inherited amendment paths, while customer-defined custom property keys remain untouched. The focused specs cover recursive conversion, validation, and persisted override behavior; no blocking issues found.

@toommz
toommz merged commit e5104d6 into main Sep 8, 2026
12 checks passed
@toommz
toommz deleted the fix/lago-1918/quote-override-properties-casing branch September 8, 2026 13:08
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