Class: NewStoreApi::InstallationsController

Inherits:
BaseController show all
Defined in:
lib/new_store_api/controllers/installations_controller.rb

Overview

InstallationsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

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

#create_installation(extension_id) ⇒ void

This method returns an undefined value.

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
Create a new installation for an extension. to install.

Parameters:

  • extension_id (String)

    Required parameter: The id of the extension



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/new_store_api/controllers/installations_controller.rb', line 22

def create_installation(extension_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/extensions/extensions/{extension_id}/installations',
                                 Server::API)
               .template_param(new_parameter(extension_id, key: 'extension_id')
                                .should_encode(true))
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end

#list_tenant_installations(tenant) ⇒ void

This method returns an undefined value.

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
List installations by tenant. installations by.

Parameters:

  • tenant (String)

    Required parameter: The tenant to filter



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/new_store_api/controllers/installations_controller.rb', line 48

def list_tenant_installations(tenant)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/extensions/installations',
                                 Server::API)
               .query_param(new_parameter(tenant, key: 'tenant'))
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end