Skip to content

FINERACT-2421: Loan product basic detail endpoint#5569

Open
alberto-art3ch wants to merge 1 commit intoapache:developfrom
openMF:FINERACT-2421/loan-product-basic-detail-endpoint
Open

FINERACT-2421: Loan product basic detail endpoint#5569
alberto-art3ch wants to merge 1 commit intoapache:developfrom
openMF:FINERACT-2421/loan-product-basic-detail-endpoint

Conversation

@alberto-art3ch
Copy link
Contributor

Description

In order to have a Loan account application considering the Loan and Working Capital products supported now, we are adding a Loan product basic details endpoint to fetch those available products to be listed

FINERACT-2421

Screenshot 2026-02-28 at 9 02 13 PM

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/loan-product-basic-detail-endpoint branch from a3508d5 to f358c00 Compare March 2, 2026 01:57
@alberto-art3ch alberto-art3ch force-pushed the FINERACT-2421/loan-product-basic-detail-endpoint branch from f358c00 to 60e9f8a Compare March 2, 2026 04:09
private static final String RESOURCE_NAME_FOR_PERMISSIONS = "LOANPRODUCT";
private final PlatformSecurityContext context;
private final LoanProductReadPlatformService loanProductReadPlatformService;
private final WorkingCapitalLoanProductReadPlatformService workingCapitalLoanProductReadPlatformService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a new interface (like LoanProductReadBasicDetailsService) in the fineract-loan module which has the retrieveProducts() method.

Lets have 2 implementation of this interface:

  1. in fineract-loan module which return those loan products
  2. in fineract-working-capital-loan module which return those loan products

This class also can be moved into fineract-loan module.

We dont need to explicitly inject LoanProductReadPlatformService and WorkingCapitalLoanProductReadPlatformService.

Lets inject List of the newly created interface:

private final List<LoanProductReadBasicDetailsService> loanProductReadBasicDetailsServices;
...
loanProductReadBasicDetailsServices.foreach( service -> products.addAll(service.retrieveProducts());

We dont need to put anything into fineract-provider module.

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my concerns!

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