src/Services/Repositories/PostalCodeRepository.php
public function getById(string $postalCode) : PostalCode
    {
        try {
            // read postal code data from storage
            $postalCodeDataArray = $this->storage->getBy(PostalCode::TABLE, 'postal_code', $postalCode);

            return $this->postalCodeMapper->getPostalCode($postalCodeDataArray);
        } catch (NotFoundException $e) {
            throw new NotFoundException("Postal code " . $postalCode . " not found in storage.", $e);
        } catch (\Exception $e) {
            throw new RepositoryException("Failed to read postal code from storage provider.", $e);
        }
    }
public function getById(string $postalCode) : PostalCode
    {
        try {
            // read postal code data from storage
            $postalCodeDataArray = $this->storage->getBy(PostalCode::TABLE, 'postal_code', $postalCode);

            return $this->postalCodeMapper->getPostalCode($postalCodeDataArray);
        } catch (NotFoundException $e) {
            throw new NotFoundException("Postal code " . $postalCode . " not found in storage.", $e);
        } catch (\Exception $e) {
            throw new RepositoryException("Failed to read postal code from storage provider.", $e);
        }
    }
@param string $postalCode

@return PostalCode