(1) A person commits trading in public office if:
(a) He offers, confers, or agrees to confer any pecuniary benefit upon a public servant or party officer upon an agreement or understanding that he or a particular person will or may be appointed to a public office or designated or nominated as a candidate for public office; or
(b) While a public servant or party officer, he solicits, accepts, or agrees to accept any pecuniary benefit from another upon an agreement or understanding that a particular person will or may be appointed to a public office or designated or nominated as a candidate for public office.
(2) It shall be an affirmative defense that the pecuniary benefit was a customary contribution to political campaign funds solicited and received by lawfully constituted political parties.
(3) Trading in public office is a class 1 misdemeanor.