spree/spree — pull request #5439 by HoyaBoya (2014-10-02 21:25:22+00:00)
Title: Added code to shipping methods model, API, Admin

This PR adds a code field to shipping methods and allows it to be read via the API. It can be configured via the Admin (screen attached).

The situation I am trying to work out is that our fulfillment provider needs a "sku" like field to know what shipping provider to use for the order. In past integrations with other systems, that are use to seeing "shipping as a line item" with it's own SKU and quantity of 1.

The expectation, like a sku, is that a shipping_method.code could represent an immutable value that is safe to bind against figuring out what shipping method to use.

![screen shot 2014-10-02 at 3 56 06 pm](https://cloud.githubusercontent.com/assets/134368/4498673/507aa2f6-4a7a-11e4-9f7e-f7872791fa98.png)