use of org.apache.fineract.commands.service.CommandWrapperBuilder in project fineract by apache.
the class CreditBureauConfigurationAPI method updateCreditBureauLoanProductMapping.
@PUT
@Path("/mappings")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String updateCreditBureauLoanProductMapping(final String apiRequestBodyAsJson) {
final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCreditBureauLoanProductMapping().withJson(apiRequestBodyAsJson).build();
final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
return this.toApiJsonSerializer.serialize(result);
}
use of org.apache.fineract.commands.service.CommandWrapperBuilder in project fineract by apache.
the class CreditBureauIntegrationAPI method deleteCreditReport.
// deletes saved creditReports from database
@DELETE
@Path("deleteCreditReport/{creditBureauId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String deleteCreditReport(@PathParam("creditBureauId") @Parameter(description = "creditBureauId") final Long creditBureauId, @Parameter(hidden = true) final String apiRequestBodyAsJson) {
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCreditReport(creditBureauId).withJson(apiRequestBodyAsJson).build();
final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
return this.toCreditReportApiJsonSerializer.serialize(result);
}
use of org.apache.fineract.commands.service.CommandWrapperBuilder in project fineract by apache.
the class ClientCollateralManagementApiResource method updateCollateral.
@PUT
@Path("{collateralId}")
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update New Collateral of a Client", description = "Update New Collateral of a Client")
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientCollateralManagementApiResourceSwagger.PutClientCollateralRequest.class)))
@ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientCollateralManagementApiResourceSwagger.PutClientCollateralResponse.class))) })
public String updateCollateral(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId, @Parameter(hidden = true) String apiJsonRequestBody) {
final CommandWrapper commandWrapper = new CommandWrapperBuilder().updateClientCollateralProduct(clientId, collateralId).withJson(apiJsonRequestBody).build();
final CommandProcessingResult commandProcessingResult = this.commandsSourceWritePlatformService.logCommandSource(commandWrapper);
return this.apiJsonSerializerService.serialize(commandProcessingResult);
}
use of org.apache.fineract.commands.service.CommandWrapperBuilder in project fineract by apache.
the class CollateralManagementApiResource method createCollateral.
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Create a new collateral", description = "Collateral Creation")
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PostCollateralManagementProductRequest.class)))
@ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PostCollateralManagementProductResponse.class))) })
public String createCollateral(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
final CommandWrapper commandWrapper = new CommandWrapperBuilder().createCollateral().withJson(apiRequestBodyAsJson).build();
final CommandProcessingResult commandProcessingResult = this.commandsSourceWritePlatformService.logCommandSource(commandWrapper);
return this.apiJsonSerializerService.serialize(commandProcessingResult);
}
use of org.apache.fineract.commands.service.CommandWrapperBuilder in project fineract by apache.
the class CollateralManagementApiResource method updateCollateral.
@PUT
@Path("{collateralId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update Collateral", description = "Update Collateral")
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PutCollateralProductRequest.class)))
@ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PutCollateralProductResponse.class))) })
public String updateCollateral(@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId, @Parameter(hidden = true) final String jsonBody) {
final CommandWrapper commandWrapper = new CommandWrapperBuilder().updateCollateralProduct(collateralId).withJson(jsonBody).build();
final CommandProcessingResult commandProcessingResult = this.commandsSourceWritePlatformService.logCommandSource(commandWrapper);
return this.apiJsonSerializerService.serialize(commandProcessingResult);
}
Aggregations