protected function _prepareResult($result) { $return = parent::_prepareResult($result); if (!empty($return->subItems)) { $tmp = []; foreach ($return->subItems as $itm) { $tmp[] = (new InvoiceSubItemRequest())->hydrate($itm); } $return->subItems = $tmp; } return $return; }
protected function _prepareResult($result) { $return = parent::_prepareResult($result); if (!empty($return->defaultPrice)) { $return->defaultPrice = (new ProductPriceRequest())->hydrate($return->defaultPrice); } return $return; }