Few month ago I developed a simple module called Commerce Order2pdf and then I also added custom tokens as you can read from this post Custom token creation for Drupal 7
Few days ago my client came and said.. I need to exlude a shipping when there's special type of product.
At first I was sure this can be done with rules but it didn't work out for me.
Today I had a plan to create tokens for my new module wich will create hashed pdf link for commerce order, becouse it would be really nice to use tokens with rules. So I just looked how it works and wanted to create some simple examples.