Closed jayshepherd closed 7 years ago
So, unless there is something I'm missing in Peddler, I just had to crunch a workable hash based on the order items.
Crude, but works for now.
order.items.each_with_index.inject({}) {|h, (item, i)| h["Item.#{i+1}"] = {OrderItemId: item.order_item_id, Quantity: item.quantity}; h}
@jayshepherd thanks for reporting this. The above commit should fix. I'll release a new version in a moment.
The updated gem worked perfectly. Thanks!
I am trying to use
MWS::MerchantFulfillment::Client.get_eligible_shipping_services
but getting an error due to improper formatting for the ItemList value.I have a Hash that contains and Array of objects containing
OrderItemId
andQuantity
but it doesn't seem thatStructuredList
parses the array properly. I get the error"Unexpected list element termination"
when submitting the following:My hash
client.operation shows the following conversion of the hash:
According to the docs, I would expect the ItemList section to look like:
How to I prepare my hash for being built to break out the ItemList array properly?