class FundController extends AbstractController {

    @PostMapping(value = "/requests/{requestId}/refunds")
    public ModelAndView requestRefund(final Principal principal,
                                      @PathVariable("requestId") final Long requestId,
                                      @RequestParam("funder_address") final String funderAddress,
                                      final RedirectAttributes redirectAttributes) {
        final RedirectBuilder redirectBuilder = redirectView(redirectAttributes).url("/requests/" + requestId + "#details");
        if (isValid(redirectBuilder, principal, requestId, funderAddress)) {
            refundService.requestRefund(RequestRefundCommand.builder()
                                                            .requestId(requestId)
                                                            .funderAddress(funderAddress)
                                                            .requestedBy(principal.getName())
                                                            .build());
            return redirectBuilder.withSuccessMessage("Your refund has been requested and is waiting for approval.").build();
        } else {
            return redirectBuilder.build();
        }
    }

    public  FundController(final RequestService requestService,
                          final RefundService refundService,
                          final ProfileService profileService);

}