No building hereafter erected shall be occupied or used, in whole or in part, until a certificate of occupancy shall have been issued by the Inspector, certifying that such building conforms substantially to the permit and the requirements of laws, ordinances and rules applying to buildings of its class and kind. No building hereafter enlarged or extended, or so altered, in whole or in part, as to change its classification, and no building hereafter altered for which a certificate of occupancy has not been heretofore issued shall be occupied or used, in whole or in part, until a certificate of occupancy shall have been issued by the Inspector, certifying that the work for which the permit was issued has been completed substantially in accordance with the permit and the provisions of laws, ordinances and rules applying to such alteration.