In any case, when a dog ceases eating it could be either a blockage OR just that there is something going on in the tum which means nothing tastes nice. Does his breath smell bad ? If so, his food probably tastes bad too !
Vet is your first and immediate port of call. This goes for all dogs who decline food for no apparent reason.
It does no harm to starve a dog for 36 - 48 hours and then to resume feeding several small meals of boiled rice with a little boiled fish or chicken, or a coddled egg. Use the water the fish or chicken was boiled in to moisten the rice.
Gradually reintroduce normal diet bit by bit, a little less rice and a little more of the normal - each meal, until your dog is back to his/her old self.
After a period of fasting, it is always wise to restart the engine with bland rice and chicken, just to give the tum a chance to recover completely. Don't just go straight back to usual food routine -
Natural yoghurt helps replace the flor in the stomach after a session or a series of vomitting episodes.
But in this case - VET first !