The governing body in providing for rubbish disposal may by the ordinance, or any amendment thereto, provide in what districts or along which streets collection shall be made, and volume of rubbish to be collected, leaving certain amounts or types of rubbish to private disposal, but shall continue to have the authority to regulate the time and manner of private disposal, varied according to the nature of the rubbish accumulated and disposed of. Such regulation may provide for immediate abatement of any condition which is a menace to public health and safety. In such cases notice may be given to the owner or occupant of premises for the summary disposal of rubbish or unhealthy or unsafe condition by posting upon the premises notice of what is required. If the notice be not obeyed within the time fixed in said notice, the city shall have the right to remove such rubbish or such unhealthy or unsafe condition, charging such rates as are prescribed, or the cost thereof, and shall have the right to collect the same as rates and charges are herein authorized to be charged, made and collected. In lieu of such method, the city may, for adequate compensation, by contract with the owner of any premises, perform any service upon public or private property in the removal of rubbish, covering with proper filling material any foul, unhealthy or unsafe material, including low grounds, which are or may become foul, unhealthy or unsafe.