added Basket Plugin - Check VAT ID

I need some help adding the Basket Plugin for the VAT ID Check.
If VAT ID is set, the taxrate must be removed. 
If VAT ID is removed, the taxrate must be added again.
Retrieve the session with $session = $this->_getContext()->getSession() and set the saved position/price/taxrate array JSON encoded with $session->set(). If the VAT ID is not available, try to get the saved data from the session, decode it and set the original price and tax rate again at the product with the positions from your data array.