Your best bet is probably looking at current implementations. There's an example simple contract in the acs-s-c package. Then you have the search package, the payment gateway, the payflowpro, the authorize.net, the value-based shipping service contracts too.