Class: NewStoreApi::StoreReportingConfigController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::StoreReportingConfigController
- Defined in:
- lib/new_store_api/controllers/store_reporting_config_controller.rb
Overview
StoreReportingConfigController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#replace_config(id) ⇒ InsightsConfigResponse
🚧 BETA: This endpoint is in beta and may change.
- #show_config(id) ⇒ Config
🚧 BETA: This endpoint is in beta and may change.Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from NewStoreApi::BaseController
Instance Method Details
#replace_config(id) ⇒ InsightsConfigResponse
🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.46 47 48 49 50 51 52 53 54 55 56 57 58 59
# File 'lib/new_store_api/controllers/store_reporting_config_controller.rb', line 46 def replace_config(id) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/insights/config/{id}', Server::API) .template_param(new_parameter(id, key: 'id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(InsightsConfigResponse.method(:from_hash))) .execute end
#show_config(id) ⇒ Config
🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.20 21 22 23 24 25 26 27 28 29 30 31 32 33
# File 'lib/new_store_api/controllers/store_reporting_config_controller.rb', line 20 def show_config(id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/insights/config/{id}', Server::API) .template_param(new_parameter(id, key: 'id') .should_encode(true)) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(Config.method(:from_hash))) .execute end
- #show_config(id) ⇒ Config