@Produces({ MediaType.APPLICATION_JSON })
public String executeLoanCharge(@PathParam("loanId") final Long loanId, @PathParam("chargeId") final Long loanChargeId,
@QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) {
final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson);
CommandProcessingResult result = null;
if (is(commandParam, "waive")) {
final CommandWrapper commandRequest = builder.waiveLoanCharge(loanId, loanChargeId).build();
result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
} else if (is(commandParam, "pay")) {
final CommandWrapper commandRequest = builder.payLoanCharge(loanId, loanChargeId).build();