Any person having an interest under a deed, will, written contract or other writings constituting a contract, or whose rights, status or other legal relations are affected by a statute, municipal ordinance, contract or franchise, may seek determination of any question of construction or validity arising under that enactment, document or agreement and may obtain a declaration of rights, status or other legal relations thereunder.
K.S.A. 60-1704