The legislative body of a city may contract for the collection or disposal, or both, of garbage, waste, refuse, rubbish, offal, trimmings, or other refuse matter under the terms and conditions that are prescribed by the legislative body of the city by resolution or ordinance.