Class: WalmartApIs::WfsInventoryApi
- Defined in:
- lib/walmart_ap_is/apis/wfs_inventory_api.rb
Overview
WfsInventoryApi
Constant Summary
Constants inherited from BaseApi
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#get_wfs_inventory_items(skus: nil, page_size: 100, next_token: nil) ⇒ ApiResponse
Returns inventory for items managed by Walmart Fulfillment Services (WFS).
Methods inherited from BaseApi
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from WalmartApIs::BaseApi
Instance Method Details
#get_wfs_inventory_items(skus: nil, page_size: 100, next_token: nil) ⇒ ApiResponse
Returns inventory for items managed by Walmart Fulfillment Services (WFS).
Includes stock health, age buckets, and demand-intelligence fields
not available on seller-fulfilled inventory.
Rate limit: 300 items per page maximum.
Requests retrieving more than 100 items per page will receive
X-RateLimit-Limit and X-RateLimit-Remaining headers in the response.
filter (max 50). Omit to return all WFS items.
here
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/walmart_ap_is/apis/wfs_inventory_api.rb', line 21 def get_wfs_inventory_items(skus: nil, page_size: 100, next_token: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/inventory/v4/wfs/items', Server::DEFAULT1) .query_param(new_parameter(skus, key: 'skus')) .query_param(new_parameter(page_size, key: 'pageSize')) .query_param(new_parameter(next_token, key: 'nextToken')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('walletAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(GetWfsInventoryResponse.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Request', ErrorListErrorException) .local_error('403', 'Forbidden', ErrorListErrorException) .local_error('429', 'Rate limit exceeded', ErrorListErrorException) .local_error('500', 'Internal Server Error', ErrorListErrorException)) .execute end |