Skip to content

[ING-240] feat(wallets): add grants_target_top_up to recurring transaction rules#355

Merged
aquinofb merged 1 commit into
mainfrom
ing-240
Jun 29, 2026
Merged

[ING-240] feat(wallets): add grants_target_top_up to recurring transaction rules#355
aquinofb merged 1 commit into
mainfrom
ing-240

Conversation

@aquinofb

@aquinofb aquinofb commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Context

Wallet recurring transaction rules of type target previously always created a paid top-up; there was no way to grant free credits through a target rule. The API now supports this via a nullable boolean grants_target_top_up on the recurring transaction rule (getlago/lago-api#5755). On a target rule, true makes the periodic gap-fill grant free credits to reach the target balance instead of creating a paid top-up; false, the default for target rules, keeps the current paid behaviour. The field is null for fixed rules.

Description

Exposes grants_target_top_up so consumers can set it on wallet create/update:

  • Whitelists grants_target_top_up in the recurring transaction rule params. Responses already surface it (parsed dynamically into OpenStruct), so no response-model change is needed.
  • Adds create and update specs asserting the field is forwarded on a target rule.

No version bump: released separately, per repo convention.

How to try locally

bundle exec rspec spec/lago/api/resources/customers/wallets_spec.rb

@aquinofb aquinofb self-assigned this Jun 9, 2026
@aquinofb aquinofb marked this pull request as ready for review June 29, 2026 12:31
@aquinofb aquinofb merged commit a568da0 into main Jun 29, 2026
6 checks passed
@aquinofb aquinofb deleted the ing-240 branch June 29, 2026 20:04
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