Unless you have a small dog or a puppy, your dog should be just fine. You know how in the movies they sometimes have the scene where the dog eats the keys and it just comes out the other end later. That is most likely what will happen to your dog. However, just to be on the safe side you should contact a vet to make sure what is should be done because the vet may have to assist your dog in getting it out of its system. Bottom line, your dog will live, just might be in pain for a little while.
What age is your dog? Hope its not a puppy? If I was in your place I would bring the dog to the vet on the spot. Or you can try feeding your dog grasses, they normally do expel everything afterwards. I think that you might have notice a dog eating grass..try feeding it the same identical grass. I don't know the name..good luck.