depends on HOW you handled it, one persons gentle is another persons ROUGH
Try to find the receipt from where you purchased it via email, or credit card charge, etc.
Don’t yank out your magsafe connector when done charging
When your are done charging your Macbook, do not, especially at a sharp angle, just yank out the neodymium magnetic connector on your magsafe connection to your notebook, doing so is both tough on the cord, and puts excess stress on its neck where it enters the T-connector block of the connector head. Grab the T-connector head itself and gently tilt it up or down a bit and then out, or directly out.
Careful with your charger and its cable
Do not make any hard bends or folds in your charging cable, or wind it tightly, always make either circles or loose loops when winding your cord up for storage. Also do not, as many people have seen, unroll your charger block from the magsafe end by letting the charger drop and unroll itself like a yo-yo, this is both hard on the charger and its connection points at both ends.
In addition to PlotinusVeritas' excellent comments, there's another possible reason why you had an issue:
You have not told us which MacBook Air you have. Some use the MagSafe adapter shown here:
Newer MacBook Airs use the MagSafe 2 adapter shown here:
So you may well have purchased the wrong adapter for your particular MacBook Air.