Class: Peddler::API::VendorDirectFulfillmentInventoryV1

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb

Overview

Selling Partner API for Direct Fulfillment Inventory Updates

The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor’s inventory updates.

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #endpoint_uri, #http, #initialize, #meter, #must_sandbox!, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#submit_inventory_update(body, warehouse_id, rate_limit: 10.0) ⇒ Hash

Note:

This operation can make a static sandbox call.

Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items.

Parameters:

  • body (Hash)

    The request body that contains the inventory update data to submit.

  • warehouse_id (String)

    Identifier for the warehouse for which to update inventory.

  • rate_limit (Float) (defaults to: 10.0)

    Requests per second

Returns:

  • (Hash)

    The API response



25
26
27
28
29
# File 'lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb', line 25

def submit_inventory_update(body, warehouse_id, rate_limit: 10.0)
  path = "/vendor/directFulfillment/inventory/v1/warehouses/#{warehouse_id}/items"

  meter(rate_limit).post(path, body:)
end