customers->findSummary($customerId); $isConsumer = $customer?->type === CustomerType::Consumer; $unit = $billingUnitId === null ? null : $this->customers->findBillingUnit($customerId, $billingUnitId); return new CustomerBillingDetails( $customer->name ?? '', $isConsumer, $customer?->businessId, $isConsumer && $withIdentityCode ? $this->customers->personalIdentityCodeOf($customerId) : null, $unit?->name, $unit?->billingAddress, $unit?->eInvoiceAddress, $unit?->eInvoiceOperator, $unit?->reference, ); } }