Each county is authorized and empowered to establish by ordinance a merit system for the hiring, promotion, discharge and general regulation of the deputies and the employees of the county sheriff’s office. The ordinance may, in the discretion of the board of county commissioners, provide for the classification of deputies and other employees and their probationary periods, service ratings, pay scales and ranges, the number of hours of work per week and the methods of employment, promotion, demotion and discharge of such deputies and employees within the limits provided by law.