(a) An action or special proceeding against a foreign corporation may be maintained by a resident of this state or by a domestic corporation of any type or kind for any cause of action. (b) Except as otherwise provided in this article, an action or special proceeding against a foreign corporation may be maintained by another foreign corporation of any type or kind or by a non-resident in the following cases only: (1) Where it is brought to recover damages for the breach of a contract made or to be