Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SpecController
- Inherits:
-
BaseController
- Object
- BaseController
- InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::SpecController
- Defined in:
- lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/spec_controller.rb
Overview
SpecController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_spec(wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation1
The Get Spec API exposes the allows users to retrieve specifications for a specified Product Type or a set of Product Types (up to 20).
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
#get_spec(wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) ⇒ SuccessfulOperation1
The Get Spec API exposes the allows users to retrieve specifications for a specified Product Type or a set of Product Types (up to 20). To get the spec, please pass in “version” and “feedType” in the query params as instructed below. Throttling: This endpoint is throttled at a maximum of 3 transactions per minute (TPM) per seller. 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 here
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/controllers/spec_controller.rb', line 30 def get_spec(wm_sec_access_token, wm_consumer_channel_type, wm_qos_correlation_id, wm_svc_name, accept, body) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/items/spec', Server::DEFAULT) .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(SuccessfulOperation1.method(:from_hash)) .local_error('400', 'Bad Request', ItemsSpec400ErrorException) .local_error('500', 'Internal Server Error', ItemsSpec500ErrorException)) .execute end |