If you bought the car from a dealer recently you shouldn't even have bought a gas cap. It's there problem to find and fix it.
That is a key reason to buy from a dealer, you have peace of mind knowing that if something goes wrong a few days after you pick it up, they'll take care of it...