How to fix my iPhone (that's less than 24 hours old)?

I upgraded my phone today at AT&T from an iPhone 4S to an iPhone 6. Right after the guy who works there activated it, I went to press the home button and the phone was off. I tried turning it on and it didn't work, so I told the guy and he did what he called a "soft reset" because it had "soft crashed". All he did was hold the home button and lock button and it turned back on, no big deal. So when I got home the phone was off and wouldn't turn on again, and i had to reset it. It will not stay on and will only turn on with the reset (which I've had to do about 30 times, roughly.) It doesn't turn off while I'm using it, just when its locked. So I called At&t and they said they would replace it but they don't have any other 64 gb iPhones left, and i can only go to the at&t i bought it from. My other option is to go to the apple store which a)is far away from my house and b) i can't get there for another 3 days. So any advice on how to fix this phone?
if i factory reset it, would that erase my number from my phone and all my contacts?
sorry this is long, i appreciate any answers!

You need to demand a new phone. This is the type of stuff I see in my shop on USED i6s. Could be a bad battery. Could just need to backup and restore your phone. Could need a number of things that a brand new phone should not be doing. Apple warranty is 1 year, but att should replace it with a new one, being a day old. Don't let them send you an Asurion replacement phone! If they give you any beef, go to Apple.