code: protected function updateKey(SaleInterface $sale)
      {
          if (0 == strlen($sale->getKey())) {
              $this->keyGenerator->generate($sale);
  
              return true;
          }
  
          return false;
      }
docs: Updates the key.
  
  @param SaleInterface $sale
  
  @return bool Whether the sale key has been updated.