code: protected function calculateGoodsValue(Shipment\ShipmentInterface $shipment)
      {
          $value = 0;
  
          foreach ($shipment->getItems() as $item) {
              $saleItem = $item->getSaleItem();
              $value += $saleItem->getNetPrice() * $item->getQuantity();
          }
  
          return round($value, 2); // TODO Convert/Round regarding to gateway and sale currencies
      }
docs: Calculates the shipment's good value (for insurance).
  
  @param Shipment\ShipmentInterface $shipment
  
  @return float