Class: NewStoreApi::ExtensionsController

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

Overview

ExtensionsController

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_extensionvoid

This method returns an undefined value.

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


90
91
92
93
94
95
96
97
98
99
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 90

def create_extension
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/extensions/extensions',
                                 Server::API)
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end

#list_extension_typesvoid

This method returns an undefined value.

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
List extension types.


20
21
22
23
24
25
26
27
28
29
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 20

def list_extension_types
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/extensions/extension-types',
                                 Server::API)
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end

#list_extensionsvoid

This method returns an undefined value.

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


68
69
70
71
72
73
74
75
76
77
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 68

def list_extensions
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/extensions/extensions',
                                 Server::API)
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end

#show_extension(extension_id) ⇒ void

This method returns an undefined value.

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
Get extension. extension.

Parameters:

  • extension_id (String)

    Required parameter: The id of the



114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 114

def show_extension(extension_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/extensions/extensions/{extension_id}',
                                 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

#show_extension_type(type_id) ⇒ void

This method returns an undefined value.

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
Get extension type. type.

Parameters:

  • type_id (String)

    Required parameter: The id of the extension



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 44

def show_extension_type(type_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/extensions/extension-types/{type_id}',
                                 Server::API)
               .template_param(new_parameter(type_id, key: 'type_id')
                                .should_encode(true))
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .is_response_void(true))
    .execute
end

#update_extension(extension_id) ⇒ void

This method returns an undefined value.

Updates an extension. to update.

Parameters:

  • extension_id (String)

    Required parameter: The id of the extension



131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/new_store_api/controllers/extensions_controller.rb', line 131

def update_extension(extension_id)
  @api_call
    .request(new_request_builder(HttpMethodEnum::PATCH,
                                 '/extensions/extensions/{extension_id}',
                                 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