Class: NewStoreApi::AssociateAppExperimentsConfigurationController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::AssociateAppExperimentsConfigurationController
- Defined in:
- lib/new_store_api/controllers/associate_app_experiments_configuration_controller.rb
Overview
AssociateAppExperimentsConfigurationController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#destroy_experiments(app_id) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.
- #list_experiments(app_id) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.- #replace_experiments(app_id, body: nil) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.- #update_experiments(app_id, body: nil) ⇒ Experiment
🚧 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
#destroy_experiments(app_id) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.Deletes the current experiments configuration values for Associate App in your business.
See API Lifecycle Documentation for details.22 23 24 25 26 27 28 29 30 31 32 33 34 35
# File 'lib/new_store_api/controllers/associate_app_experiments_configuration_controller.rb', line 22 def destroy_experiments(app_id) @api_call .request(new_request_builder(HttpMethodEnum::DELETE, '/retail-org/apps/{appId}/experiments', Server::API) .template_param(new_parameter(app_id, key: 'appId') .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(Experiment.method(:from_hash))) .execute end
#list_experiments(app_id) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.Returns the current experiments configured for Associate App in your business.
See API Lifecycle Documentation for details.50 51 52 53 54 55 56 57 58 59 60 61 62 63
# File 'lib/new_store_api/controllers/associate_app_experiments_configuration_controller.rb', line 50 def list_experiments(app_id) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/retail-org/apps/{appId}/experiments', Server::API) .template_param(new_parameter(app_id, key: 'appId') .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(Experiment.method(:from_hash))) .execute end
#replace_experiments(app_id, body: nil) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.Updates and replaces the current experiments configuration values for Associate App in your business.
See API Lifecycle Documentation for details.113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
# File 'lib/new_store_api/controllers/associate_app_experiments_configuration_controller.rb', line 113 def replace_experiments(app_id, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::PUT, '/retail-org/apps/{appId}/experiments', Server::API) .template_param(new_parameter(app_id, key: 'appId') .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(Experiment.method(:from_hash))) .execute end
#update_experiments(app_id, body: nil) ⇒ Experiment
🚧 BETA: This endpoint is in beta and may change.Updates the current experiments configuration values for Associate App in your business.
See API Lifecycle Documentation for details.79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
# File 'lib/new_store_api/controllers/associate_app_experiments_configuration_controller.rb', line 79 def update_experiments(app_id, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::PATCH, '/retail-org/apps/{appId}/experiments', Server::API) .template_param(new_parameter(app_id, key: 'appId') .should_encode(true)) .header_param(new_parameter('application/json', key: 'Content-Type')) .body_param(new_parameter(body)) .header_param(new_parameter('application/json', key: 'accept')) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('oauth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(Experiment.method(:from_hash))) .execute end
- #list_experiments(app_id) ⇒ Experiment