After a ModuleBuy, with the store option for ancient module, we don't have any reply for an ModuleStore in the logs. Or also can we have parameters like shipyard-sell/store ?
To confirm this, I purchased some thrusters for my Viper and put the old ones in to storage. The event generated was:
{ "timestamp":"2016-10-07T14:16:22Z", "event":"ModuleBuy", "Slot":"MainEngines", "SellItem":"$int_engine_size3_class2_name;", "SellItem_Localised":"Thrusters", "SellPrice":1651, "BuyItem":"$int_engine_size3_class5_name;", "BuyItem_Localised":"Thrusters", "BuyPrice":44570, "Ship":"viper", "ShipID":8 }
Note that it says that I sold my existing thrusters, but I didn't I stored them. I then bought some more thrusters and sold the old ones, and received the following event:
{ "timestamp":"2016-10-07T14:17:54Z", "event":"ModuleBuy", "Slot":"MainEngines", "SellItem":"$int_engine_size3_class5_name;", "SellItem_Localised":"Thrusters", "SellPrice":44570, "BuyItem":"$int_engine_size3_class4_name;", "BuyItem_Localised":"Thrusters", "BuyPrice":14857, "Ship":"viper", "ShipID":8 }
So it looks like you either aren't handling the first case or you have some mis-named keys.
Suggestion, can we have classe and rating of the module in ModuleBuy and ModuleStore ?
This is generally buried in the name of the item.