Repository navigation
[CC-4240] Add recurring flag to SepaDirectDebit - #196
Merged
Merged
Conversation
Add a fluent recurring(boolean) method to SepaDirectDebit so integrators have a discoverable way to register the type for recurring (mandate-based) collection at creation time. The underlying recurring field already existed on BasePaymentType and was serialized by Gson, so this change is additive and non-breaking. Add Javadoc on the field and method clarifying the flag is set before createPaymentType, cannot be changed afterwards, is not needed for one-off payments, and is unrelated to card-specific recurrenceType. Add a unit test covering serialization (set true/false, absent when unset) and the response map path, plus an integration test for the create+fetch round-trip. Document the change under an Unreleased CHANGELOG section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changelog and version edits are scoped to the release ticket (CC-4252), so this feature branch no longer touches CHANGELOG and won't conflict.
Ryouzanpaku
marked this pull request as ready for review
November 12, 2026 14:57
Member
|
The change fulfils the ticket. One small wording fix: the Javadoc of |
Contributor
Author
|
Good catch — |
sixer1182
approved these changes
Dec 2, 2026
sixer1182
left a comment
Member
There was a problem hiding this comment.
Approving. recurring(boolean) only wraps the existing setter, and the unit tests cover serialization in both directions. The integration test needs sandbox credentials, so CI must provide them.
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.
What
Adds a fluent
recurring(boolean)method toSepaDirectDebit, giving integrators a discoverable way to register asepa-direct-debitpayment type for recurring (mandate-based) collection at type registration (POST /v1/types/sepa-direct-debit). Adds Javadoc on the new method and on therecurringfield inBasePaymentType.Why
For SEPA, recurrence intent is captured once, at type registration, via a
recurringboolean. The flag must be set beforecreatePaymentType(...)and cannot be changed afterwards; it is not needed for one-off payments and is unrelated to the card-specificrecurrenceTypeon charges/authorizations.Note: the
recurringfield already existed onBasePaymentTypeand was serialized by Gson, sosetRecurring(true)already produced"recurring": truein the POST body — but by accident, undocumented and untested. This change makes it explicit, documented, discoverable (fluent), and covered by tests. It is additive and non-breaking; the Lombok@Datasetter keeps working.Tests
business/paymenttypes/SepaDirectDebitTest): serialization contains"recurring":true/"recurring":falsewhen set, and norecurringkey when unset (parameterized); fluent method returns the same instance; response JSON maps togetRecurring() == truevia themap(...)/fromJsonpath.integration/paymenttypes/SepaDirectDebitTest): creates a type with the recurring flag, fetches it, assertsgetRecurring()is true (compiles; needs sandbox creds to run).🤖 Generated with Claude Code