The country became a presidential republic in 1889 , when a military " coup d'état " proclaimed the Republic , although the bicameral legislature , now called Congress , dates back to the ratification of the first constitution in 1824 .