The defendant is a corporation engaged in *627manufacturing and selling gas to the people of Boone under a franchise granted by that city. One of its mains is laid in the street immediately in front of plaintiff’s premises, and for more than a year prior to July 20, 1908, it had supplied the same with gas in the manner customary with its patrons. On that day, owing to differences concerning the company’s account it removed the meter and cut off the supply. An action on such account resulted in a judgment for plaintiff herein. Thereupon plaintiff requested that the meter be reinstated and the company again furnish him with gas. It refused to do so unless he would deposit $10 as security for the payment of gas or procure some one to sign his contract with the company guaranteoing such payment. He declined to do either, and instituted this suit to compel defendant to re-establish its gas service and furnish him gas on equal terms and under like conditions with others.
On the trial the facts, as recited, were established, and also that, though the company had no formal rule on the subject, it had been customary when an applicant was unknown or was deemed not to be responsible to require a deposit or the contract to be signed by some responsible party, and several hundred of its patrons had complied therewith. The manager testified that such custom was reasonable and obtained elsewhere, and that he had reason to believe that plaintiff was not responsible, and that he was slow in his accounts, but, on cross-examination, admitted that his real reason for believing plaintiff not responsible was because of the suit mentioned, and that he knew of him failing to avail himself of the discount by paying 'for each month’s gas within fifteen days after due but once, and that was owing to the company applying the amount of the bill on fixtures. No similar demand ever had been made on him before, and the record is convincing that in requiring the deposit or security as a condition to installing the meter the company was actuated solely by petty *628spite because of its defeat in the suit on account in the justice court, and did not do so in the enforcement of one of its rules.
Corporations or persons who undertake to supply a demand which is “affected with a public interest” are not a law unto themselves, but are required to supply all alike who are alike situated, and are not permitted to discriminate in favor of or against any. By accepting from the city a franchise to lay pipes and mains in the streets and alleys and through them furnish the inhabitants and the public with fuel, illuminating, and power gas, the company assumed a public duty. That duty was to supply gas at reasonable rates to all the inhabitants of the city, and to charge each the same price and furnish on the same terms as it did to every other for like service under the same or similar conditions. Haugen v. Albina Light & Water Co., 21 Or. 411 (28 Pac. 244, 14 L. R. A. 424); Williams v. Mutual Gas Co., 52 Mich. 499 (18 N. W. 236, 50 Am. Rep. 266); Shepard v. Milwaukee Gaslight Co., 6 Wis. 539 (70 Am. Dec. 479); Owensboro Gas Co. v. Hildebrand (Ky.) 42 S. W. 351; American Waterworks Co. v. State, 46 Neb. 194 (64 N. W. 711, 30 L. R. A. 447, 50 Am. St. Rep. 610). See Huffman v. Telephone Co., 143 Iowa, 590. Such a company may adopt reasonable rules or regulations for the management of its affairs. Cedar Rapids Gaslight Co. v. City of Cedar Rapids, 144 Iowa, 426. The evidence discloses that it had been the custom to exact a money deposit or the signature of a person known to. be responsible whenever the applicant was unknown or known to be irresponsible. The delivery of gas necessarily is its consumption. The amount can only be ascertained as consumed. The company is bound to furnish on application, and it is but just that it be not compelled to supply unknown or irresponsible persons therewith without assurance in some form that it will receive compensation. The adoption of a formal rule exacting security seems unnecessary if there is a well-*629established custom as appears in this case to exact security as stated. The evidence discloses that this had always been customary with the company. In such a case, the custom has the force of a rule or regulation. Of course, it could J not impose different terms according to whim or caprice, but must treat all consumers in like situations alike. As said in the Cedar Rapids Gaslight case, the company may not base a rule on the theory that the people as a whole are dishonest, but it has the right to adopt a rule which, while giving the honest citizen what he pays for, will prevent the dishonest from getting that which he will never pay for. Appellee argues that the custom in any event is unreasonable and unjust, in that no definite test is fixed for determining from whom security shall be exacted, all being left to the company’s agents. It is unnecessary to pass on this point, for, conceding the validity of the regulation, we agree with the trial court that it was not resorted to in good faith. Prior to the suit in the justice court, no question had been raised concerning the plaintiff’s responsibility. He had paid his bills promptly. Immediately thereafter the company’s manager instructed the employees not to reinstate Phelan’s meter without security, and on the trial he admitted having no other reason for declaring him slow in his accounts or irresponsible than the lawsuit in which the court adjudicated that the company’s account had been paid. In retaliation, rather than because of questioning plaintiff’s responsibility, the company demanded the security. In the absence of any evidence to the contrary, he is presumed to have been responsible for obligations undertaken, and the district court rightly directed the issuance of the writ of mandamus as prayed. Affirmed.