Skip to content

[CC-4253] Deprecate Sofort and remaining payment-type enum constants - #194

Merged
Ryouzanpaku merged 3 commits into
mainfrom
CC-4253/deprecate-sofort-enum-constants
Nov 18, 2026
Merged

Ryouzanpaku merged 3 commits into
mainfrom
CC-4253/deprecate-sofort-enum-constants

Conversation

@Ryouzanpaku

Copy link
Copy Markdown
Contributor

Summary

Deprecation-only change, following the existing Giropay deprecation pattern. No production class, enum constant, or method is removed.

Annotated symbols

  • com.unzer.payment.paymenttypes.Sofort — class-level @Deprecated + @deprecated javadoc line, worded identically to Giropay.
  • PaymentTypeEnum.SOFORT
  • PaymentTypeEnum.GIROPAY
  • PaymentTypeEnum.INVOICE (replacement: PaymentTypeEnum.UNZER_PAYLATER_INVOICE / PaylaterInvoice)
  • PaymentTypeEnum.HIRE_PURCHASE_RATE_PLAN (replacement: PaymentTypeEnum.PAYLATER_INSTALLMENT / PaylaterInstallment)

The pre-existing charge(...) overloads in Sofort were already @Deprecated and were left untouched.

Deliberately not touched

  • Internal dispatch branches in PaymentService.java (case SOFORT: / case GIROPAY: / case INVOICE: / case HIRE_PURCHASE_RATE_PLAN:) are intentionally left unannotated and unsuppressed, consistent with how the already-deprecated constants are handled there.
  • PaymentTypeEnum.PIS is intentionally NOT touched — it is handled by a separate ticket (CC-4065) to avoid conflicts between the two PRs.

Changelog

Added an ## [Unreleased] section with a ### Deprecated list. No version bump, no existing release header edited.

Verification

  • mvn test-compile clean (JDK 17).
  • mvn test -Dtest=PaymentServiceTest — 8 passed.
  • Diff deletes nothing under src/main (additions only).

🤖 Generated with Claude Code

Add class-level @deprecated to Sofort (mirroring Giropay) and @deprecated
to the un-annotated PaymentTypeEnum constants SOFORT, GIROPAY, INVOICE and
HIRE_PURCHASE_RATE_PLAN. Internal PaymentService dispatch branches are left
unannotated, consistent with the already-deprecated constants. PIS is
intentionally untouched (handled by CC-4065). Changelog updated under
[Unreleased].

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
Ryouzanpaku marked this pull request as ready for review November 12, 2026 14:57
sixer1182

This comment was marked as outdated.

@sixer1182

Copy link
Copy Markdown
Member

Please disregard my earlier review comment on this PR. I re-checked it against the ticket (CC-4253) and all four points were wrong:

  1. The CHANGELOG entries are intentionally consolidated in the release PR [CC-4252] CHANGELOG for Java-SDK 5.10.0 release #197, and they are there.
  2. The ticket asks for a bare @Deprecated on the enum constants in the existing style; the replacement hints belong in the changelog, where they are.
  3. The Sofort Javadoc wording is prescribed by the ticket.
  4. PIS is already deprecated on main ([CC-4065] Deprecate the Pis (unzer-bank-transfer) payment type #190).

The PR implements the ticket as specified. One small remaining item from the ticket: please note the decision about SofortTest.java (kept or removed) in the PR description.

@Ryouzanpaku
Ryouzanpaku merged commit e0124c5 into main Nov 18, 2026
2 of 4 checks passed
@Ryouzanpaku
Ryouzanpaku deleted the CC-4253/deprecate-sofort-enum-constants branch November 18, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants