In one of my recent projects i came across a situation where i had to create a order line item programatically. If you have ever came across such a situation you would end up in line_item_example.module which demonstrate the addition of a new line item type programatically.