lineofflight / peddler

Amazon Selling Partner API (SP-API) in Ruby
MIT License
307 stars 130 forks source link

FulfillmentInventory to different marketplace #75

Closed philsmy closed 8 years ago

philsmy commented 8 years ago

I create my fullment inventory client with the Canadian marketplace (A2EUQ1WTGCTBG2)

      client = MWS.fulfillment_inventory(
        primary_marketplace_id: "A2EUQ1WTGCTBG2",
        merchant_id: merchant_num,
        aws_access_key_id: aws_access_key,
        aws_secret_access_key: aws_secret_access_key
      )

But the request seems to go to the US one.

2.1.5 :153 > fulinv
 => #<MWS::FulfillmentInventory::Client:0x007f91f4cbe8e0 @primary_marketplace_id="A2EUQ1WTGCTBG2", @merchant_id="xxxx", @auth_token="xxxx", @aws_access_key_id="xxxx", @aws_secret_access_key="xxx"> 
2.1.5 :154 > raw = fulinv.list_inventory_supply(query_start_date_time: from_date).xml
 => {"ListInventorySupplyResponse"=>{"ListInventorySupplyResult"=>{"MarketplaceId"=>"ATVPDKIKX0DER", "InventorySupplyList"=>{"member"=>[{"Condition"=>"NewItem", "Suppl

Any ideas?

hakanensari commented 8 years ago

@philsmy, you need to provide the marketplace id when calling the operation. I just added a note on the option to the docs.

philsmy commented 8 years ago

Interesting! For products it does NOT seem to be that way, as for months I've been doing it the same. But thank you. I'm going to give it a try now.