lib/spree-api-client/orders.rb in spree-api-client-0.0.1 vs lib/spree-api-client/orders.rb in spree-api-client-0.0.2
- old
+ new
@@ -17,10 +17,11 @@
def update_order_address(order_number, options={})
put("orders/#{order_number}/address", options)
end
def set_order_shipping_method(order_number, shipping_method_id, options={})
- put("orders/#{order_number}", options.merge(:shipping_method_id => shipping_method_id))
+ order_options = (options[:order] || {}).merge(:shipping_method_id => shipping_method_id)
+ put("orders/#{order_number}", options.merge(order: order_options))
end
def empty_order(order_number, options={})
put("orders/#{order_number}/empty", options)
end