complex_model/HailAUSKeysLookup.py
def _get_lob_id(self, record):
        """This transforms the occupancy error_code into Multi-Peril Workbench specified line of business"""
        try:
            if 'occupancycode' not in record:
                # residential: this is the default behaviour when this field is missing in the workbench
                return EnumLineOfBusiness.Residential.value
            if self._check_in_group(record, "residential",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Residential.value  # residential
            elif self._check_in_group(record, "commercial",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Commercial.value  # commercial
            elif self._check_in_group(record, "industrial",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Industrial.value  # industrial
            else:
                raise LocationNotModelledException("Unsupported occupancy code " + str(record['occupancycode']),
                                                   error_code=230)
        except TypeError:
            raise LocationLookupException("Badly formatted occupancy code " + str(record['occupancycode']),
                                          error_code=123)
This transforms the occupancy error_code into Multi-Peril Workbench specified line of business
This transforms the occupancy error_code into Multi-Peril Workbench specified line of business
This transforms the occupancy error_code into Multi - Peril Workbench specified line of business
def _get_lob_id(self, record):
        try:
            if 'occupancycode' not in record:
                return EnumLineOfBusiness.Residential.value
            if self._check_in_group(record, "residential",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Residential.value  
            elif self._check_in_group(record, "commercial",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Commercial.value  
            elif self._check_in_group(record, "industrial",  self._codes_mapping["occupancy"]):
                return EnumLineOfBusiness.Industrial.value  
            else:
                raise LocationNotModelledException("Unsupported occupancy code " + str(record['occupancycode']),
                                                   error_code=230)
        except TypeError:
            raise LocationLookupException("Badly formatted occupancy code " + str(record['occupancycode']),
                                          error_code=123)
def _get_lob_id ( self , record ) : try : if 'occupancycode' not in record : return EnumLineOfBusiness . Residential . value if self . _check_in_group ( record , "residential" , self . _codes_mapping [ "occupancy" ] ) : return EnumLineOfBusiness . Residential . value elif self . _check_in_group ( record , "commercial" , self . _codes_mapping [ "occupancy" ] ) : return EnumLineOfBusiness . Commercial . value elif self . _check_in_group ( record , "industrial" , self . _codes_mapping [ "occupancy" ] ) : return EnumLineOfBusiness . Industrial . value else : raise LocationNotModelledException ( "Unsupported occupancy code " + str ( record [ 'occupancycode' ] ) , error_code = 230 ) except TypeError : raise LocationLookupException ( "Badly formatted occupancy code " + str ( record [ 'occupancycode' ] ) , error_code = 123 )
This transforms the occupancy error_code into Multi-Peril Workbench specified line of business
This transforms the occupancy error_code into Multi - Peril Workbench specified line of business
"""This transforms the occupancy error_code into Multi-Peril Workbench specified line of business""" # residential: this is the default behaviour when this field is missing in the workbench # residential # commercial # industrial
self
record