code: private function buildShipmentLine(Model\SaleInterface $sale)
      {
          if (null === $sale->getShipmentMethod() && !$this->options['private']) {
              return;
          }
  
          $lineNumber = $this->lineNumber++;
  
          $view = new LineView(
              'shipment',
              'shipment',
              $lineNumber,
              0
          );
  
          // Method title
          $designation = 'Shipping cost';
          if (null !== $method = $sale->getShipmentMethod()) {
              $designation = $method->getTitle();
          }
  
          // Total weight
          $designation .= ' (' . $this->formatter->number($sale->getWeightTotal()) . ' kg)';
  
          $result = $sale->getShipmentResult();
  
          $view
              ->setDesignation($designation)
              ->setBase($this->formatter->currency($result->getBase()))
              ->setTaxRates($this->formatter->rates(...$result->getTaxAdjustments()))
              ->setTaxAmount($this->formatter->currency($result->getTax()))
              ->setTotal($this->formatter->currency($result->getTotal()));
  
          foreach ($this->types as $type) {
              $type->buildShipmentView($sale, $view, $this->options);
          }
  
          $this->view->setShipment($view);
      }
docs: Builds the shipment adjustment line view.
  
  @param Model\SaleInterface $sale