[ACL-290] Add sub_merchants support to Payments module#360
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for sub‐merchants in the payments module by adding new classes (BusinessClient, BusinessDivision, UltimateCounterparty, and SubMerchants) and updating relevant request and response entities.
- Introduces sub_merchants functionality through new domain entities and associated builders.
- Adds tests verifying the creation and usage of sub‐merchants in both requests and responses.
- Updates PaymentDetail and CreatePaymentRequest to include subMerchants fields.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| SubMerchantsTest.java | Adds tests for creating BusinessClient, BusinessDivision, and SubMerchants. |
| CreatePaymentRequestSubMerchantsTest.java | Verifies that CreatePaymentRequest accepts and processes subMerchants correctly. |
| UltimateCounterparty.java | Provides the abstract base and builder methods for sub‐merchant counterparties. |
| SubMerchants.java | Defines the container class for an UltimateCounterparty instance. |
| BusinessDivision.java | Implements BusinessDivision with its required fields. |
| BusinessClient.java | Implements BusinessClient with its required fields. |
| PaymentDetail.java | Updates PaymentDetail to include the subMerchants field. |
| CreatePaymentRequest.java | Updates CreatePaymentRequest to include the subMerchants field with appropriate documentation. |
Comments suppressed due to low confidence (1)
src/main/java/com/truelayer/java/payments/entities/paymentdetail/PaymentDetail.java:41
- [nitpick] Consider adding a Javadoc comment for the 'subMerchants' field to maintain consistency with similar fields in other classes (e.g., in CreatePaymentRequest) and to provide clarity on its intended use.
private SubMerchants subMerchants;
fb3b086 to
66effbe
Compare
Implements sub_merchants functionality for payments to match existing payouts implementation: - Add SubMerchants, UltimateCounterparty, BusinessClient, BusinessDivision classes - Add subMerchants field to CreatePaymentRequest and PaymentDetail - Include comprehensive test coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
66effbe to
10fb6fb
Compare
dili91
left a comment
There was a problem hiding this comment.
I think we should amend the version of the library included in the gradle.properties file.
If this is a non-breaking change, a minor version bump should be fine
|
Thanks for the feedback! I've addressed both comments:
Changes are ready for review. |
Co-authored-by: Claude <noreply@anthropic.com>
- Add Javadoc comment for subMerchants field in PaymentDetail.java - Bump version from 17.2.0 to 17.3.0 for new sub-merchants feature 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Re: acceptance tests for subMerchants field - Good question! I'm not sure about the acceptance test requirements for this new field. @tl-Roberto-Mancinelli could you provide feedback on whether we need acceptance tests for the subMerchants field? |
- Add parametrized test for both BusinessClient and BusinessDivision counterparty types - Verify sub-merchants data is preserved in payment creation and retrieval - Use fictional test data instead of personal information 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
✅ Update: I've now added a parametrized acceptance test for the subMerchants field that tests both BusinessClient and BusinessDivision counterparty types. The test verifies that sub-merchants data is properly preserved during payment creation and retrieval. |
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code