Add configurable single booking support for SEPA Direct Debits (Sammellastschrift)#561
Conversation
2bf3004 to
429e90b
Compare
| * @param bool $singleBookingRequested If true, each transaction appears separately on the statement. | ||
| * @return $this | ||
| */ | ||
| public function setSingleBookingRequested(bool $singleBookingRequested): self |
There was a problem hiding this comment.
Now that PHP8 supports named arguments, have you considered using a create() parameter rather than adding a new setter? I believe this would be the only case in this library so far where a setter is used on an action.
There was a problem hiding this comment.
Yes, I initially considered that as well, but then decided against it because I adopted the approach from SEPATransfer, as I didn't want to have two different logics for the two similar cases. I just adapted it from SEPATransfer. Therefore, we should either switch both cases to named arguments, or leave it as it is.
There was a problem hiding this comment.
Ah you're right, I overlooked that we have a setter there already, and even for exactly the same kind of property.
|
Great! Merging… |
This adds the ability to request individual bookings (
einzelbuchungGewuenscht) for batch SEPA Direct Debits, matching the existing functionality already available inSendSEPATransfer.Previously,
einzelbuchungGewuenschtwas hardcoded tofalseinSendSEPADirectDebit, meaning batch direct debits always appeared as a single aggregated entry on the bank statement — regardless of the caller's intent.Changes:
$singleBookingRequestedproperty toSendSEPADirectDebitsetSingleBookingRequested(bool): selfsetter method (consistent withSendSEPATransferAPI)einzelbuchungGewuenschtnow uses the configurable value instead of hardcodedfalse__serialize()/__unserialize()to include the new propertyUsage:
The bank-side parameter
einzelbuchungErlaubtis still respected — the flag is only sent when the bank advertises support for it.