/**
  * Update the specified resource in storage.
  *
  * @param FundItemRequest $request
  * @param int $id
  * @return ItemResponse
  */
 public function update(FundItemRequest $request, $id)
 {
     $fundItem = $this->fundItem->findById($id);
     if (!$fundItem) {
         return (new Response())->setStatusCode(404);
     }
     return (new ItemResponse($this->fundItem->update($request->request->all(), $id)))->asType('FundItem');
 }
 /**
  * Display list of items of a Fund
  *
  * @param int $fundId
  * @param FundItemRepositoryInterface $fundItem
  * @return $this
  */
 public function showItems($fundId, FundItemRepositoryInterface $fundItem)
 {
     $fund = $this->fund->findById($fundId);
     if (!$fund) {
         return (new Response())->setStatusCode(404);
     }
     return (new CollectionResponse($fundItem->findByFundId($fundId)))->asType('FundItem');
 }