kapil-panchal commented on code in PR #4849:
URL: https://github.com/apache/fineract/pull/4849#discussion_r2213526362
##########
fineract-core/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java:
##########
@@ -77,4 +84,61 @@ public CurrencyUpdateResponse
updateCurrencies(CurrencyUpdateRequest request) {
return response.get();
}
+
+ @POST
+ @Consumes({ MediaType.APPLICATION_JSON })
+ @Produces({ MediaType.APPLICATION_JSON })
+ @Operation(summary = "Create a new currency", description = "Adds a new
currency to the platform with the given code, name, symbol, decimal places, in
multiples of and name code.")
+ public CurrencyData createCurrencies(CurrencyData request) {
+ final CurrencyCreateCommand command = new CurrencyCreateCommand();
+ Set<Integer> allowedDecimalPlaceValues = Set.of(0, 1, 2, 3, 4, 5);
+
+ // Case where the currency code is not an alphabet == 3
+ if (!request.getCode().matches("^[A-Z]{3}$")) {
Review Comment:
I will raise a new PR for the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]