首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在rails中使用peddler创建入站发货

在rails中使用peddler创建入站发货
EN

Stack Overflow用户
提问于 2019-03-01 11:35:55
回答 1查看 88关注 0票数 0

我试着创建InboundShipment。

代码语言:javascript
复制
client.create_inbound_shipment(id, inbound_shipment_header, inbound_shipment_items)

id是由Shipplan创建的shipplan id。

代码语言:javascript
复制
inbound_shipment_header = {:shipment_name=>"kum_03_01_2019_AVP1", :ship_from_address=>{:name=>"xxxx", :address_line1=>"xxxx", :address_line2=>"", :city=>"xxxx", :state_or_province_code=>"XX", :postal_code=>"xxxx", :country_code=>"xxxx"}, :destination_fulfillment_center_id=>"AVP1", :label_prep_preference=>"SELLER_LABEL", :are_cases_required=>false, :shipment_status=>"WORKING", :intended_box_contents_source=>"2D_BARCODE"}

inbound_shipment_items = [{:seller_sku=>"SKU", :quantity=>25, :prep_details=>[{:prep_instruction=>"Labeling", :prep_owner=>"SELLER"}]}]

但是它返回错误,如下所示。

代码语言:javascript
复制
#<Peddler::Errors::InvalidRequestException: Error: You must include a valid ShipmentId with a call to the CreateInboundShipment operation. Get ShipmentId values by calling the CreateInboundShipmentPlan operation. The request to CreateInboundShipment must include only items and quantities that have been previously planned through CreateInboundShipmentPlan. If a ShipmentId is not used to create a shipment within 48 hours it will expire.>

当我在MWS便签簿上尝试时,它工作正常。

在RubyOnRails上创建入站货件的解决方案是什么?

EN

回答 1

Stack Overflow用户

发布于 2019-03-10 12:00:16

我刚刚解决了这个问题。

编写inbound_shipment_item时出现错误。

inbound_shipment_item应该如下所示。

代码语言:javascript
复制
inbound_shipment_items = [{:seller_sku=>"SKU", :quantity_shipped=>25, :prep_details=>[{:prep_instruction=>"Labeling", :prep_owner=>"SELLER"}]}]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54937569

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档