Shipping automation with Ruby

I’ve been sporadically working on a library for the P4D API. It’s a cool concept and I haven’t found a similar service (in the UK at least). The service really lowers the point of entry for businesses looking to automate their delivery services; unless your outfit needs to ship seriously high volumes, it’s unlikely UPS, DHL et al are going to be interested in talking to you directly.

That said, it’s a little more complicated to hook into P4D unless:

  • You’re using it through eBay
  • Your app is in PHP

I’ve reworked the current library several times since I started in an attempt to keep the ruby methods as intuitive as possible while persisting things like quote ids to allow easy reuse. Developing a set of abstract routines for serializing / deserializing the PHP and converting the returned data into callable objects has been another challenge.

This is far from a finished product, but I’ve decided to release what I’ve got so far and see if anybody has any feedback.

Feel free to check out the source here. You need the php-serialize gem, available here.

Comments (0)

Leave a comment...