You can only buy a rifle or shotgun, and only from a licensed dealer, when buying out of state, and that assumes the laws of both states do not prohibit it.
So an Idahoan can buy a long gun from a Washington dealer and take it home. He can't buy a handgun at all, unless he is having it shipped to a licensed dealer in his home state. He can't buy anything in CA (unless shipping) because CA laws don't allow it. He can't buy anything from a private party, again unless he has that person ship it to a dealer in his home state.