Ejemplo n.º 1
0
 /**
  * @param \Generated\Shared\Transfer\RefundItemTransfer $refundItem
  *
  * @throws \Pav\Zed\Refund\Business\Exception\RefundItemNotFoundException
  * @return \Generated\Shared\Transfer\RefundItemTransfer
  */
 protected function updateRefundItem(RefundItemTransfer $refundItem)
 {
     $idRefundItem = $refundItem->getIdRefundItem();
     $refundItemEntity = $this->queryContainer->queryRefundItemById($idRefundItem)->findOne();
     if ($refundItemEntity === null) {
         throw new RefundItemNotFoundException(sprintf('Refund item %s not found', $idRefundItem));
     }
     $refundItemEntity->fromArray($refundItem->toArray());
     $refundItemEntity->save();
     return $refundItem;
 }