To switch models, it must be within the return period. If you're having issues with it, Apple will swap it for the same model within 1 yr of date if purchase.
I don't think I ever seen Apple let someone swap it for a different model, but you may get lucky.