One who deals with an agent without knowing or having reason to believe that the agent acts as such in the transaction may set off against any claim of the principal arising out of the same all claims which he might have set off against the agent before notice of the agency.

(Code 1923, §9540; Code 1940, T. 9, §74.)