After playing around with the shopify_api gem and Postman (REST client), I've observed the following:
- You can only set the discount_codes field when POSTing to create a new order - PUT requests to update existing orders don't seem to work, although there's nothing in the documentation to indicate this
- Attempting to create a new order with a discount code works if you use Postman, but the shopify_api Ruby client library itself seems to be incapable of doing the same.