Is there a way to equip on purchase?

You can equip an item immediately upon picking it up from the environment. But I don’t see a way to do that immediately upon purchasing a weapon or mod from a vending machine.