Class: AddonsApi::Client::Team::Addon
- Inherits:
-
Object
- Object
- AddonsApi::Client::Team::Addon
show all
- Defined in:
- lib/addons-api/client.rb
Overview
Defined Under Namespace
Classes: Action, Config, Sso
Instance Method Summary
collapse
Constructor Details
#initialize(client) ⇒ Addon
Returns a new instance of Addon.
246
247
248
|
# File 'lib/addons-api/client.rb', line 246
def initialize(client)
@client = client
end
|
Instance Method Details
#action ⇒ Object
254
255
256
|
# File 'lib/addons-api/client.rb', line 254
def action
@action_resource ||= Action.new(@client)
end
|
#config ⇒ Object
258
259
260
|
# File 'lib/addons-api/client.rb', line 258
def config
@config_resource ||= Config.new(@client)
end
|
#create(team_id, body = {}) ⇒ Object
270
271
272
|
# File 'lib/addons-api/client.rb', line 270
def create(team_id, body = {})
@client.request(:post, "#{BASE_PATH}/#{team_id}/addons", body: body)
end
|
#delete(team_id, addon_id) ⇒ Object
274
275
276
|
# File 'lib/addons-api/client.rb', line 274
def delete(team_id, addon_id)
@client.request(:delete, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}")
end
|
#info(team_id, addon_id) ⇒ Object
262
263
264
|
# File 'lib/addons-api/client.rb', line 262
def info(team_id, addon_id)
@client.request(:get, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}")
end
|
#info_by_callback_url(callback_url) ⇒ Object
266
267
268
|
# File 'lib/addons-api/client.rb', line 266
def info_by_callback_url(callback_url)
@client.request(:get, "", base_url: callback_url)
end
|
#sso(team_id, addon_id, body = {}) ⇒ Object
250
251
252
|
# File 'lib/addons-api/client.rb', line 250
def sso(team_id, addon_id, body = {})
@sso_resource ||= Sso.new(@client)
end
|
#update(team_id, addon_id, body = {}) ⇒ Object
278
279
280
|
# File 'lib/addons-api/client.rb', line 278
def update(team_id, addon_id, body = {})
@client.request(:patch, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}", body: body)
end
|