(a) The tax imposed by this article shall be refunded to any person who shall buy in quantities of twenty-five gallons or more, at any one time, tax-paid gasoline or special fuel, when consumed for the following purposes:
(1) As a special fuel for internal combustion engines not operated upon highways of this state; or (2) Gasoline consumed to operate tractors and gas engines or threshing machines for agricultural purposes, when such operation is not, in whole or in part, upon the highways of this state; or