Permalink
Browse files

Removed hard requirement on order comment

  • Loading branch information...
1 parent 7bcb8e9 commit d3b07a4ac64c4bb368915ceed92dc993f0cd8589 csaunders committed May 28, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/active_fulfillment/fulfillment/services/amazon_mws.rb
@@ -120,7 +120,7 @@ def endpoint
end
def fulfill(order_id, shipping_address, line_items, options = {})
- requires!(options, :order_date, :comment, :shipping_method)
+ requires!(options, :order_date, :shipping_method)
commit :post, :outbound, :create, build_fulfillment_request(order_id, shipping_address, line_items, options)
end
@@ -339,10 +339,11 @@ def build_fulfillment_request(order_id, shipping_address, line_items, options)
:Action => OPERATIONS[:outbound][:create],
:SellerFulfillmentOrderId => order_id.to_s,
:DisplayableOrderId => order_id.to_s,
- :DisplayableOrderComment => options[:comment],
:DisplayableOrderDateTime => options[:order_date].utc.iso8601,
:ShippingSpeedCategory => options[:shipping_method]
}
+ params[:DisplayableOrderComment] = options[:comment] if options[:comment]
+
request = build_basic_api_query(params.merge(options))
request = request.merge build_address(shipping_address)
request = request.merge build_items(line_items)

0 comments on commit d3b07a4

Please sign in to comment.