-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FINERACT-2418: add origination-api-skeleton #5350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
FINERACT-2418: add origination-api-skeleton #5350
Conversation
|
|
||
| @Override | ||
| public List<LoanOriginatorData> retrieveAll() { | ||
| throw new UnsupportedOperationException("Not implemented yet - see PS-2950"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This magic string "Not implemented yet - see PS-2950" can be extracted to a constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove internal story id.
|
Please fix compilation errors: |
| "doc": "Code value ID for originator type (MERCHANT, BROKER, AFFILIATE, PLATFORM)", | ||
| "type": [ | ||
| "null", | ||
| "long" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CodeValueDataV1 instead please.
| "doc": "Code value ID for channel type (ONLINE, IN_STORE, API, AGGREGATOR)", | ||
| "type": [ | ||
| "null", | ||
| "long" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use CodeValueDataV1 instead please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning originators as part of fetch Loan details API is missing.
82de7c2 to
22624e3
Compare
22624e3 to
5b65f9a
Compare
Aman-Mittal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments as these changes will increase technical debt later on.
| return this; | ||
| } | ||
|
|
||
| public CommandWrapperBuilder createLoanOriginator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintaining constants of CREATE, UPDATE, DELETE, LOAN_ORIGINATOR and /loan-originators/ may be more maintainable
| @Consumes({ MediaType.APPLICATION_JSON }) | ||
| @Produces({ MediaType.APPLICATION_JSON }) | ||
| @Operation(summary = "Create a new loan originator", description = "Creates a new loan originator record. Requires CREATE_LOAN_ORIGINATOR permission.") | ||
| @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of @ApiResponses
from java 8 + we can simply use multiple ApiResponse Annotation
| @Consumes({ MediaType.APPLICATION_JSON }) | ||
| @Produces({ MediaType.APPLICATION_JSON }) | ||
| @Operation(summary = "List all loan originators", description = "Retrieves all loan originator records. Requires READ_LOAN_ORIGINATOR permission.") | ||
| @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
| @Consumes({ MediaType.APPLICATION_JSON }) | ||
| @Produces({ MediaType.APPLICATION_JSON }) | ||
| @Operation(summary = "Retrieve a loan originator by ID", description = "Retrieves a loan originator by its internal ID. Requires READ_LOAN_ORIGINATOR permission.") | ||
| @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
|
|
||
| public List<PostLoansRequestChargeData> charges; | ||
|
|
||
| @Schema(description = "Optional array of originators to associate with this loan. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of concatenation we can use
"""
Optional array of originators to associate with this loan
Each entry can reference an existing originator by 'id' or 'externalId'.
If the global config 'enable_originator_creation_during_loan_application' is enabled,
non-existing originators will be auto-created using the provided details (name, typeId, channelTypeId).
""""
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.