NEW YORK—T- Mobile has agreed to pay $350 million to customers affected by a class action lawsuit filed after the company disclosed last August that personal data like social security numbers had been stolen in a cyberattack. In a Securities and Exchange Commission filing on Friday, the mobile phone company said the funds would pay…