Handle variants via api

Code example here: How to update single component attribute or variant via plugin? - #2 by Gleb