filterXPath('//gutschein'); $voucherNumber = $this->getStringOrNullValue($voucherNode->filterXPath('//gutscheinnnr')) ?? ''; $redemptionCode = $this->getStringOrNullValue($voucherNode->filterXPath('//einloesecode')) ?? ''; $voucherId = $this->getIntOrNullValue($voucherNode->filterXPath('//idgutschein')) ?? 0; $remainingBalance = $this->getFloatOrNullValue($voucherNode->filterXPath('//betrag')) ?? 0.0; $type = $this->getStringOrNullValue($voucherNode->filterXPath('//art')) ?? ''; return new PurchaseVoucher( voucherNumber: $voucherNumber, redemptionCode: $redemptionCode, voucherId: $voucherId, remainingBalance: $remainingBalance, type: $type ); } }