Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SkuController
- Inherits:
-
BaseController
- Object
- BaseController
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SkuController
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/sku_controller.rb
Overview
SkuController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#single_item_inventoryby_ship_node(ship_node, sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation2
This API will retrieve the inventory count for an item across all ship nodes or one specific ship node.
-
#update_item_inventoryper_ship_node(sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation3
This API will update the inventory for an item across one or more fulfillment centers, known as ship nodes.
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
#single_item_inventoryby_ship_node(ship_node, sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) ⇒ SuccessfulOperation2
This API will retrieve the inventory count for an item across all ship nodes or one specific ship node. You can specify the ship node for which you want to fetch the inventory for which the inventory is requested alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: ‘:’, ‘/’, ‘?’, ‘#’, ‘[’, ‘]’, ‘@’, ‘!’, ‘$’, ‘&’, “‘”, ’(‘, ’)‘, ’*‘, ’+‘, ’,‘, ’;‘, ’=‘, ‘ ’ as well as ’%‘ itself if it’s a part of sku. Make sure to encode space with %20. Other characters don’t need to be encoded. 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
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/sku_controller.rb', line 34 def single_item_inventoryby_ship_node(ship_node, sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/inventories/{sku}', Server::DEFAULT) .query_param(new_parameter(ship_node, key: 'shipNode')) .template_param(new_parameter(sku, key: 'sku') .should_encode(true)) .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'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SuccessfulOperation2.method(:from_hash))) .execute end |
#update_item_inventoryper_ship_node(sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation3
This API will update the inventory for an item across one or more fulfillment centers, known as ship nodes. alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: ‘:’, ‘/’, ‘?’, ‘#’, ‘[’, ‘]’, ‘@’, ‘!’, ‘$’, ‘&’, “‘”, ’(‘, ’)‘, ’*‘, ’+‘, ’,‘, ’;‘, ’=‘, ‘ ’ as well as ’%‘ itself if it’s a part of sku. Make sure to encode space with %20. Other characters don’t need to be encoded. 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 TODO: type description here
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/sku_controller.rb', line 82 def update_item_inventoryper_ship_node(sku, wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/inventories/{sku}', Server::DEFAULT) .template_param(new_parameter(sku, key: 'sku') .should_encode(true)) .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')) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end)) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(SuccessfulOperation3.method(:from_hash))) .execute end |