Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::FeedsController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/feeds_controller.rb

Overview

FeedsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::BaseController

Instance Method Details

#bulk_item_inventory_update(feed_type, ship_node, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, content_type, accept, file) ⇒ SuccessfulOperation5

Updates inventory for items in bulk. Seller Can either use feed type “inventory” or “MP_INVENTORY”

  • Inventory spec 1.4 feed type: inventory

  • Inventory spec 1.5 feed type: MP_INVENTORY

Please Note: Multi Node Inventory Update Feed (feedType=MP_INVENTORY) only supports JSON Request and Responses. Refer to “MultiNode_Bulk_Inventory_Update_Request.json” for the corresponding request sample

Refer to the <a href=“developer.walmart.com/doc/us/us-mp/us-mp-inventory/”>guide section</a> for more detailed guide around each of the feed types

Refer to the throttling limits before uploading the Feed Files.

inventory is to be updated. Not required in case of Multi Node Inventory Update Feed (feedType=MP_INVENTORY) access token retrieved in the Token API call to track the consumer request by channel. Use the Consumer Channel Type received during onboarding unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID Name upload

Parameters:

  • feed_type (String)

    Required parameter: (Required) The feed Type

  • ship_node (String)

    Required parameter: The shipNode for which the

  • wm_sec_access_token (String)

    Required parameter: (Required) The

  • wm_consumer_channel_type (String)

    Required parameter: A unique ID

  • wm_qos_correlation_id (String)

    Required parameter: (Required) A

  • wm_svc_name (String)

    Required parameter: (Required) Walmart Service

  • content_type (ContentTypeEnum)

    Required parameter: Example:

  • accept (String)

    Required parameter: TODO: type description here

  • file (File | UploadIO)

    Required parameter: (Required) Feed file to

Returns:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/feeds_controller.rb', line 42

def bulk_item_inventory_update(feed_type,
                               ship_node,
                               wm_sec_access_token,
                               wm_consumer_channel_type,
                               wm_qos_correlation_id,
                               wm_svc_name,
                               content_type,
                               accept,
                               file)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/feeds',
                                 Server::DEFAULT)
               .query_param(new_parameter(feed_type, key: 'feedType'))
               .query_param(new_parameter(ship_node, key: 'shipNode'))
               .header_param(new_parameter(wm_sec_access_token, key: 'WM_SEC.ACCESS_TOKEN'))
               .header_param(new_parameter(wm_consumer_channel_type, key: 'WM_CONSUMER.CHANNEL.TYPE'))
               .header_param(new_parameter(wm_qos_correlation_id, key: 'WM_QOS.CORRELATION_ID'))
               .header_param(new_parameter(wm_svc_name, key: 'WM_SVC.NAME'))
               .header_param(new_parameter(accept, key: 'Accept'))
               .multipart_param(new_parameter(file, key: 'file')
                                 .default_content_type('application/octet-stream')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(SuccessfulOperation5.method(:from_hash)))
    .execute
end