I have HTC One since few months. It worked fine, this is great device in my opinion.
Today my battery ran out of energy. I plug in the charger, and there is no reaction over 30 minutes. It has happening for the first time.
You have to go to the store where you bought it so they can have it checked. Maybe the battery must not be totally drained. Have them checked your phone since it still has warranty if you just bought it few months ago.