The ruling handed a victory to the banking industry, which has viewed the agency as a thorn in its side and accused it of overreaching in its regulation of consumer financial activities. The agency has taken legal action against banks, mortgage companies, credit card issuers, payday lenders, debt collectors and others. The CFPB says that over five years it has recovered $11.7 billion that it returned to more than 27 million harmed consumers.