/**
  * Get rma items.
  *
  * @param Rma $rma
  * @return array
  */
 protected function getRmaItems(Rma $rma)
 {
     $rmaItems = $rma->getItems();
     /** @var Order $order */
     $order = $rma->getDataFieldConfig('order_id')['source']->getOrder();
     $orderItems = $this->getAssignedProducts($order);
     foreach ($rmaItems as $productKey => $productData) {
         $key = str_replace('product_key_', '', $productKey);
         $product = $orderItems[$key];
         $productData['sku'] = $this->productHandlerClass->getProductSku($product);
         $productData['qty'] = $productData['qty_requested'];
         $productData['product_name'] = $product->getName();
         $productOptions = $this->productHandlerClass->getProductOptions($product);
         if ($productOptions != null) {
             $productData['options'] = $productOptions;
         }
         if (!isset($productData['status'])) {
             $productData['status'] = self::ITEM_DEFAULT_STATUS;
         }
         unset($productData['reason']);
         unset($productData['reason_other']);
         $rmaItems[$productKey] = $productData;
     }
     return $rmaItems;
 }
 /**
  * Get product data.
  *
  * @param InjectableFixture $product
  * @return array
  */
 protected function getProductData(InjectableFixture $product)
 {
     $productData['product'] = ['name' => $this->getProductName($product), 'sku' => $this->productHandlerClass->getProductSku($product)];
     $productOptions = $this->productHandlerClass->getProductOptions($product);
     if ($productOptions != null) {
         $productData['product']['options'] = $productOptions;
     }
     return $productData;
 }