N.Y. Business Corporation Law § 1314
(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: