lineofflight / peddler

Amazon Selling Partner API (SP-API) in Ruby
https://lineofflight.github.io/peddler/
MIT License
307 stars 130 forks source link

Error: Start of list found where not expected #48

Closed jayshepherd closed 9 years ago

jayshepherd commented 9 years ago

I'm having trouble getting real parameters to work based on the example in this test:

@client.stub(:run, nil) do
  @client.list_inbound_shipments(
    shipment_status_list: [{ 'Foo' => '1' }],
    shipment_id_list: [{ 'Bar' => '2' }])
end

I've tried:

begin
  client.list_inbound_shipments(shipment_status_list: [{ 'WORKING' => '1' }])
rescue => e
  puts e.response.body
end
<ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
  <Error>
    <Type>Sender</Type>
    <Code>MalformedInput</Code>
    <Message>Start of list found where not expected</Message>
  </Error>
  <RequestId>3ee3bfa1-0cce-455d-be13-b42925f1dfe3</RequestId>
</ErrorResponse>

Any thoughts?

jayshepherd commented 9 years ago

It looks like the correct syntax is:

client.list_inbound_shipments(shipment_status_list: ['WORKING'])
hakanensari commented 9 years ago

@jayshepherd The source should help explaining arguments.